srcdir=@srcdir@
include @TOP_OBJDIR@/src/config/Makefile.config
-
-CFLAGS=-I. -I${srcdir} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I. -I${TOP_INCDIR} ${XCFLAGS}
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
LIBOBJS=disk.o remote.o beacon.o recovery.o ubik.o vote.o lock.o phys.o \
ubik_int.cs.o ubik_int.ss.o ubik_int.xdr.o ubikcmd.o \
- ubikclient.o uerrors.o
+ ubikclient.o uerrors.o uinit.o
INCLS=${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/lock.h \
${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \
${TOP_LIBDIR}/libcom_err.a ${TOP_LIBDIR}/libcmd.a \
${TOP_LIBDIR}/util.a ${TOP_LIBDIR}/libsys.a ${XLIBS}
-all: ukinstall ${TOP_LIBDIR}/libubik.a ${TOP_INCDIR}/ubik.h ${TOP_INCDIR}/ubik_int.h udebug utst_server utst_client
+all: depinstall ${TOP_LIBDIR}/libubik.a udebug utst_server utst_client
+
+generated: \
+ utst_int.cs.c utst_int.ss.c utst_int.xdr.c utst_int.h \
+ Kubik_int.cs.c Kubik_int.xdr.c Kubik_int.h \
+ ubik_int.cs.c ubik_int.ss.c ubik_int.xdr.c ubik_int.h \
+ uerrors.c ubik.h
+
+depinstall: \
+ ubik_int.cs.c ubik_int.xdr.c \
+ ${TOP_INCDIR}/ubik.h \
+ ${TOP_INCDIR}/ubik_int.h
+
+${TOP_LIBDIR}/libubik.a: libubik.a
+ ${INSTALL_DATA} $? $@
+
+${TOP_INCDIR}/ubik.h: ubik.h
+ ${INSTALL_DATA} $? $@
+
+${TOP_INCDIR}/ubik_int.h: ubik_int.h
+ ${INSTALL_DATA} $? $@
utst_server: utst_server.o utst_int.ss.o utst_int.xdr.o libubik.a
${CC} ${CFLAGS} -o utst_server utst_server.o utst_int.ss.o utst_int.xdr.o libubik.a $(LIBS)
${CC} ${CFLAGS} -o udebug udebug.o libubik.a $(LIBS)
ubik_int.cs.c: ubik_int.xg
- ${RXGEN} -x -C -o $@ ${srcdir}/ubik_int.xg
+ ${RXGEN} -A -x -C -o $@ ${srcdir}/ubik_int.xg
ubik_int.ss.c: ubik_int.xg
- ${RXGEN} -x -S -o $@ ${srcdir}/ubik_int.xg
+ ${RXGEN} -A -x -S -o $@ ${srcdir}/ubik_int.xg
ubik_int.xdr.c: ubik_int.xg
- ${RXGEN} -x -c -o $@ ${srcdir}/ubik_int.xg
+ ${RXGEN} -A -x -c -o $@ ${srcdir}/ubik_int.xg
ubik_int.h: ubik_int.xg
- ${RXGEN} -x -h -o $@ ${srcdir}/ubik_int.xg
+ ${RXGEN} -A -x -h -o $@ ${srcdir}/ubik_int.xg
ubik_int.cs.c: ubik_int.h
ubik_int.ss.c: ubik_int.h
ubik_int.xdr.c: ubik_int.h
Kubik_int.cs.c: ubik_int.xg Kubik_int.h
- ${RXGEN} -x -k -C -o Kubik_int.cs.c ${srcdir}/ubik_int.xg
-
+ ${RXGEN} -A -x -k -C -o Kubik_int.cs.c ${srcdir}/ubik_int.xg
+
Kubik_int.xdr.c: ubik_int.xg
- ${RXGEN} -x -k -c -o Kubik_int.xdr.c ${srcdir}/ubik_int.xg
-
+ ${RXGEN} -A -x -k -c -o Kubik_int.xdr.c ${srcdir}/ubik_int.xg
+
Kubik_int.h: ubik_int.xg
- ${RXGEN} -x -k -h -o Kubik_int.h ${srcdir}/ubik_int.xg
+ ${RXGEN} -A -x -k -h -o Kubik_int.h ${srcdir}/ubik_int.xg
utst_int.ss.o: utst_int.ss.c utst_int.xdr.c
utst_int.cs.o: utst_int.cs.c utst_int.xdr.c
utst_int.xdr.o: utst_int.xdr.c utst_int.h
utst_int.cs.c: utst_int.xg
- ${RXGEN} -C -o $@ ${srcdir}/utst_int.xg
+ ${RXGEN} -A -C -u -o $@ ${srcdir}/utst_int.xg
utst_int.ss.c: utst_int.xg
- ${RXGEN} -S -o $@ ${srcdir}/utst_int.xg
+ ${RXGEN} -A -S -o $@ ${srcdir}/utst_int.xg
utst_int.xdr.c: utst_int.xg
- ${RXGEN} -c -o $@ ${srcdir}/utst_int.xg
+ ${RXGEN} -A -c -o $@ ${srcdir}/utst_int.xg
utst_int.h: utst_int.xg
- ${RXGEN} -h -o $@ ${srcdir}/utst_int.xg
+ ${RXGEN} -A -h -u -o $@ ${srcdir}/utst_int.xg
utst_int.cs.c: utst_int.h
utst_int.ss.c: utst_int.h
utst_client.o: utst_client.c ${INCLS} utst_int.h AFS_component_version_number.c
udebug.o: udebug.c ${INCLS} AFS_component_version_number.c
- ${CC} ${CFLAGS} $(DBG) -I. -I${TOP_INCDIR} -I${TOP_INCDIR}/afs -c ${srcdir}/udebug.c
+ ${CC} ${CFLAGS} -I${TOP_INCDIR} -I${TOP_INCDIR}/afs -c ${srcdir}/udebug.c
uerrors.o: uerrors.c
$(RANLIB) $@
disk.o: disk.c ${INCLS}
+uinit.o: uinit.c ${INCLS}
remote.o: remote.c ${INCLS}
+
+# beacon.c uses signed and unsigned interchangably for IP addresses. Fixing
+# will require changing the Ubik API
beacon.o: beacon.c ${INCLS}
+ $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
+
lock.o: lock.c ${INCLS}
recovery.o: recovery.c ${INCLS}
ubik.o: ubik.c ${INCLS}
#
test: all
-install: \
- ${DESTDIR}${libdir}/libubik.a \
- ${DESTDIR}${includedir}/ubik.h \
- ${DESTDIR}${includedir}/ubik_int.h \
- ${DESTDIR}${bindir}/udebug \
- ${DESTDIR}${afssrvbindir}/udebug
-
-${DEST}/bin/udebug ${DEST}/root.server/usr/afs/bin/udebug: udebug
- ${INSTALL} $? $@
-
-${DEST}/lib/libubik.a: libubik.a
- ${INSTALL} $? $@
-
-${DEST}/include/ubik.h: ubik.h
- ${INSTALL} $? $@
-
-${DEST}/include/ubik_int.h: ubik_int.h
- ${INSTALL} $? $@
-
-ukinstall: ${UKERNELDIR}/afs ${UKERNELDIR}/afsint \
- ${UKERNELDIR}/afsint/ubik_int.h \
- ${UKERNELDIR}/afsint/ubik_int.cs.c \
- ${UKERNELDIR}/afsint/ubik_int.xdr.c \
- ${UKERNELDIR}/afs/ubik.h \
- ${UKERNELDIR}/afs/ubikclient.c \
- ${UKERNELDIR}/afs/uerrors.c
-
-${UKERNELDIR}/afs:
- mkdir -p $@
-
-${UKERNELDIR}/afsint:
- mkdir -p $@
-
-${UKERNELDIR}/afsint/ubik_int.h: Kubik_int.h
- ${INSTALL} $? $@
-
-${UKERNELDIR}/afsint/ubik_int.cs.c: Kubik_int.cs.c
- ${INSTALL} $? $@
-
-${UKERNELDIR}/afsint/ubik_int.xdr.c: Kubik_int.xdr.c
- ${INSTALL} $? $@
-
-${UKERNELDIR}/afs/ubik.h: ubik.h
- ${INSTALL} $? $@
-
-${UKERNELDIR}/afs/ubikclient.c: ubikclient.c
- ${INSTALL} $? $@
-
-${UKERNELDIR}/afs/uerrors.c: uerrors.c
- ${INSTALL} $? $@
+install: libubik.a ubik.h ubik_int.h udebug
+ ${INSTALL} -d ${DESTDIR}${libdir}
+ ${INSTALL} -d ${DESTDIR}${includedir}
+ ${INSTALL} -d ${DESTDIR}${bindir}
+ ${INSTALL} -d ${DESTDIR}${afssrvbindir}
+ ${INSTALL_DATA} libubik.a ${DESTDIR}${libdir}/libubik.a
+ ${INSTALL_DATA} ubik.h ${DESTDIR}${includedir}/ubik.h
+ ${INSTALL_DATA} ubik_int.h ${DESTDIR}${includedir}/ubik_int.h
+ ${INSTALL_PROGRAM} udebug ${DESTDIR}${bindir}/udebug
+ ${INSTALL_PROGRAM} udebug ${DESTDIR}${afssrvbindir}/udebug
+
+dest: libubik.a ubik.h ubik_int.h udebug
+ ${INSTALL} -d ${DEST}/lib
+ ${INSTALL} -d ${DEST}/include
+ ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
+ ${INSTALL_DATA} libubik.a ${DEST}/lib/libubik.a
+ ${INSTALL_DATA} ubik.h ${DEST}/include/ubik.h
+ ${INSTALL_DATA} ubik_int.h ${DEST}/include/ubik_int.h
+ ${INSTALL_PROGRAM} udebug ${DEST}/bin/udebug
+ ${INSTALL_PROGRAM} udebug ${DEST}/root.server/usr/afs/bin/udebug
#
# Misc. targets
$(RM) -f utst_int.h ubik_int.h uerrors.c ubik.h core AFS_component_version_number.c Kubik_int.h
include ../config/Makefile.version
-
-
-${DESTDIR}${libdir}/libubik.a: libubik.a
- ${INSTALL} $? $@
-
-${TOP_LIBDIR}/libubik.a: libubik.a
- ${INSTALL} $? $@
-
-${DESTDIR}${includedir}/ubik.h: ubik.h
- ${INSTALL} $? $@
-
-${TOP_INCDIR}/ubik.h: ubik.h
- ${INSTALL} $? $@
-
-${DESTDIR}${includedir}/ubik_int.h: ubik_int.h
- ${INSTALL} $? $@
-
-${TOP_INCDIR}/ubik_int.h: ubik_int.h
- ${INSTALL} $? $@
-
-${DESTDIR}${bindir}/udebug: udebug
- ${INSTALL} $? $@
-
-${DESTDIR}${afssrvbindir}/udebug: udebug
- ${INSTALL} $? $@
-
-dest: \
- ${DEST}/lib/libubik.a \
- ${DEST}/include/ubik.h \
- ${DEST}/include/ubik_int.h \
- ${DEST}/bin/udebug \
- ${DEST}/root.server/usr/afs/bin/udebug
-