]> git.sur5r.net Git - openldap/commitdiff
Revamp build system yet again to move all external libraries to
authorKurt Zeilenga <kurt@openldap.org>
Thu, 14 Jan 1999 01:31:43 +0000 (01:31 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 14 Jan 1999 01:31:43 +0000 (01:31 +0000)
end of link.    Basic order is:
$LDFLAGS internal-libs external-libs $LIBS $LTHREAD_LIBS

LTHREAD_LIBS is last as -lpthread (or equiv) must be last on many systems.
LIBS is next to last as some user might have put -lpthread (or equiv)
in $LIBS.

18 files changed:
build/top.mk
clients/fax500/Makefile.in
clients/finger/Makefile.in
clients/gopher/Makefile.in
clients/mail500/Makefile.in
clients/rcpt500/Makefile.in
clients/tools/Makefile.in
clients/ud/Makefile.in
libraries/libavl/Makefile.in
libraries/liblber/Makefile.in
libraries/libldap/Makefile.in
libraries/libldap_r/Makefile.in
libraries/libldbm/Makefile.in
libraries/liblthread/Makefile.in
servers/ldapd/Makefile.in
servers/slapd/Makefile.in
servers/slapd/tools/Makefile.in
servers/slurpd/Makefile.in

index 2ca2a0524e42bc0deb481c390ceee510cf5f5093..a237a36ea9a0205770888f1ad2cf17b56f163441 100644 (file)
@@ -85,12 +85,9 @@ LDAP_INCPATH= -I$(LDAP_INCDIR) -I$(INCLUDEDIR)
 LDAP_LIBADIR= $(top_builddir)/libraries
 LDAP_LIBPATH= -L$(LDAP_LIBADIR)
 
-LDAP_LIBLBER = -llber
-LDAP_LIBLDAP = -lldap
-LDAP_LIBLDIF = -lldif
-LDAP_LIBLUTIL = -llutil @LUTIL_LIBS@
-LDAP_LIBLDBM = -lldbm @LDBM_LIBS@
-LDAP_LIBLTHREAD = -llthread @LTHREAD_LIBS@
+LUTIL_LIBS = @LUTIL_LIBS@
+LDBM_LIBS = @LDBM_LIBS@
+LTHREAD_LIBS = @LTHREAD_LIBS@
 
 LDAP_LIBLBER_DEPEND = $(LDAP_LIBDIR)/liblber/liblber.la
 LDAP_LIBLDAP_DEPEND = $(LDAP_LIBDIR)/libldap/libldap.la
@@ -99,10 +96,6 @@ LDAP_LIBLUTIL_DEPEND = $(LDAP_LIBDIR)/liblutil/liblutil.a
 LDAP_LIBLDBM_DEPEND = $(LDAP_LIBDIR)/libldbm/libldbm.a
 LDAP_LIBLTHREAD_DEPEND = $(LDAP_LIBDIR)/liblthread/liblthread.a
 
-LDAP_LIBS = $(LDAP_LIBPATH) $(LDAP_LIBLDIF) \
-       $(LDAP_LIBLDAP) $(LDAP_LIBLBER) \
-       $(LDAP_LIBLUTIL)
-
 LDAP_LIBDEPEND = $(LDAP_LIBLDAP_DEPEND) $(LDAP_LIBLBER_DEPEND) \
        $(LDAP_LIBLDIF_DEPEND) $(LDAP_LIBLUTIL_DEPEND)
 
@@ -123,7 +116,7 @@ SLURPD_LIBS = @SLURPD_LIBS@
 # Our Defaults
 CC = $(AC_CC)
 DEFS = $(LDAP_INCPATH) $(XINCPATH) $(XDEFS) $(AC_DEFS) $(DEFINES)
-LIBS = $(XLIBS) $(AC_LIBS) $(XXLIBS)
+LIBS = $(LDAP_LIBPATH) $(XLIBS) $(XXLIBS) $(AC_LIBS) $(XXXLIBS)
 CFLAGS = $(AC_CFLAGS) $(DEFS)
 LDFLAGS = $(AC_LDFLAGS) $(XLDFLAGS)
 
index ba3d600a71d30c9010f683e89ae278e6af72d98b..1499ab5a7cd811a6ca3e10493d6e70ca39c95f3e 100644 (file)
@@ -9,8 +9,8 @@ RPOBJS =  rp500.o faxtotpc.o
 LDAP_INCDIR= ../../include
 LDAP_LIBDIR= ../../libraries
 
-XLIBS = $(LDAP_LIBS)
-XXLIBS = $(KRB_LIBS)
+XLIBS =  -lldap -llber -llutil
+XXLIBS = $(KRB_LIBS) $(LUTIL_LIBS)
 
 rp500 : rpversion.o
        $(LTLINK) -o $@ $(RPOBJS) rpversion.o $(LIBS)
index 78c6e16535e3d19c4b4c49f53173aed26379b1c3..20a1e0334b7827ac8fb33f361c891b5ae63a0de4 100644 (file)
@@ -6,8 +6,8 @@ PROGRAMS= in.xfingerd
 LDAP_INCDIR= ../../include
 LDAP_LIBDIR= ../../libraries
 
-XLIBS = $(LDAP_LIBS)
-XXLIBS = $(KRB_LIBS)
+XLIBS =  -lldap -llber -llutil
+XXLIBS = $(KRB_LIBS) $(LUTIL_LIBS)
 
 in.xfingerd : version.o
        $(LTLINK) -o $@ version.o $(OBJS) $(LIBS)
index f663f0328b154600ca6c8e030fae075b654a8bf3..588d958f207b417c867ae0ba7e09480c5841ddd6 100644 (file)
@@ -11,8 +11,8 @@ GWOBJS =  go500gw.o
 LDAP_INCDIR= ../../include
 LDAP_LIBDIR= ../../libraries
 
-XLIBS = $(LDAP_LIBS)
-XXLIBS = $(KRB_LIBS)
+XLIBS =  -lldap -llber -llutil
+XXLIBS = $(KRB_LIBS) $(LUTIL_LIBS)
 
 go500 : goversion.o
        $(LTLINK) -o $@ $(GOOBJS) goversion.o $(LIBS)
index da058124bdb269fdf20dbf1a73751cbab4a8940b..0ee8742bfb32a348b032e36b067760c991916564 100644 (file)
@@ -7,8 +7,8 @@ OBJS=   main.o
 LDAP_INCDIR= ../../include
 LDAP_LIBDIR= ../../libraries
 
-XLIBS = $(LDAP_LIBS)
-XXLIBS = $(KRB_LIBS)
+XLIBS =  -lldap -llber -llutil
+XXLIBS = $(KRB_LIBS) $(LUTIL_LIBS)
 
 mail500 : version.o
        $(LTLINK) -o $@ version.o $(OBJS) $(LIBS)
index 8a7edd87dac81421ceaa298212401cb19505feaa..d81d5327e3a94591125dfe681389dee6e2f833dc 100644 (file)
@@ -7,8 +7,8 @@ HDRS= rcpt500.h
 LDAP_INCDIR= ../../include       
 LDAP_LIBDIR= ../../libraries
 
-XLIBS = $(LDAP_LIBS)
-XXLIBS = $(KRB_LIBS)
+XLIBS =  -lldap -llber -llutil
+XXLIBS = $(KRB_LIBS) $(LUTIL_LIBS)
 
 rcpt500 : version.o
        $(LTLINK) -o $@ version.o $(OBJS) $(LIBS)
index 8c2624c4f0babeb11f553ac330bbae3946d1d6a3..e5a01c03655785d3c85fabf62a23d2d0adc4ddb4 100644 (file)
@@ -7,8 +7,8 @@ OBJS    = ldapsearch.o ldapmodify.o ldapdelete.o ldapmodrdn.o ldappasswd.o
 LDAP_INCDIR= ../../include       
 LDAP_LIBDIR= ../../libraries
 
-XLIBS = $(LDAP_LIBS)
-XXLIBS = $(KRB_LIBS)
+XLIBS =  -lldif -lldap -llber -llutil
+XXLIBS = $(KRB_LIBS) $(LUTIL_LIBS)
 
 XSRCS  = ldsversion.c ldmversion.c lddversion.c ldrversion.c
 
@@ -27,7 +27,7 @@ ldapmodrdn:   ldrversion.o
        $(LTLINK) -o $@ ldapmodrdn.o ldrversion.o $(LIBS)
 
 ldappasswd:    ldappasswd.o
-       $(LTLINK) -o $@ ldappasswd.o $(LUTIL_LIBS) $(LIBS)
+       $(LTLINK) -o $@ ldappasswd.o $(LIBS)
 
 ldapadd:       ldapmodify
        $(RM) $@
index 3e2fdcb233a095cc9f448b7e3caa9377fbc2b25e..a6b94a0ae4005537fc445823b6599f01c3aa22e6 100644 (file)
@@ -9,8 +9,8 @@ PROGRAMS= ud
 LDAP_INCDIR= ../../include       
 LDAP_LIBDIR= ../../libraries
 
-XLIBS = $(LDAP_LIBS)
-XXLIBS = $(TERMCAP_LIBS) $(KRB_LIBS)
+XLIBS =  -lldif -lldap -llber -llutil
+XXLIBS = $(TERMCAP_LIBS) $(KRB_LIBS) $(LUTIL_LIBS)
 
 ud : version.o
        $(LTLINK) -o $@ version.o $(OBJS) $(LIBS)
index f6cd83d53058d4badfd66273301aeb3af60a6342..893c780639b02a8eefba0ff20827a6184b498a09 100644 (file)
@@ -11,6 +11,7 @@ LDAP_LIBDIR= ../../libraries
 
 LIBRARY = libavl.a
 PROGRAMS       = testavl
+XLIBS = -lavl
 
 testavl:       $(LIBRARY) testavl.o
-       $(LTLINK) $(LDFLAGS) -o $@ testavl.o $(LDAP_LIBPATH) -lavl $(LIBS)
+       $(LTLINK) $(LDFLAGS) -o $@ testavl.o $(LIBS)
index 7bad9f2edad9e21d8bc5ed9ab43ef9800a42cde3..ef1f8a02c933fa1388538fb4372ebda782725654 100644 (file)
@@ -16,7 +16,8 @@ PROGRAMS= dtest etest idtest
 LDAP_INCDIR= ../../include       
 LDAP_LIBDIR= ../../libraries       
 
-XXLIBS = $(LDAP_LIBPATH) $(LDAP_LIBLBER)
+XLIBS = -llber
+XXLIBS = 
 
 dtest:    $(LIBRARY) dtest.o
        $(LTLINK) $(LDFLAGS) -o $@ dtest.o $(LIBS)
index 1747fc7cdc483f61434e2053fa20cf68fbd7e03f..c1ae6a27af64b785727d453737ba8a7e847a0520 100644 (file)
@@ -28,7 +28,8 @@ OBJS  = bind.lo open.lo result.lo error.lo compare.lo search.lo \
 LDAP_INCDIR= ../../include       
 LDAP_LIBDIR= ../../libraries
 
-XXLIBS = $(LDAP_LIBPATH) $(LDAP_LIBLDAP) $(LDAP_LIBLBER)
+XLIBS = -lldap -llber
+XXLIBS = 
 
 apitest:       $(LIBRARY) apitest.o $(LDAP_LIBLBER_DEPEND)
        $(LTLINK) $(LDFLAGS) -o $@ apitest.o $(LIBS)
index cb28f83d41a8a182f6ebdd356cc2fa62769e0609..044805a25bff7fdfad70c8ffbaebdbf135564cf0 100644 (file)
@@ -27,7 +27,8 @@ LDAP_INCDIR= ../../include
 LDAP_LIBDIR= ../../libraries
 
 XDEFS = -DLDAP_R_COMPILE -I$(XXDIR)
-XXLIBS = $(LDAP_LIBPATH) $(LDAP_LIBLDAP) $(LDAP_LIBLBER)
+XLIBS = -lldap_r -llber
+XXLIBS = 
 
 .links : FORCE
        @for i in $(XXSRCS); do \
index 2aa551c2bc0427d466c26c7251641247e36be97e..c27b26042f672ddc83e1425f09aa73128aa9cf6c 100644 (file)
@@ -10,7 +10,8 @@ OBJS          = ldbm.o
 LDAP_INCDIR= ../../include       
 LDAP_LIBDIR= ../../libraries
 
-XXLIBS         = $(LDBM_LIBS) -lavl
+XLIBS          = -lldbm -lavl
+XXLIBS         = $(LDBM_LIBS)
 
 testldbm:      libldbm.a testldbm.o
        $(CC) $(LDFLAGS) -o $@ testldbm.o $(LIBS)
index ee31b5f17cc5cb8f955b2f5b34d06d340c746816..63da618a704a6b59a32ee031efe54aea7e79c79f 100644 (file)
@@ -10,6 +10,6 @@ OBJS  = rdwr.o thread.o stack.o
 LDAP_INCDIR= ../../include       
 LDAP_LIBDIR= ../../libraries
 
-XLIBS  = $(LTHREAD_LIBS)
-
+XLIBS = -lthread
+XXLIBS = $(LTHREAD_LIBS)
 
index f82c68b3ab457daa557b70ba2c48e4eed427a1d3..1584054cea9d9cfcf86b1895fea810d9327f4765 100644 (file)
@@ -18,15 +18,16 @@ LDAP_LIBDIR= ../../libraries
 BUILD_OPT = "--enable-ldapd"
 BUILD_SRV = @BUILD_LDAPD@
 
-XLIBS= $(LDAPD_LIBS) $(KRB_LIBS) $(LUTIL_LIBS)
+XLIBS= -llber -llutil
+XXLIBS= $(LDAPD_LIBS) $(KRB_LIBS) $(LUTIL_LIBS)
 
 ldapd: version.o
        $(LDLINK) -o $@ $(OBJS) version.o $(LIBS)
 
 sldapd:        version.o
-       $(LDLINK) -static -o $@ $(OBJS) version.o $(LDFLAGS) $(LIBS) -lresolv
+       $(LDLINK) -static -o $@ $(OBJS) version.o $(LIBS)
 
-version.c: $(OBJS) $(LDAP_LIBDIR)/liblber/liblber.a
+version.c: $(OBJS) $(LDAP_LIBLBER_DEPEND)
        $(RM) $@
        (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
         t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
index 9766a6d57ed05e1ec38946f14c6fe90e745381ed..7e84bc69be6de72a4dc7c062b43d67ec514c8105 100644 (file)
@@ -22,10 +22,11 @@ OBJS        = main.o daemon.o connection.o search.o filter.o add.o charray.o \
 LDAP_INCDIR= ../../include
 LDAP_LIBDIR= ../../libraries
 
-# $(LTHREAD_LIBS) must be last!
-XLIBS = libbackends.a $(SLAPD_LIBS) $(LDAP_LIBS) \
-       -lavl $(LDAP_LIBLDBM)
-XXLIBS = $(KRB_LIBS) $(LDAP_LIBLTHREAD)
+# $(LTHREAD_LIBS) must be last
+XLIBS = libbackends.a -lavl -lldbm -lldif -lldap -llber -llthread -llutil
+XXLIBS = $(LDBM_LIBS) $(SLAPD_LIBS) \
+       $(KRB_LIBS) $(LUTIL_LIBS)
+XXXLIBS = $(LTHREAD_LIBS)
 
 BUILD_OPT = "--enable-slapd"
 BUILD_SRV = @BUILD_SLAPD@
index f4725a0dfb5133b6efe37fb51ed633fdd89cc5f1..b9fd8e41ce7911a690019ef1931d072a492357a4 100644 (file)
@@ -18,8 +18,10 @@ BUILD_LDBM = @BUILD_LDBM@
 LDAP_INCDIR= ../../../include       
 LDAP_LIBDIR= ../../../libraries
 
-XLIBS = $(LDAP_LIBS) $(SLAPD_LIBS) -lavl $(LDAP_LIBLDBM)
-XXLIBS = $(KRB_LIBS) $(LDAP_LIBLTHREAD)
+XLIBS = -lavl -lldif -lldap -llber -lldbm -llthread -llutil
+XXLIBS = $(LDAPD_LIBS) $(SLAPD_LIBS) \
+       $(LDBM_LIBS) $(KRB_LIBS) $(LUTIL_LIBS)
+XXXLIBS = $(LTHREAD_LIBS)
 
 PROGRAMS=ldif2index ldif2ldbm ldbmcat ldif2id2entry \
        ldif2id2children centipede ldbmtest ldif
index f14cc2507e9be8f93cc69856b82f9804add6e543..335ff224d6374e2105c69bb14015045d0e62e1d8 100644 (file)
@@ -25,8 +25,9 @@ BUILD_SRV = @BUILD_SLURPD@
 all-local-srv:         slurpd
 
 # $(LTHREAD_LIBS) must be last!
-XLIBS = $(SLURPD_LIBS) $(LDAP_LIBS)
-XXLIBS = $(KRB_LIBS) $(LDAP_LIBLTHREAD)
+XLIBS = -lldif -lldap -llber -llthread -llutil
+XXLIBS = $(SLURPD_LIBS) $(KRB_LIBS) $(LUTIL_LIBS)
+XXXLIBS = $(LTHREAD_LIBS)
 
 slurpd:        version.o
        $(LTLINK) -o $@ $(OBJS) version.o $(LIBS)