cmd: Convert to using libtool
[openafs.git] / src / tubik / Makefile.in
index 2eda848..ed95b20 100644 (file)
@@ -10,6 +10,7 @@ include @TOP_OBJDIR@/src/config/Makefile.config
 include @TOP_OBJDIR@/src/config/Makefile.pthread
 
 HELPER_SPLINT=@HELPER_SPLINT@
+ENABLE_PTHREADED_UBIK=@ENABLE_PTHREADED_UBIK@
 
 UBIK=$(srcdir)/../ubik
 RX=$(srcdir)/../rx
@@ -25,12 +26,16 @@ INCLS=${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/lock.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
+UTILOBJS=uuid.o serverLog.o fileutil.o dirpath.o \
+       volparse.o flipbase64.o softsig.o hostparse.o pthread_glock.o \
+       pthread_threadname.o
 
 LIBS=${RXOBJS} ${UTILOBJS} ${TOP_LIBDIR}/libafsauthent.a ${TOP_LIBDIR}/libafsrpc.a \
-     ${TOP_LIBDIR}/libafscom_err.a ${TOP_LIBDIR}/libcmd.a \
-     ${TOP_LIBDIR}/libsys.a ${XLIBS} ${MT_LIBS}
+     $(top_builddir)/src/comerr/liboafs_comerr.la \
+     ${top_builddir}/src/cmd/liboafs_cmd.la \
+     ${TOP_LIBDIR}/libsys.a \
+     $(top_builddir)/src/opr/liboafs_opr.la \
+     ${XLIBS} ${MT_LIBS}
 
 all: depinstall ${TOP_LIBDIR}/libubik_pthread.a udebug utst_server utst_client
 
@@ -53,9 +58,6 @@ rx_pthread.o: ${RX}/rx_pthread.c
 # 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
 
@@ -71,9 +73,6 @@ volparse.o: ${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
 
@@ -86,20 +85,23 @@ hostparse.o: ${UTIL}/hostparse.c
 pthread_glock.o: ${UTIL}/pthread_glock.c
        $(AFS_CCRULE) $(UTIL)/pthread_glock.c
 
+pthread_threadname.o: ${UTIL}/pthread_threadname.c
+       $(AFS_CCRULE) $(UTIL)/pthread_threadname.c
+
 #
 # 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 \
+       $(LT_LDRULE_static) 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 \
+       $(LT_LDRULE_static) 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 \
+       $(LT_LDRULE_static) udebug.o libubik_pthread.a \
                $(LIBS) $(LIB_hcrypto) $(LIB_roken)
 
 ubik_int.cs.c: ${UBIK}/ubik_int.xg
@@ -204,52 +206,47 @@ ubik_int.xdr.o: ubik_int.xdr.c
 #
 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: libubik_pthread.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_pthread.a ${DESTDIR}${libdir}/libubik_pthread.a
+       if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then                 \
+           $(LT_INSTALL_PROGRAM) udebug ${DESTDIR}${bindir}/udebug;          \
+           $(LT_INSTALL_PROGRAM) udebug ${DESTDIR}${afssrvbindir}/udebug;    \
+           ${INSTALL_DATA} ubik.h ${DESTDIR}${includedir}/ubik.h;         \
+           ${INSTALL_DATA} ubik_int.h ${DESTDIR}${includedir}/ubik_int.h; \
+       fi
+
+dest: libubik_pthread.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_pthread.a ${DEST}/lib/libubik_pthread.a
+       if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then                    \
+           ${INSTALL_PROGRAM} udebug ${DEST}/bin/udebug;                     \
+           ${INSTALL_PROGRAM} udebug ${DEST}/root.server/usr/afs/bin/udebug; \
+           ${INSTALL_DATA} ubik.h ${DEST}/include/ubik.h;                    \
+           ${INSTALL_DATA} ubik_int.h ${DEST}/include/ubik_int.h;            \
+       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
 
 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