include @TOP_OBJDIR@/src/config/Makefile.config
include @TOP_OBJDIR@/src/config/Makefile.pthread
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
HELPER_SPLINT=@HELPER_SPLINT@
+ENABLE_PTHREADED_UBIK=@ENABLE_PTHREADED_UBIK@
UBIK=$(srcdir)/../ubik
-RX=$(srcdir)/../rx
-UTIL=$(srcdir)/../util
-
-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 uinit.o
INCLS=${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/lock.h \
${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \
${TOP_INCDIR}/lock.h ubik.h ubik_int.h utst_int.h
-RXOBJS = rx_pthread.o
-
-UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o \
- volparse.o flipbase64.o softsig.o hostparse.o pthread_glock.o
-
-LIBS=${RXOBJS} ${UTILOBJS} ${TOP_LIBDIR}/libafsauthent.a ${TOP_LIBDIR}/libafsrpc.a \
- ${TOP_LIBDIR}/libcom_err.a ${TOP_LIBDIR}/libcmd.a \
- ${TOP_LIBDIR}/libsys.a ${XLIBS} ${MT_LIBS}
-
-all: depinstall ${TOP_LIBDIR}/libubik_pthread.a udebug utst_server utst_client
-
-depinstall: \
- ubik_int.cs.c ubik_int.xdr.c \
- ${TOP_INCDIR}/ubik.h \
- ${TOP_INCDIR}/ubik_int.h
-
-#
-# get the pthreaded rx stuff compiled here
-#
-
-CFLAGS_rx_pthread.o = -DDPF_FSLOG
-rx_pthread.o: ${RX}/rx_pthread.c
- $(AFS_CCRULE) $(RX)/rx_pthread.c
-
-#
-# get the pthreaded util stuff compiled here. we do this instead of
-# using the non-pthreaded libutil.a. There probably should be a
-# pthreaded version of this library, as we are doing with ubik itself, but...
-#
-
-assert.o: ${UTIL}/assert.c
- $(AFS_CCRULE) $(UTIL)/assert.c
-
-uuid.o: ${UTIL}/uuid.c
- $(AFS_CCRULE) $(UTIL)/uuid.c
-
-serverLog.o: ${UTIL}/serverLog.c
- $(AFS_CCRULE) $(UTIL)/serverLog.c
+LTLIBS=@TOP_OBJDIR@/src/util/liboafs_util.la \
+ @TOP_OBJDIR@/src/ubik/liboafs_ubik.la \
+ @TOP_OBJDIR@/src/cmd/liboafs_cmd.la
-fileutil.o: ${UTIL}/fileutil.c
- $(AFS_CCRULE) $(UTIL)/fileutil.c
-
-volparse.o: ${UTIL}/volparse.c
- $(AFS_CCRULE) $(UTIL)/volparse.c
-
-flipbase64.o: ${UTIL}/flipbase64.c
- $(AFS_CCRULE) $(UTIL)/flipbase64.c
-
-netutils.o: ${UTIL}/netutils.c
- $(AFS_CCRULE) $(UTIL)/netutils.c
-
-dirpath.o: ${UTIL}/dirpath.c
- $(AFS_CCRULE) $(UTIL)/dirpath.c
-
-softsig.o: ${UTIL}/softsig.c
- $(AFS_CCRULE) $(UTIL)/softsig.c
-
-hostparse.o: ${UTIL}/hostparse.c
- $(AFS_CCRULE) $(UTIL)/hostparse.c
-
-pthread_glock.o: ${UTIL}/pthread_glock.c
- $(AFS_CCRULE) $(UTIL)/pthread_glock.c
+all: udebug utst_server utst_client
#
# insert comments here
#
-utst_server: utst_server.o utst_int.ss.o utst_int.xdr.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
- $(AFS_LDRULE) utst_server.o utst_int.ss.o utst_int.xdr.o \
- libubik_pthread.a $(LIBS) $(LIB_hcrypto) $(LIB_roken)
-
-utst_client: utst_client.o utst_int.cs.o utst_int.xdr.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
- $(AFS_LDRULE) utst_client.o utst_int.cs.o utst_int.xdr.o \
- libubik_pthread.a $(LIBS) $(LIB_hcrypto) $(LIB_roken)
-
-udebug: udebug.o libubik_pthread.a ${RXOBJS} ${UTILOBJS}
- $(AFS_LDRULE) udebug.o libubik_pthread.a \
- $(LIBS) $(LIB_hcrypto) $(LIB_roken)
-
-ubik_int.cs.c: ${UBIK}/ubik_int.xg
- ${RXGEN} -A -x -C -o $@ ${UBIK}/ubik_int.xg
-
-ubik_int.ss.c: ${UBIK}/ubik_int.xg
- ${RXGEN} -A -x -S -o $@ ${UBIK}/ubik_int.xg
-
-ubik_int.xdr.c: ${UBIK}/ubik_int.xg
- ${RXGEN} -A -x -c -o $@ ${UBIK}/ubik_int.xg
-
-ubik_int.h: ${UBIK}/ubik_int.xg
- ${RXGEN} -A -x -h -o $@ ${UBIK}/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}/ubik_int.xg Kubik_int.h
- ${RXGEN} -A -x -k -C -o Kubik_int.cs.c ${UBIK}/ubik_int.xg
-
-Kubik_int.xdr.c: ${UBIK}/ubik_int.xg
- ${RXGEN} -A -x -k -c -o Kubik_int.xdr.c ${UBIK}/ubik_int.xg
-
-Kubik_int.h: ${UBIK}/ubik_int.xg
- ${RXGEN} -A -x -k -h -o Kubik_int.h ${UBIK}/ubik_int.xg
-
utst_int.ss.o: utst_int.ss.c
utst_int.cs.o: utst_int.cs.c
utst_int.xdr.o: utst_int.xdr.c
utst_client.o: ${UBIK}/utst_client.c
${AFS_CCRULE} ${UBIK}/utst_client.c
-udebug.o: ${UBIK}/udebug.c
- ${AFS_CCRULE} ${UBIK}/udebug.c
-
-uerrors.c ubik.h: ${UBIK}/uerrors.et ${UBIK}/ubik.p.h
- $(RM) -f ubik.h uerrors.c
- ${COMPILE_ET} -p ${UBIK} uerrors -h ubik
-
-libubik_pthread.a: ${INCLS} ${LIBOBJS} AFS_component_version_number.o
- -$(RM) -f $@
- $(AR) crc $@ ${LIBOBJS} AFS_component_version_number.o
- $(RANLIB) $@
-
-disk.o: ${UBIK}/disk.c
- $(AFS_CCRULE) $(UBIK)/disk.c
-
-uinit.o: ${UBIK}/uinit.c
- $(AFS_CCRULE) $(UBIK)/uinit.c
-
-remote.o: ${UBIK}/remote.c
- $(AFS_CCRULE) $(UBIK)/remote.c
+utst_server: utst_server.o utst_int.ss.o utst_int.xdr.o $(LTLIBS)
+ $(LT_LDRULE_static) utst_server.o utst_int.ss.o utst_int.xdr.o \
+ $(LTLIBS) $(LIBS) $(LIB_hcrypto) $(LIB_roken)
-beacon.o: ${UBIK}/beacon.c
- $(AFS_CCRULE) $(UBIK)/beacon.c
+utst_client: utst_client.o utst_int.cs.o utst_int.xdr.o $(LTLIBS)
+ $(LT_LDRULE_static) utst_client.o utst_int.cs.o utst_int.xdr.o \
+ $(LTLIBS) $(LIBS) $(LIB_hcrypto) $(LIB_roken)
-lock.o: ${UBIK}/lock.c
- $(AFS_CCRULE) $(UBIK)/lock.c
-
-recovery.o: ${UBIK}/recovery.c
- $(AFS_CCRULE) $(UBIK)/recovery.c
-
-ubik.o: ${UBIK}/ubik.c
- $(AFS_CCRULE) $(UBIK)/ubik.c
-
-phys.o: ${UBIK}/phys.c
- $(AFS_CCRULE) $(UBIK)/phys.c
-
-vote.o: ${UBIK}/vote.c
- $(AFS_CCRULE) $(UBIK)/vote.c
-
-ubikcmd.o: ${UBIK}/ubikcmd.c
- $(AFS_CCRULE) $(UBIK)/ubikcmd.c
+udebug.o: ${UBIK}/udebug.c
+ ${AFS_CCRULE} ${UBIK}/udebug.c
-ubikclient.o: ${UBIK}/ubikclient.c
- $(AFS_CCRULE) $(UBIK)/ubikclient.c
-ubik_int.xdr.o: ubik_int.xdr.c
+udebug: udebug.o $(LTLIBS)
+ $(LT_LDRULE_static) udebug.o \
+ $(LTLIBS) $(LIBS) $(LIB_hcrypto) $(LIB_roken)
#
# Installation targets
#
test: all
-install: ${DESTDIR}${libdir}/libubik_pthread.a udebug
- ${INSTALL} udebug ${DESTDIR}${bindir}/udebug
- ${INSTALL} udebug ${DESTDIR}${afssrvbindir}/udebug
-
-${DEST}/bin/udebug ${DEST}/root.server/usr/afs/bin/udebug: udebug
- ${INSTALL} $? $@
-
-${DEST}/lib/libubik_pthread.a: libubik_pthread.a
- ${INSTALL} $? $@
-
-${DEST}/include/ubik.h: ubik.h
- ${INSTALL} $? $@
-
-${DEST}/include/ubik_int.h: ubik_int.h
- ${INSTALL} $? $@
-
+install: udebug
+ ${INSTALL} -d ${DESTDIR}${bindir}
+ ${INSTALL} -d ${DESTDIR}${afssrvbindir}
+ if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then \
+ $(LT_INSTALL_PROGRAM) udebug ${DESTDIR}${bindir}/udebug; \
+ $(LT_INSTALL_PROGRAM) udebug ${DESTDIR}${afssrvbindir}/udebug; \
+ fi
+
+dest: udebug
+ ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
+ if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then \
+ ${INSTALL_PROGRAM} udebug ${DEST}/bin/udebug; \
+ ${INSTALL_PROGRAM} udebug ${DEST}/root.server/usr/afs/bin/udebug; \
+ fi
#
# Misc. targets
#
clean:
+ $(LT_CLEAN)
$(RM) -f *.o utst_server utst_client udebug *.a *.cs.c *.ss.c *.xdr.c
- $(RM) -f utst_int.h ubik_int.h uerrors.c ubik.h core AFS_component_version_number.c Kubik_int.h
+ $(RM) -f utst_int.h core AFS_component_version_number.c
include ../config/Makefile.version
-
-
-${DESTDIR}${libdir}/libubik_pthread.a: libubik_pthread.a
- ${INSTALL} $? $@
-
-${TOP_LIBDIR}/libubik_pthread.a: libubik_pthread.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} $? $@
-
-dest: \
- ${DEST}/lib/libubik_pthread.a \
- ${DEST}/bin/udebug \
- ${DEST}/root.server/usr/afs/bin/udebug
-