-slapd: $(SLAPD_DEPENDS)
- $(LTLINK) -o $@ $(SLAPD_OBJECTS) $(LIBS) $(WRAP_LIBS)
- @msg="building dynamic backends..."; \
- for i in back-*; do \
- if test -d $$i -a -f $$i/Makefile ; then \
- grep '^BUILD_MOD[ ]*=[ ]*mod[ ]*$$' $$i/Makefile \
- > /dev/null 2>&1; \
- if test $$? = 0; then \
- if test -n "$$msg"; then \
- echo ""; echo "$$msg"; \
- msg=""; \
- fi; \
- echo ""; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \
- ( cd $$i; $(MAKE) $(MFLAGS) all ); \
- if test $$? != 0 ; then exit 1; fi ; \
- fi; \
- fi; \
- done; \
- echo ""
- cd tools; $(MAKE) $(MFLAGS) all
+slapi/.libs/libslapi.a: FORCE
+ (cd slapi; $(MAKE) $(MFLAGS) all)
+
+libslapi.a: slapi/.libs/libslapi.a
+ cp slapi/.libs/libslapi.a .
+
+slapd: $(SLAPD_DEPENDS) @LIBSLAPI@
+ $(LTLINK) -o $@ $(SLAPD_OBJECTS) $(LIBS) \
+ $(WRAP_LIBS)
+ $(RM) $(SLAPTOOLS)
+ for i in $(SLAPTOOLS); do \
+ $(LN_S) slapd$(EXEEXT) $$i$(EXEEXT); done
+