From bdfe025b646036788095e39159e0566bb32007fa Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Thu, 24 May 2012 10:26:21 +0100 Subject: [PATCH] usd: Convert to using libtool Turn the libusd library into a libtool object (it has no pthread/LWP differences, and so can just become a pthreaded library), and include it as such in butc and the volser. liboafs_usd.la is the libtool object, libusd.a is preserved as a static object for backwards compatibility. Change-Id: I25c3d0f429415527fe529c3d3e5afbad9490ea45 Reviewed-on: http://gerrit.openafs.org/8057 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- src/dvolser/Makefile.in | 2 +- src/tbutc/Makefile.in | 2 +- src/tvolser/Makefile.in | 2 +- src/usd/Makefile.in | 19 ++++++++++++------- src/usd/liboafs_usd.la.sym | 3 +++ 5 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 src/usd/liboafs_usd.la.sym diff --git a/src/dvolser/Makefile.in b/src/dvolser/Makefile.in index 8d4664e..19b5253 100644 --- a/src/dvolser/Makefile.in +++ b/src/dvolser/Makefile.in @@ -45,7 +45,7 @@ LIBS= $(top_builddir)/src/cmd/liboafs_cmd.la \ ${TOP_LIBDIR}/libafsrpc.a \ $(top_builddir)/src/util/liboafs_util.la \ $(top_builddir)/src/opr/liboafs_opr.la \ - ${TOP_LIBDIR}/libusd.a + $(top_builddir)/src/usd/liboafs_usd.la all: davolserver diff --git a/src/tbutc/Makefile.in b/src/tbutc/Makefile.in index 0b81558..6f5d90a 100644 --- a/src/tbutc/Makefile.in +++ b/src/tbutc/Makefile.in @@ -58,7 +58,7 @@ BUTCLIBS=${TOP_LIBDIR}/libbudb.a \ $(top_builddir)/src/cmd/liboafs_cmd.la \ $(top_builddir)/src/util/liboafs_util.la \ $(top_builddir)/src/opr/liboafs_opr.la \ - ${TOP_LIBDIR}/libusd.a \ + $(top_builddir)/src/usd/liboafs_usd.la \ ${TOP_LIBDIR}/libprocmgmt.a # diff --git a/src/tvolser/Makefile.in b/src/tvolser/Makefile.in index 713fccf..e022ef9 100644 --- a/src/tvolser/Makefile.in +++ b/src/tvolser/Makefile.in @@ -50,7 +50,7 @@ LIBS_common = \ $(top_builddir)/src/cmd/liboafs_cmd.la \ ${TOP_LIBDIR}/libafsauthent.a \ $(top_builddir)/src/util/liboafs_util.la \ - ${TOP_LIBDIR}/libusd.a \ + $(top_builddir)/src/usd/liboafs_usd.la \ ${TOP_LIBDIR}/libafsrpc.a \ $(top_builddir)/src/opr/liboafs_opr.la diff --git a/src/usd/Makefile.in b/src/usd/Makefile.in index e02bc8f..c4249bb 100644 --- a/src/usd/Makefile.in +++ b/src/usd/Makefile.in @@ -7,10 +7,13 @@ srcdir=@srcdir@ include @TOP_OBJDIR@/src/config/Makefile.config -include @TOP_OBJDIR@/src/config/Makefile.lwp +include @TOP_OBJDIR@/src/config/Makefile.libtool +include @TOP_OBJDIR@/src/config/Makefile.pthread +LT_objs = usd_file.lo AFS_component_version_number.lo +LT_deps = $(top_builddir)/src/opr/liboafs_opr.la -all: ${TOP_LIBDIR}/libusd.a ${TOP_INCDIR}/afs/usd.h +all: liboafs_usd.la ${TOP_LIBDIR}/libusd.a ${TOP_INCDIR}/afs/usd.h ${TOP_LIBDIR}/libusd.a: libusd.a ${INSTALL_DATA} $? $@ @@ -21,12 +24,13 @@ ${TOP_INCDIR}/afs/usd.h: usd.h # # Build targets # -libusd.a: usd_file.o AFS_component_version_number.o - $(RM) -f $@ - $(AR) crv $@ usd_file.o AFS_component_version_number.o - $(RANLIB) $@ +liboafs_usd.la: liboafs_usd.la.sym $(LT_objs) $(LT_deps) + $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs) -usd_file.o: usd_file.c usd.h +libusd.a: $(LT_objs) + $(LT_LDLIB_static) $(LT_objs) + +usd_file.lo: usd.h # # Installation targets @@ -47,6 +51,7 @@ dest: libusd.a usd.h # Misc. targets # clean: + $(LT_CLEAN) $(RM) -f *.o libusd.a core AFS_component_version_number.c include ../config/Makefile.version diff --git a/src/usd/liboafs_usd.la.sym b/src/usd/liboafs_usd.la.sym new file mode 100644 index 0000000..e284928 --- /dev/null +++ b/src/usd/liboafs_usd.la.sym @@ -0,0 +1,3 @@ +usd_StandardInput +usd_StandardOutput +usd_Open -- 1.9.4