## top-level directory of the distribution or, alternatively, at
## <http://www.OpenLDAP.org/license.html>.
-PROGRAMS=slapd
+SLAPTOOLS=slapadd slapcat slapdn slapindex slappasswd slaptest slapauth slapacl
+PROGRAMS=slapd $(SLAPTOOLS)
XPROGRAMS=sslapd libbackends.a .backend liboverlays.a
XSRCS=version.c
-SUBDIRS=back-* shell-backends slapi overlays tools
+SUBDIRS=back-* shell-backends slapi overlays
NT_SRCS = nt_svc.c
NT_OBJS = nt_svc.o ../../libraries/liblutil/slapdmsg.res
oidm.c starttls.c index.c sets.c referral.c root_dse.c \
sasl.c module.c mra.c mods.c sl_malloc.c limits.c \
backglue.c operational.c matchedValues.c cancel.c syncrepl.c \
- backover.c ctxcsn.c ldapsync.c sessionlog.c $(@PLAT@_SRCS)
+ backover.c ctxcsn.c ldapsync.c sessionlog.c \
+ slapadd.c slapcat.c slapcommon.c slapdn.c slapindex.c \
+ slappasswd.c slaptest.c slapauth.c slapacl.c \
+ $(@PLAT@_SRCS)
OBJS = main.o globals.o config.o daemon.o \
connection.o search.o filter.o add.o cr.o \
oidm.o starttls.o index.o sets.o referral.o root_dse.o \
sasl.o module.o mra.o mods.o sl_malloc.o limits.o \
backglue.o operational.o matchedValues.o cancel.o syncrepl.o \
- backover.o ctxcsn.o ldapsync.o sessionlog.o $(@PLAT@_OBJS)
+ backover.o ctxcsn.o ldapsync.o sessionlog.o \
+ slapadd.o slapcat.o slapcommon.o slapdn.o slapindex.o \
+ slappasswd.o slaptest.o slapauth.o slapacl.o \
+ $(@PLAT@_OBJS)
LDAP_INCDIR= ../../include -I$(srcdir)/slapi
LDAP_LIBDIR= ../../libraries
SLAP_DIR=
-SLAPD_STATIC_DEPENDS=@SLAPD_NO_STATIC@ libbackends.a liboverlays.a
+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 = $(SLAPD_STATIC_DEPENDS) $(SLAPD_L)
-XXLIBS = $(LDBM_LIBS) $(SLAPD_LIBS) $(SECURITY_LIBS) $(LUTIL_LIBS)
+XLIBS = $(SLAPD_STATIC_DEPENDS) $(SLAPD_L) liboverlays.a
+XXLIBS = $(SLAPD_LIBS) $(SECURITY_LIBS) $(LUTIL_LIBS)
XXXLIBS = $(LTHREAD_LIBS) $(SLAPI_LIBS) $(MODULES_LIBS)
BUILD_OPT = "--enable-slapd"
UNIX_SLAPD_DEPENDS = $(SLAPD_STATIC_DEPENDS) version.o $(SLAPD_L)
UNIX_SLAPD_OBJECTS = $(OBJS) version.o
-SLAPD_DEPENDS = $(@PLAT@_SLAPD_DEPENDS)
+SLAPD_DEPENDS = liboverlays.a $(@PLAT@_SLAPD_DEPENDS)
SLAPD_OBJECTS = $(@PLAT@_SLAPD_OBJECTS)
# Notes about slapd for Windows
# Thus, we do the best we can by depending on version.o, which depends
# on its own very long list of dependencies.
#
-slapd.def: libbackends.a version.o
+slapd.def: libbackends.a liboverlays.a version.o
@for i in $(LDFLAGS) ; do \
path=`expr "$$i" : "-L\(.*\)"`; \
if test $$? != 0; then continue; fi; \
slapd: $(SLAPD_DEPENDS) @LIBSLAPI@
$(LTLINK) -o $@ $(SLAPD_OBJECTS) $(LIBS) \
$(WRAP_LIBS)
+ rm -f $(SLAPTOOLS)
+ for i in $(SLAPTOOLS); do \
+ $(LN_S) slapd $$i; done
+
sslapd: version.o
$(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS) $(WRAP_LIBS)
-tools $(SLAPD_DYNAMIC_BACKENDS): slapd
+$(SLAPD_DYNAMIC_BACKENDS): slapd
cd $@; $(MAKE) $(MFLAGS) all
@touch $@
fi; \
done
-all-cffiles: slapd $(SLAPD_DYNAMIC_BACKENDS) tools
+all-cffiles: slapd $(SLAPD_DYNAMIC_BACKENDS)
@if test $(PLAT) = NT; then \
sysconfdir=`cygpath -w $(sysconfdir) | \
$(SED) -e 's/\\\\/\\\\\\\\\\\\\\\\/g'`; \
fi
install-tools: FORCE
- @-$(MKDIR) $(DESTDIR)$(sbindir)
- (cd tools; $(MAKE) $(MFLAGS) install)
+ -$(MKDIR) $(DESTDIR)$(sbindir)
+ cd $(DESTDIR)$(sbindir); \
+ rm -f $(SLAPTOOLS); \
+ for i in $(SLAPTOOLS); do \
+ $(LN_S) $(libexecdir)/slapd $$i; \
+ done