libtool: Serialize building libfoo.la and libfoo.a
[openafs.git] / src / libafsauthent / Makefile.in
index 51ecccc..adc8850 100644 (file)
 srcdir=@srcdir@
 include @TOP_OBJDIR@/src/config/Makefile.config
 include @TOP_OBJDIR@/src/config/Makefile.libtool
-include @TOP_OBJDIR@/src/config/Makefile.pthread
+
+# Increment these according to libtool's versioning rules (look them up!)
+# The output library looks like libafsauthen.<current - age>.<revision>
+LT_current = 2
+LT_revision = 0
+LT_age = 0
 
 LT_objs = \
-       $(top_builddir)/src/audit/libauthent_audit.la \
-       $(top_builddir)/src/auth/libauthent_auth.la   \
-       $(top_builddir)/src/kauth/libauthent_kauth.la \
+       $(top_builddir)/src/audit/libaudit_pic.la \
+       $(top_builddir)/src/auth/libauth_pic.la   \
+       $(top_builddir)/src/kauth/libkauth_pic.la \
        $(top_builddir)/src/ubik/libauthent_ubik.la \
-       $(top_builddir)/src/sys/libauthent_sys.la \
-       $(top_builddir)/src/ptserver/libauthent_ptserver.la \
-       $(top_builddir)/src/volser/libauthent_volser.la \
-       $(top_builddir)/src/vlserver/libauthent_vlserver.la
+       $(top_builddir)/src/sys/libsys_pic.la \
+       $(top_builddir)/src/ptserver/libprot_pic.la \
+       $(top_builddir)/src/volser/libvolser_pic.la \
+       $(top_builddir)/src/vlserver/libvlserver_pic.la \
+       $(top_builddir)/src/opr/libopr_pic.la \
+       $(top_builddir)/src/util/libafsutil_pic.la
 
 LT_deps = \
-       $(top_builddir)/src/opr/liboafs_opr.la \
-       $(top_builddir)/src/util/liboafs_util.la \
        $(top_builddir)/src/libafsrpc/libafsrpc.la
 
 LT_libs = $(LIB_hcrypto) $(LIB_roken) $(LIB_crypt) $(LIB_AFSDB) $(MT_LIBS)
 
-all: libafsauthent.la libafsauthent_pic.la \
+@SHARED_ONLY@SHARED_LIBS = libafsauthent.la
+
+all: $(SHARED_LIBS) libafsauthent_pic.la \
        $(TOP_LIBDIR)/libafsauthent.a \
        $(TOP_LIBDIR)/libafsauthent_pic.a
 
-libafsauthent.la: libafsauthent.la.sym $(LT_objs) $(LT_deps) libafsauthent_pic.la
-       $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
+libafsauthent.la: libafsauthent.la.sym $(LT_objs) $(LT_deps) libafsauthent_pic.la libafsauthent.a
+       $(LT_LDLIB_shlib_only) $(LT_objs) $(LT_deps) $(LT_libs)
 
 libafsauthent_pic.la: $(LT_objs)
        $(LT_LDLIB_pic) $(LT_objs)
 
+# On AIX, libtool can only produce one of shared and static libraries in a
+# given invocation, so we need separate rules.
 libafsauthent.a: $(LT_objs)
        $(LT_LDLIB_static) $(LT_objs)
 
@@ -52,10 +61,12 @@ clean:
        $(LT_CLEAN)
        $(RM) -f *.o libafsauthent.a
 
-install: libafsauthent.la libafsauthent_pic.la
+install: $(SHARED_LIBS) libafsauthent.a libafsauthent_pic.la
        ${INSTALL} -d ${DESTDIR}${libdir}
-       ${LT_INSTALL_DATA} libafsauthent.la ${DESTDIR}${libdir}/libafsauthent.la
-       ${INSTALL_DATA}  libafsauthent_pic.a ${DESTDIR}${libdir}/libafsauthent_pic.a
+       @SHARED_ONLY@${LT_INSTALL_DATA} libafsauthent.la ${DESTDIR}${libdir}/libafsauthent.la
+       @SHARED_ONLY@${RM} ${DESTDIR}${libdir}/libafsauthent.la
+       ${INSTALL_DATA}  libafsauthent.a ${DESTDIR}${libdir}/libafsauthent.a
+       ${INSTALL_DATA}  .libs/libafsauthent_pic.a ${DESTDIR}${libdir}/libafsauthent_pic.a
 
 dest: libafsauthent.a
        ${INSTALL} -d ${DEST}/lib