PLAT=UNIX
fi
+if test -z "$SLAPD_STATIC_BACKENDS"; then
+ SLAPD_NO_STATIC='#'
+else
+ SLAPD_NO_STATIC=
+fi
+
AC_SUBST(LIBSRCS)
AC_SUBST(PLAT)
AC_SUBST(BUILD_LIBS_DYNAMIC)
AC_SUBST(SLAPD_MODULES_CPPFLAGS)
AC_SUBST(SLAPD_MODULES_LDFLAGS)
+AC_SUBST(SLAPD_NO_STATIC)
AC_SUBST(SLAPD_STATIC_BACKENDS)
AC_SUBST(SLAPD_DYNAMIC_BACKENDS)
LDAP_LIBDIR= ../../libraries
SLAP_DIR=
+SLAPD_STATIC_DEPENDS=@SLAPD_NO_STATIC@ libbackends.a
SLAPD_STATIC_BACKENDS=@SLAPD_STATIC_BACKENDS@
SLAPD_DYNAMIC_BACKENDS=@SLAPD_DYNAMIC_BACKENDS@
XDEFS = $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS)
-XLIBS = libbackends.a $(SLAPD_L)
+XLIBS = $(SLAPD_STATIC_DEPENDS) $(SLAPD_L)
XXLIBS = $(LDBM_LIBS) $(SLAPD_LIBS) $(SECURITY_LIBS) $(LDIF_LIBS) $(LUTIL_LIBS)
XXXLIBS = $(LTHREAD_LIBS) $(MODULES_LIBS)
NT_SLAPD_DEPENDS = slapd.exp
NT_SLAPD_OBJECTS = slapd.exp symdummy.o $(OBJS) version.o
-UNIX_SLAPD_DEPENDS = libbackends.a version.o $(SLAPD_L)
+UNIX_SLAPD_DEPENDS = $(SLAPD_STATIC_DEPENDS) version.o $(SLAPD_L)
UNIX_SLAPD_OBJECTS = $(OBJS) version.o
SLAPD_DEPENDS = $(@PLAT@_SLAPD_DEPENDS)
slapd: $(SLAPD_DEPENDS)
$(LTLINK) -o $@ $(SLAPD_OBJECTS) $(LIBS) $(WRAP_LIBS)
- @if test -n "$(SLAPD_DYNAMIC_BACKENDS)"; then \
- echo "building dynamic backends..."; \
- for i in XX $(SLAPD_DYNAMIC_BACKENDS); do \
- if test $$i != XX; then \
- echo " "; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \
- ( cd $$i; $(MAKE) $(MFLAGS) all ); \
- if test $$? != 0; then exit 1; fi; \
- fi; \
- done; \
- echo " "; \
- fi
- cd tools; $(MAKE) $(MFLAGS) all
sslapd: version.o
$(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS) $(WRAP_LIBS)
+tools $(SLAPD_DYNAMIC_BACKENDS): slapd
+ cd $@; $(MAKE) $(MFLAGS) all
+ @touch $@
+
#
# In Windows, dynamic backends have to be built after slapd. For this
# reason, we only build static backends now and dynamic backends later.
fi; \
done
-all-cffiles: slapd
+all-cffiles: slapd $(SLAPD_DYNAMIC_BACKENDS) tools
@if test $(PLAT) = NT; then \
sysconfdir=`cygpath -w $(sysconfdir) | \
$(SED) -e 's/\\\\/\\\\\\\\\\\\\\\\/g'`; \
$(LDIF_LIBS) $(LUTIL_LIBS)
XXXLIBS = $(MODULES_LIBS) $(LTHREAD_LIBS)
+STATIC_DEPENDS=@SLAPD_NO_STATIC@ ../libbackends.a
+
PROGRAMS=slapadd slapcat slapindex slappasswd
SRCS = mimic.c slapcommon.c \
#
# SLAP Tools
#
-slapadd: slapadd.o ../libbackends.a $(SLAPOBJS) $(SLAPD_L)
- $(LTLINK) -o $@ slapadd.o $(SLAPOBJS) ../libbackends.a $(LIBS)
+slapadd: slapadd.o $(STATIC_DEPENDS) $(SLAPOBJS) $(SLAPD_L)
+ $(LTLINK) -o $@ slapadd.o $(SLAPOBJS) $(STATIC_DEPENDS) $(LIBS)
-slapcat: slapcat.o ../libbackends.a $(SLAPOBJS) $(SLAPD_L)
- $(LTLINK) -o $@ slapcat.o $(SLAPOBJS) ../libbackends.a $(LIBS)
+slapcat: slapcat.o $(STATIC_DEPENDS) $(SLAPOBJS) $(SLAPD_L)
+ $(LTLINK) -o $@ slapcat.o $(SLAPOBJS) $(STATIC_DEPENDS) $(LIBS)
-slapindex: slapindex.o ../libbackends.a $(SLAPOBJS) $(SLAPD_L)
- $(LTLINK) -o $@ slapindex.o $(SLAPOBJS) ../libbackends.a $(LIBS)
+slapindex: slapindex.o $(STATIC_DEPENDS) $(SLAPOBJS) $(SLAPD_L)
+ $(LTLINK) -o $@ slapindex.o $(SLAPOBJS) $(STATIC_DEPENDS) $(LIBS)
slappasswd: slappasswd.o $(SLAPD_L)
$(LTLINK) -o $@ slappasswd.o $(LIBS)