diff options
21 files changed, 380 insertions, 14 deletions
diff --git a/usr.sbin/afs/Makefile b/usr.sbin/afs/Makefile index a964310a7bd..a3bafa8acb6 100644 --- a/usr.sbin/afs/Makefile +++ b/usr.sbin/afs/Makefile @@ -1,18 +1,11 @@ -# $OpenBSD: Makefile,v 1.3 2001/11/22 21:04:40 espie Exp $ +# $OpenBSD: Makefile,v 1.4 2002/06/07 05:02:58 hin Exp $ -# -# This is hairy. libroken (originally libroken and libutil) has to be built -# before ydr. But libroken should be a part of libarla (because libarla uses -# libroken), but libarla needs ydr to be able to build. Yuck. -# # To the future maintainer (if I get hit by a car or something): The structure # is like this (everything in src, except the makefiles), because we want # the upgrade process to be easy, without building and installing 5 different # libs and without making a hairy Makefile.bsd-wrapper # # Anomalies: -# - Man pages are not built from the main source because of differing -# path names. # - config.h and arla-version.h have to be pre-built and put in src/include. # config.h contains macros for endianness, but they are only used in one # place and will be replaced on OpenBSD. They have to be placed in @@ -21,18 +14,15 @@ # .if !make(install) -SUBDIR += libroken -SUBDIR += ydr -SUBDIR += libarla +SUBDIR += usr.sbin/ydr .endif -SUBDIR += afsd fs vos pts +SUBDIR += lib libexec usr.sbin ## To be able to make depend in libarla we have to have ydr (that needs ## libroken) and libroken used by gensysname in (libarla/Makefile.ko.inc) beforedepend: - cd libroken && make depend && exec make - cd ydr && make depend && exec make + cd usr.sbin/ydr && make depend && exec make .include <bsd.dep.mk> .include <bsd.subdir.mk> diff --git a/usr.sbin/afs/Makefile.inc b/usr.sbin/afs/Makefile.inc index d334b01b273..80696fd9437 100644 --- a/usr.sbin/afs/Makefile.inc +++ b/usr.sbin/afs/Makefile.inc @@ -1,9 +1,30 @@ + +AFSSRC = ${.CURDIR}/${AFSTOPDIR}/src + +YDR = ${AFSTOPDIR}/usr.sbin/ydr/ydr + OS_VER != uname -r BINDIR ?=/usr/sbin + +ROKENDIR = ${AFSTOPDIR}/../../kerberosV/lib/roken +LIBROKEN = ${ROKENDIR}/libroken.a + +LIBARLA = ${AFSTOPDIR}/lib/libarla/libarla.a + CFLAGS += -DHAVE_CONFIG_H -DSYSCONFDIR=\"/etc/afs\" \ -DARLACACHEDIR=\"/var/spool/afs\"\ -DARLACONFFILE=\"/etc/afs/afsd.conf\" -DKERBEROS \ -DARLAVENDOR=\"unknown\" -DARLACPU=\"${MACHINE_ARCH}\" \ -DARLAOS=\"openbsd${OS_VER}\" \ +CFLAGS += -I${.CURDIR}/${AFSTOPDIR}/include -I${AFSSRC}/include \ + -I${.CURDIR}/${AFSTOPDIR}/../../kerberosV/include \ + -I${.CURDIR}/${AFSTOPDIR}/../../kerberosV/src/lib/roken \ + -I${AFSTOPDIR}/lib/libarla -I${AFSSRC}/lwp \ + -I${AFSSRC}/rxkad -I${AFSSRC}/lib/bufdir -I${AFSSRC}/lib/ko \ + -I${AFSSRC} -I${DESTDIR}/usr/include/kerberosIV \ + -I${AFSSRC}/util -I${AFSSRC}/arlad \ + -I${AFSSRC}/lib/sl + +#CFLAGS+=-g -Wall -Werror -Wno-uninitialized diff --git a/usr.sbin/afs/lib/Makefile b/usr.sbin/afs/lib/Makefile new file mode 100644 index 00000000000..0834f966e74 --- /dev/null +++ b/usr.sbin/afs/lib/Makefile @@ -0,0 +1,5 @@ +# $OpenBSD: Makefile,v 1.1 2002/06/07 05:02:58 hin Exp $ + +SUBDIR = libarla + +.include <bsd.subdir.mk>
\ No newline at end of file diff --git a/usr.sbin/afs/lib/libarla/Makefile b/usr.sbin/afs/lib/libarla/Makefile new file mode 100644 index 00000000000..8b42de883b5 --- /dev/null +++ b/usr.sbin/afs/lib/libarla/Makefile @@ -0,0 +1,35 @@ +# $OpenBSD: Makefile,v 1.1 2002/06/07 05:02:58 hin Exp $ + +# +# You don't want to understand this makefile. +# + +AFSTOPDIR = ../.. +.include <../../Makefile.inc> + +LIB = arla +NOPIC = +NOPROFILE= +MAN = + +CFLAGS += -DHAVE_CONFIG_H -I. -I${AFSSRC}/util + +# XXX Until an egcs bug gets fixed +.if (${MACHINE_ARCH} == "alpha") +CFLAGS += -O0 +.endif + +# Don't install libarla.a +install: + +.include "Makefile.lwp.inc" +.include "Makefile.rx.inc" +.include "Makefile.rxdef.inc" +.include "Makefile.rxkad.inc" +.include "Makefile.ko.inc" +.include "Makefile.bufdir.inc" +.include "Makefile.util.inc" +.include "Makefile.sl.inc" +.include "Makefile.arla.inc" + +.include <bsd.lib.mk> diff --git a/usr.sbin/afs/lib/libarla/Makefile.arla.inc b/usr.sbin/afs/lib/libarla/Makefile.arla.inc new file mode 100644 index 00000000000..d83a1c3326b --- /dev/null +++ b/usr.sbin/afs/lib/libarla/Makefile.arla.inc @@ -0,0 +1,6 @@ +SRCS += arlalib.c \ + fs_lib.c \ + ka-procs.c \ + tokens.c +CFLAGS += -I${AFSSRC}/appl/lib +.PATH: ${AFSSRC}/appl/lib diff --git a/usr.sbin/afs/lib/libarla/Makefile.bufdir.inc b/usr.sbin/afs/lib/libarla/Makefile.bufdir.inc new file mode 100644 index 00000000000..ae2649f89b6 --- /dev/null +++ b/usr.sbin/afs/lib/libarla/Makefile.bufdir.inc @@ -0,0 +1,4 @@ +### bufdir stuff +SRCS += fdir.c fbuf.c +CFLAGS += -I${AFSSRC}/lib/bufdir +.PATH: ${AFSSRC}/lib/bufdir diff --git a/usr.sbin/afs/lib/libarla/Makefile.ko.inc b/usr.sbin/afs/lib/libarla/Makefile.ko.inc new file mode 100644 index 00000000000..17fd7a138a7 --- /dev/null +++ b/usr.sbin/afs/lib/libarla/Makefile.ko.inc @@ -0,0 +1,20 @@ +### ko stuff +OS_VER != uname -r + +SRCS += koerror.c kocell.c ports.c vlmisc.c part.c agetarg.c +SRCS += sysname.c +CLEANFILES += sysname.c gensysname gensysname.o +CFLAGS += -I${AFSSRC}/lib/ko + +.PATH: ${AFSSRC}/lib/ko +.PATH: ${.CURDIR}/${AFSTOPDIR}/../../kerberosV/src/lib/roken + +sysname.c: gensysname + ./gensysname -c > sysname.c + +gensysname: gensysname.o agetarg.o setprogname.o + ${CC} ${CFLAGS} -o gensysname gensysname.o agetarg.o setprogname.o ${LIBROKEN} + +test: + echo ${AFSTOPDIR}/../../kerberosV/src/lib/roken + diff --git a/usr.sbin/afs/lib/libarla/Makefile.lwp.inc b/usr.sbin/afs/lib/libarla/Makefile.lwp.inc new file mode 100644 index 00000000000..9db1b25b907 --- /dev/null +++ b/usr.sbin/afs/lib/libarla/Makefile.lwp.inc @@ -0,0 +1,38 @@ +### lwp stuff +SRCS += lwp.c lock.c iomgr.c timer.c fasttime.c preempt.c q.c +OBJS += process.o +CLEANFILES += process.S process.o lwp.c lwp.h +.PATH: ${AFSSRC}/lwp +CFLAGS += -DAFS_BSD_ENV -DFD_SPEED_HACK -I${AFSSRC}/lwp + +# We use the handcoded assembler stuff for context switching, not +# pthreads (because pthreads do not work for now). + +beforedepend: lwp.c lwp.h + +lwp.h: + ln -s ${AFSSRC}/lwp/lwp_asm.h lwp.h +lwp.c: lwp.h + ln -s ${AFSSRC}/lwp/lwp_asm.c lwp.c + +process.S: + HOST_CPU=${MACHINE_ARCH}; \ + case "$$HOST_CPU" in \ + sparc64) PROCESS_S="process.sparc.S" ;; \ + sparc) PROCESS_S="process.sparc.S" ;; \ + i*86*) PROCESS_S="process.i386.S" ;; \ + m68k) PROCESS_S="process.m68k.S" ;; \ + mips*) PROCESS_S="process.mips.S" ;; \ + alpha*) PROCESS_S="process.alpha.S" ;; \ + hppa*) PROCESS_S="process.hpux.S" ;; \ + powerpc) PROCESS_S="process.ppc.S" ;; \ + rs6000) PROCESS_S="process.rios.S" ;; \ + vax) PROCESS_S="process.vax.S" ;; \ + *) echo "Unknown host_cpu, good luck" ;; \ + esac; \ + ln -s ${AFSSRC}/lwp/$$PROCESS_S process.S + +process.o: process.S + ${CC} ${CFLAGS} -DHAVE_PIC -c process.S + +all: lwp.h
\ No newline at end of file diff --git a/usr.sbin/afs/lib/libarla/Makefile.rx.inc b/usr.sbin/afs/lib/libarla/Makefile.rx.inc new file mode 100644 index 00000000000..690954fb71d --- /dev/null +++ b/usr.sbin/afs/lib/libarla/Makefile.rx.inc @@ -0,0 +1,5 @@ +### rx stuff +SRCS += rx_clock.c rx_event.c rx_user.c rx.c rx_globs.c rx_null.c \ + rx_misc.c rx_pkt.c rx_rdwr.c rx_multi.c rx_trace.c +CFLAGS += -I${AFSSRC}/rx -I${AFSSRC} +.PATH: ${AFSSRC}/rx diff --git a/usr.sbin/afs/lib/libarla/Makefile.rxdef.inc b/usr.sbin/afs/lib/libarla/Makefile.rxdef.inc new file mode 100644 index 00000000000..0550a00410e --- /dev/null +++ b/usr.sbin/afs/lib/libarla/Makefile.rxdef.inc @@ -0,0 +1,46 @@ +### rxdef stuff +## No, cb.ss.c is _not_ a mistake. The _client_ is the callback server. +SRCS += vldb.cs.c fs.cs.c cb.ss.c pts.cs.c \ + volumeserver.cs.c ubik.cs.c bos.cs.c ka.cs.c + +CLEANFILES += vldb.ss.c vldb.cs.c vldb.ydr.c vldb.ss.h vldb.cs.h vldb.h \ + fs.ss.c fs.cs.c fs.ydr.c fs.cs.h fs.ss.h fs.h \ + cb.ss.c cb.cs.c cb.ydr.c cb.cs.h cb.ss.h cb.h \ + pts.ss.c pts.cs.c pts.ydr.c pts.cs.h pts.ss.h pts.h \ + volumeserver.ss.c volumeserver.cs.c volumeserver.ydr.c \ + volumeserver.ss.h volumeserver.cs.h volumeserver.h \ + ubik.ss.c ubik.cs.c ubik.ydr.c ubik.cs.h ubik.ss.h ubik.h \ + bos.ss.c bos.cs.c bos.ydr.c bos.cs.h bos.ss.h bos.h \ + vldb.td.c fs.td.c cb.td.c pts.td.c volumeserver.td.c \ + ubik.td.c bos.td.c ka.cs.c ka.cs.h ka.h ka.ss.c ka.ss.h \ + ka.td.c ka.ydr.c + +CFLAGS += -I${AFSSRC}/rxdef -I${AFSSRC}/arlad + +YDRFLAGS = -I${.CURDIR} +.PATH: ${AFSSRC}/rxdef + +vldb.cs.c vldb.cs.h vldb.ss.c vldb.ss.h vldb.ydr.c vldb.h: vldb.xg + $(YDR) $(YDRFLAGS) ${AFSSRC}/rxdef/vldb.xg + +fs.cs.c fs.cs.h fs.ss.c fs.ss.h fs.ydr.c fs.h: fs.xg + $(YDR) $(YDRFLAGS) ${AFSSRC}/rxdef/fs.xg + +cb.cs.c cb.cs.h cb.ss.c cb.ss.h cb.ydr.c cb.h: cb.xg + $(YDR) $(YDRFLAGS) ${AFSSRC}/rxdef/cb.xg + +pts.cs.c pts.cs.h pts.ss.c pts.ss.h pts.ydr.c pts.h: pts.xg + $(YDR) $(YDRFLAGS) ${AFSSRC}/rxdef/pts.xg + +volumeserver.cs.c volumeserver.cs.h volumeserver.ss.c volumeserver.ss.h volumeserver.ydr.c volumeserver.h: volumeserver.xg + $(YDR) $(YDRFLAGS) ${AFSSRC}/rxdef/volumeserver.xg + +ubik.cs.c ubik.cs.h ubik.ss.c ubik.ss.h ubik.ydr.c ubik.h: ubik.xg + $(YDR) $(YDRFLAGS) ${AFSSRC}/rxdef/ubik.xg + +bos.cs.c bos.cs.h bos.ss.c bos.ss.h bos.ydr.c bos.h: bos.xg + $(YDR) $(YDRFLAGS) ${AFSSRC}/rxdef/bos.xg + +ka.cs.c ka.cs.h ka.ss.c ka.ss.h ka.ydr.c ka.h: ka.xg + $(YDR) $(YDRFLAGS) ${AFSSRC}/rxdef/ka.xg + diff --git a/usr.sbin/afs/lib/libarla/Makefile.rxkad.inc b/usr.sbin/afs/lib/libarla/Makefile.rxkad.inc new file mode 100644 index 00000000000..239041b7765 --- /dev/null +++ b/usr.sbin/afs/lib/libarla/Makefile.rxkad.inc @@ -0,0 +1,7 @@ +### rxkad stuff +SRCS += rxk_locl.c rxk_clnt.c rxk_serv.c rxk_crpt.c rxk_info.c \ + osi_alloc.c compat.c + +CFLAGS += -I${AFSSRC}/rxkad -I${DESTDIR}/usr/include/kerberosIV + +.PATH: ${AFSSRC}/rxkad diff --git a/usr.sbin/afs/lib/libarla/Makefile.sl.inc b/usr.sbin/afs/lib/libarla/Makefile.sl.inc new file mode 100644 index 00000000000..133b24f10b5 --- /dev/null +++ b/usr.sbin/afs/lib/libarla/Makefile.sl.inc @@ -0,0 +1,4 @@ +SRCS += sl.c +CFLAGS += -I${AFSSRC}/lib/sl + +.PATH: ${AFSSRC}/lib/sl diff --git a/usr.sbin/afs/lib/libarla/Makefile.util.inc b/usr.sbin/afs/lib/libarla/Makefile.util.inc new file mode 100644 index 00000000000..551c640cc7e --- /dev/null +++ b/usr.sbin/afs/lib/libarla/Makefile.util.inc @@ -0,0 +1,6 @@ +SRCS += log.c \ + hash.c \ + heap.c \ + list.c + +.PATH: ${AFSSRC}/util diff --git a/usr.sbin/afs/libexec/Makefile b/usr.sbin/afs/libexec/Makefile new file mode 100644 index 00000000000..7f29db7cd33 --- /dev/null +++ b/usr.sbin/afs/libexec/Makefile @@ -0,0 +1,5 @@ +# $OpenBSD: Makefile,v 1.1 2002/06/07 05:02:58 hin Exp $ + +SUBDIR= afsd + +.include <bsd.subdir.mk> diff --git a/usr.sbin/afs/libexec/afsd/Makefile b/usr.sbin/afs/libexec/afsd/Makefile new file mode 100644 index 00000000000..4b817410fd3 --- /dev/null +++ b/usr.sbin/afs/libexec/afsd/Makefile @@ -0,0 +1,44 @@ +# $OpenBSD: Makefile,v 1.1 2002/06/07 05:02:58 hin Exp $ + +AFSTOPDIR= ../.. +.include <../../Makefile.inc> + +PROG = afsd +MAN = afsd.8 CellServDB.5 ThisCell.5 SuidCells.5 +BINDIR = /usr/libexec +LDADD += ${LIBARLA} ${LIBROKEN} -lkafs -lkrb +DPADD += ${LIBARLA} ${LIBROKEN} + +CFLAGS += -I${AFSSRC}/util -I${AFSSRC}/arlad \ + -I${AFSSRC} -I${DESTDIR}/usr/include/kerberosIV + +SRCS = adir.c \ + arla.c \ + arlad.c \ + arladeb.c \ + arladebu.c \ + bsd-subr.c \ + cmcb.c \ + conn.c \ + cred.c \ + darla.c \ + discon_log.c \ + dynroot.c \ + fcache.c \ + fprio.c \ + inter.c \ + kernel.c \ + messages.c \ + reconnect.c \ + subr.c \ + volcache.c \ + xfs.c + +.PATH: ${AFSSRC}/arlad + +# XXX This is a kludge but i don't know how to handle this +afsd.8: + ln -s ${AFSSRC}/arlad/arlad.8 afsd.8 +CLEANFILES+=afsd.8 fbuf.h fdir.h afs_dir.h + +.include <bsd.prog.mk> diff --git a/usr.sbin/afs/usr.sbin/Makefile b/usr.sbin/afs/usr.sbin/Makefile new file mode 100644 index 00000000000..a995ff1bfe1 --- /dev/null +++ b/usr.sbin/afs/usr.sbin/Makefile @@ -0,0 +1,5 @@ +# $OpenBSD: Makefile,v 1.1 2002/06/07 05:02:58 hin Exp $ + +SUBDIR= fs pts vos bos + +.include <bsd.subdir.mk> diff --git a/usr.sbin/afs/usr.sbin/bos/Makefile b/usr.sbin/afs/usr.sbin/bos/Makefile new file mode 100644 index 00000000000..2102293247f --- /dev/null +++ b/usr.sbin/afs/usr.sbin/bos/Makefile @@ -0,0 +1,28 @@ +# $OpenBSD: Makefile,v 1.1 2002/06/07 05:02:58 hin Exp $ + +AFSTOPDIR = ../.. +.include <../../Makefile.inc> + +PROG = bos +BINDIR = /usr/sbin +MAN = bos.8 +LDADD += ${LIBARLA} ${LIBROKEN} -lkafs -lkrb -lreadline -ldes -lcurses +DPADD += ${LIBARLA} ${LIBROKEN} ${LIBKAFS} + +CFLAGS += -I${AFSSRC}/appl/lib + +SRCS = bos.c \ + bos_adduser.c \ + bos_getrestart.c \ + bos_listhosts.c \ + bos_listusers.c \ + bos_status.c + +.PATH: ${AFSSRC}/appl/bos + +#SRCS += arladebu.c fs_lib.c + +.PATH: ${AFSSRC}/appl/lib +.PATH: ${AFSSRC}/arlad + +.include <bsd.prog.mk> diff --git a/usr.sbin/afs/usr.sbin/fs/Makefile b/usr.sbin/afs/usr.sbin/fs/Makefile new file mode 100644 index 00000000000..93f0f292ded --- /dev/null +++ b/usr.sbin/afs/usr.sbin/fs/Makefile @@ -0,0 +1,21 @@ +# $OpenBSD: Makefile,v 1.1 2002/06/07 05:02:58 hin Exp $ + +AFSTOPDIR = ../.. +.include <../../Makefile.inc> + +PROG = fs +BINDIR = /usr/sbin +LDADD += ${LIBARLA} ${LIBROKEN} -lkafs -lkrb -lreadline -ldes -lcurses +DPADD += ${LIBARLA} ${LIBROKEN} ${LIBKAFS} + +CFLAGS += -I${AFSSRC}/appl/lib + +SRCS = fs.c +.PATH: ${AFSSRC}/appl/fs + +SRCS += arladebu.c fs_lib.c + +.PATH: ${AFSSRC}/appl/lib +.PATH: ${AFSSRC}/arlad + +.include <bsd.prog.mk> diff --git a/usr.sbin/afs/usr.sbin/pts/Makefile b/usr.sbin/afs/usr.sbin/pts/Makefile new file mode 100644 index 00000000000..332ff6f4859 --- /dev/null +++ b/usr.sbin/afs/usr.sbin/pts/Makefile @@ -0,0 +1,19 @@ +# $OpenBSD: Makefile,v 1.1 2002/06/07 05:02:58 hin Exp $ + +AFSTOPDIR = ../.. +.include <../../Makefile.inc> + +PROG = pts +SRCS = pts.c +LDADD += ${LIBARLA} ${LIBROKEN} -lkafs -lkrb -lreadline -ldes -lcurses +DPADD += ${LIBARLA} ${LIBROKEN} ${LIBKAFS} + +.PATH: ${AFSSRCDIR}/appl/pts + +SRCS += arlalib.c fs_lib.c +CFLAGS += -I${AFSSRC}/appl/lib +.PATH: ${AFSSRC}/appl/lib +.PATH: ${AFSSRC}/appl/pts +.PATH: ${AFSSRC}/arlad + +.include <bsd.prog.mk> diff --git a/usr.sbin/afs/usr.sbin/vos/Makefile b/usr.sbin/afs/usr.sbin/vos/Makefile new file mode 100644 index 00000000000..ef0a0dc01f4 --- /dev/null +++ b/usr.sbin/afs/usr.sbin/vos/Makefile @@ -0,0 +1,24 @@ +# $OpenBSD: Makefile,v 1.1 2002/06/07 05:02:59 hin Exp $ + +AFSTOPDIR = ../.. +.include <../../Makefile.inc> + +PROG = vos +MAN = vos.8 +BINDIR = /usr/sbin +SRCS = vos.c vos_common.c vos_createentry.c vos_createvolume.c \ + vos_dump.c vos_endtrans.c vos_examine.c vos_listpart.c \ + vos_listvldb.c vos_listvol.c vos_lock.c vos_partinfo.c \ + vos_status.c vos_syncsite.c vos_unlock.c vos_vldbexamine.c \ + vos_backup.c + +LDADD += ${LIBARLA} ${LIBROKEN} -lkafs -lkrb -lreadline -ldes -lcurses +DPADD += ${LIBARLA} ${LIBROKEN} ${LIBKAFS} + +.PATH: ${AFSSRC}/appl/vos + +CFLAGS += -I${AFSSRC}/appl/lib -I../libarla +.PATH: ${AFSSRC}/appl/lib +.PATH: ${AFSSRC}/arlad + +.include <bsd.prog.mk> diff --git a/usr.sbin/afs/usr.sbin/ydr/Makefile b/usr.sbin/afs/usr.sbin/ydr/Makefile new file mode 100644 index 00000000000..bd6bf5cb5d9 --- /dev/null +++ b/usr.sbin/afs/usr.sbin/ydr/Makefile @@ -0,0 +1,33 @@ +# $OpenBSD: Makefile,v 1.1 2002/06/07 05:02:59 hin Exp $ + +AFSTOPDIR= ../.. +.include <../../Makefile.inc> + +SRCS += main.c output.c symbol.c types.c lex.c parse.c list.c hash.c +CLEANFILES += lex.c parse.c parse.h y.tab.h +CFLAGS += -DCPP='"/usr/bin/cpp"' +MAN = +BINDIR = ${DESTDIR}/usr/bin +PROG = ydr +LDADD += ${LIBROKEN} +DPADD += ${LIBROKEN} + +CFLAGS += -I${AFSSRC}/util -I. + +.PATH: ${AFSSRC}/ydr ${AFSSRC}/util + +beforedepend: parse.h + +parse.h: y.tab.h + -@ln -s y.tab.h parse.h + +y.tab.h: parse.c + +lex.o: parse.h + +.if (${MACHINE_ARCH} == "m68k") +output.o: output.c + ${CC} -c ${CFLAGS} -O1 ${.IMPSRC} +.endif + +.include <bsd.prog.mk> |