LIBRARY = $(LIBBASE).la
LIBSTAT = lib$(LIBBASE).a
+LTFLAGS = --only-$(LINKAGE)
-all-common: FORCE
- @if test "$(BUILD_MOD)" = "yes"; then \
- $(MAKE) $(MFLAGS) LTFLAGS=--only-shared all-mod; \
- elif test "$(BUILD_LIB)" = "yes" ; then \
- $(MAKE) $(MFLAGS) LTFLAGS=--only-static all-lib; \
- else \
- echo "run configure with $(BUILD_OPT) to build $(LIBBASE)"; \
- fi
+all-no lint-no 5lint-no depend-no install-no:
+ @echo "run configure with $(BUILD_OPT) to make $(LIBBASE)"
+
+all-common: all-$(BUILD_MOD)
version.c: $(OBJS)
$(RM) $@
$(LTLIBLINK) -module -rpath $(moduledir) -o $@ $(OBJS) version.lo
$(LIBSTAT): version.lo
- $(AR) ruv $@ `echo $(OBJS) | sed s/\.lo/.o/g` version.o
+ $(AR) ruv $@ `echo $(OBJS) | sed 's/\.lo/.o/g'` version.o
@$(RANLIB) $@
clean-common: clean-lib FORCE
veryclean-common: veryclean-lib FORCE
-lint-common: FORCE
- @if test "$(BUILD_LIB)" = "yes" ; then \
- $(MAKE) $(MFLAGS) lint-lib; \
- else \
- echo "run configure with $(BUILD_OPT) to lint $(LIBBASE)"; \
- fi
-
-5lint-common: FORCE
- @if test "$(BUILD_LIB)" = "yes" ; then \
- $(MAKE) $(MFLAGS) 5lint-lib; \
- else \
- echo "run configure with $(BUILD_OPT) to 5lint $(LIBBASE)"; \
- fi
-
-depend-common: FORCE
- @if test "$(BUILD_LIB)" = "yes" ; then \
- $(MAKE) $(MFLAGS) depend-lib; \
- else \
- echo "run configure with $(BUILD_OPT) to depend $(LIBBASE)"; \
- fi
-
-install-common: FORCE
- @if test "$(BUILD_MOD)" = "yes" ; then \
- $(MAKE) $(MFLAGS) install-mod; \
- elif test "$(BUILD_LIB)" = "yes" ; then \
- $(MAKE) $(MFLAGS) install-lib; \
- else \
- echo "run configure with $(BUILD_OPT) to install $(LIBBASE)"; \
- fi
+
+lint-common: lint-$(BUILD_MOD)
+
+5lint-common: 5lint-$(BUILD_MOD)
+
+depend-common: depend-$(BUILD_MOD)
+
+install-common: install-$(BUILD_MOD)
all-local-mod:
all-mod: $(LIBRARY) all-local-mod FORCE
all-local-lib:
-all-lib: $(LIBSTAT) all-local-lib FORCE
+all-yes: $(LIBSTAT) all-local-lib FORCE
install-mod: $(LIBRARY)
@-$(MKDIR) $(moduledir)
$(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(moduledir)
install-local-lib:
-install-lib: install-local-lib FORCE
+install-yes: install-local-lib FORCE
lint-local-lib:
-lint-lib: lint-local-lib FORCE
+lint-yes lint-mod: lint-local-lib FORCE
$(LINT) $(DEFS) $(DEFINES) $(SRCS)
5lint-local-lib:
-5lint-lib: 5lint-local-lib FORCE
+5lint-yes 5lint-mod: 5lint-local-lib FORCE
$(5LINT) $(DEFS) $(DEFINES) $(SRCS)
clean-local-lib:
clean-lib: clean-local-lib FORCE
- $(RM) $(LIBRARY) $(LIBSTAT) $(MODULE) *.o *.lo a.out core .libs/*
+ $(RM) $(LIBRARY) $(LIBSTAT) version.c *.o *.lo a.out core .libs/*
depend-local-lib:
-depend-lib: depend-local-lib FORCE
+depend-yes depend-mod: depend-local-lib FORCE
+ $(MKDEP) $(DEFS) $(DEFINES) $(SRCS)
COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CFLAGS) -c
MKDEPFLAG = -l
## Makefile Template for Servers
##
-all-common: FORCE
- @if test "$(BUILD_SRV)" = "yes" ; then \
- $(MAKE) $(MFLAGS) all-srv; \
- else \
- echo "run configure with $(BUILD_OPT) to build $(PROGRAMS)"; \
- fi
+all-common: all-$(BUILD_SRV)
+all-no lint-no 5lint-no depend-no install-no:
+ @echo "run configure with $(BUILD_OPT) to make $(PROGRAMS)"
clean-common: clean-srv FORCE
veryclean-common: veryclean-srv FORCE
-lint-common: FORCE
- @if test "$(BUILD_SRV)" = "yes" ; then \
- $(MAKE) $(MFLAGS) lint-srv; \
- else \
- echo "run configure with $(BUILD_OPT) to lint $(PROGRAMS)"; \
- fi
+lint-common: lint-$(BUILD_SRV)
-5lint-common: FORCE
- @if test "$(BUILD_SRV)" = "yes" ; then \
- $(MAKE) $(MFLAGS) 5lint-srv; \
- else \
- echo "run configure with $(BUILD_OPT) to 5lint $(PROGRAMS)"; \
- fi
+5lint-common: 5lint-$(BUILD_SRV)
-depend-common: FORCE
- @if test "$(BUILD_SRV)" = "yes" ; then \
- $(MAKE) $(MFLAGS) depend-srv; \
- else \
- echo "run configure with $(BUILD_OPT) to depend $(PROGRAMS)"; \
- fi
+depend-common: depend-$(BUILD_SRV)
-install-common: FORCE
- @if test "$(BUILD_SRV)" = "yes" ; then \
- $(MAKE) $(MFLAGS) install-srv; \
- else \
- echo "run configure with $(BUILD_OPT) to install $(PROGRAMS)"; \
- fi
+install-common: install-$(BUILD_SRV)
all-local-srv:
-all-srv: all-local-srv FORCE
+all-yes: all-local-srv FORCE
install-local-srv:
-install-srv: install-local-srv FORCE
+install-yes: install-local-srv FORCE
lint-local-srv:
-lint-srv: lint-local-srv FORCE
+lint-yes: lint-local-srv FORCE
$(LINT) $(DEFS) $(DEFINES) $(SRCS)
5lint-local-srv:
-5lint-srv: 5lint-local-srv FORCE
+5lint-yes: 5lint-local-srv FORCE
$(5LINT) $(DEFS) $(DEFINES) $(SRCS)
clean-local-srv:
$(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) *.o a.out core .libs/*
depend-local-srv:
-depend-srv: depend-local-srv FORCE
+depend-yes: depend-local-srv FORCE
$(MKDEP) $(DEFS) $(DEFINES) $(SRCS)
veryclean-local-srv:
BUILD_TCL=no
BUILD_THREAD=no
-BUILD_BDB2_DYNAMIC=no
-BUILD_LDAP_DYNAMIC=no
-BUILD_LDBM_DYNAMIC=no
-BUILD_PASSWD_DYNAMIC=no
-BUILD_PERL_DYNAMIC=no
-BUILD_SHELL_DYNAMIC=no
-BUILD_TCL_DYNAMIC=no
+BUILD_BDB2_DYNAMIC=static
+BUILD_LDAP_DYNAMIC=static
+BUILD_LDBM_DYNAMIC=static
+BUILD_PASSWD_DYNAMIC=static
+BUILD_PERL_DYNAMIC=static
+BUILD_SHELL_DYNAMIC=static
+BUILD_TCL_DYNAMIC=static
SLAPD_MODULES_LDFLAGS=
SLAPD_MODULES_CPPFLAGS=
#define SLAPD_BDB2_DYNAMIC 1
EOF
- BUILD_BDB2_DYNAMIC=yes
+ BUILD_BDB2=mod
+ BUILD_BDB2_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
fi
fi
#define SLAPD_LDAP_DYNAMIC 1
EOF
- BUILD_LDAP_DYNAMIC=yes
+ BUILD_LDAP=mod
+ BUILD_LDAP_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
fi
fi
#define SLAPD_LDBM_DYNAMIC 1
EOF
- BUILD_LDBM_DYNAMIC=yes
+ BUILD_LDBM=mod
+ BUILD_LDBM_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
fi
fi
#define SLAPD_PASSWD_DYNAMIC 1
EOF
- BUILD_PASSWD_DYNAMIC=yes
+ BUILD_PASSWD=mod
+ BUILD_PASSWD_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
fi
fi
#define SLAPD_PERL_DYNAMIC 1
EOF
- BUILD_PERL_DYNAMIC=yes
+ BUILD_PERL=mod
+ BUILD_PERL_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
fi
fi
#define SLAPD_SHELL_DYNAMIC 1
EOF
- BUILD_SHELL_DYNAMIC=yes
+ BUILD_SHELL=mod
+ BUILD_SHELL_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
fi
fi
#define SLAPD_TCL_DYNAMIC 1
EOF
- BUILD_TCL_DYNAMIC=yes
+ BUILD_TCL=mod
+ BUILD_TCL_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
fi
fi
servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
-servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
+servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
-servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
-servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
-servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
-servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
-servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
+servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
+servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
+servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
+servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
+servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
-servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
+servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
-servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
-servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
-servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
-servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
-servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
+servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
+servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
+servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
+servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
+servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
BUILD_TCL=no
BUILD_THREAD=no
-BUILD_BDB2_DYNAMIC=no
-BUILD_LDAP_DYNAMIC=no
-BUILD_LDBM_DYNAMIC=no
-BUILD_PASSWD_DYNAMIC=no
-BUILD_PERL_DYNAMIC=no
-BUILD_SHELL_DYNAMIC=no
-BUILD_TCL_DYNAMIC=no
+BUILD_BDB2_DYNAMIC=static
+BUILD_LDAP_DYNAMIC=static
+BUILD_LDBM_DYNAMIC=static
+BUILD_PASSWD_DYNAMIC=static
+BUILD_PERL_DYNAMIC=static
+BUILD_SHELL_DYNAMIC=static
+BUILD_TCL_DYNAMIC=static
SLAPD_MODULES_LDFLAGS=
SLAPD_MODULES_CPPFLAGS=
if test "$ol_with_bdb2_module" != static ; then
AC_DEFINE(SLAPD_BDB2_DYNAMIC,1,
[define to support dynamic BDB2 backend])
- BUILD_BDB2_DYNAMIC=yes
+ BUILD_BDB2=mod
+ BUILD_BDB2_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
fi
fi
if test "$ol_with_ldap_module" != static ; then
AC_DEFINE(SLAPD_LDAP_DYNAMIC,1,
[define to support dynamic LDAP backend])
- BUILD_LDAP_DYNAMIC=yes
+ BUILD_LDAP=mod
+ BUILD_LDAP_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
fi
fi
if test "$ol_with_ldbm_module" != static ; then
AC_DEFINE(SLAPD_LDBM_DYNAMIC,1,
[define to support dynamic LDBM backend])
- BUILD_LDBM_DYNAMIC=yes
+ BUILD_LDBM=mod
+ BUILD_LDBM_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
fi
fi
if test "$ol_with_passwd_module" != static ; then
AC_DEFINE(SLAPD_PASSWD_DYNAMIC,1,
[define to support dynamic PASSWD backend])
- BUILD_PASSWD_DYNAMIC=yes
+ BUILD_PASSWD=mod
+ BUILD_PASSWD_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
fi
fi
if test "$ol_with_perl_module" != static ; then
AC_DEFINE(SLAPD_PERL_DYNAMIC,1,
[define to support dynamic PERL backend])
- BUILD_PERL_DYNAMIC=yes
+ BUILD_PERL=mod
+ BUILD_PERL_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
fi
fi
if test "$ol_with_shell_module" != static ; then
AC_DEFINE(SLAPD_SHELL_DYNAMIC,1,
[define to support dynamic SHELL backend])
- BUILD_SHELL_DYNAMIC=yes
+ BUILD_SHELL=mod
+ BUILD_SHELL_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
fi
fi
if test "$ol_with_tcl_module" != static; then
AC_DEFINE(SLAPD_TCL_DYNAMIC,1,
[define to support dynamic TCL backend])
- BUILD_TCL_DYNAMIC=yes
+ BUILD_TCL=mod
+ BUILD_TCL_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
fi
fi
servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
-servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
+servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
-servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
-servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
-servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
-servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
-servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
+servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
+servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
+servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
+servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
+servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
## Makefile.in for slapd
##
PROGRAMS=slapd
-XPROGRAMS=sslapd libbackends.a .backend
+XPROGRAMS=sslapd libbackends.a
XSRCS=version.c
SRCS = main.c daemon.c connection.c search.c filter.c add.c charray.c \
attr.c entry.c config.c backend.c result.c operation.c \
BUILD_OPT = "--enable-slapd"
BUILD_SRV = @BUILD_SLAPD@
-all-local-srv: FORCE
- $(MAKE) $(MFLAGS) backendslib
- $(MAKE) $(MFLAGS) slapd
- (cd tools; $(MAKE) $(MFLAGS) all)
- $(MAKE) $(MFLAGS) all-cffiles
+all-local-srv: all-cffiles
-slapd: version.o
+slapd: libbackends.a version.o
$(LTLINK) -o $@ $(OBJS) version.o $(LIBS)
+ (cd tools; $(MAKE) $(MFLAGS) all)
sslapd: version.o
$(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS)
-backendslib: FORCE
+# dummy equivalent of FORCE when wildcard fails
+back-*/libback*.a:
+
+libbackends.a: back-*/libback*.a
@for i in back-*; do \
if [ -d $$i ]; then \
echo " "; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \
( cd $$i; $(MAKE) $(MFLAGS) all ); \
fi; \
done; \
- echo " "; \
- $(MAKE) $(MFLAGS) libbackends.a
-
-libbackends.a: .backend
+ echo " "
@$(RM) -r tmp
@$(MKDIR) tmp
@-for i in back-*/*.a; do \
CFFILES=slapd.conf slapd.at.conf slapd.oc.conf
-all-cffiles:
+all-cffiles: slapd
@for i in $(CFFILES); do \
tmpcf=$$i.tmp; \
$(SED) -e 's;%SYSCONFDIR%;$(sysconfdir);' \
@-$(MKDIR) $(sbindir)
(cd tools; $(MAKE) $(MFLAGS) install)
-
-
-
-
-
-
-
-
-
-
-
-XSRCS = version.c
SRCS = idl.c add.c search.c cache.c dbcache.c dn2id.c entry.c id2entry.c \
index.c id2children.c nextid.c abandon.c compare.c group.c \
modify.c modrdn.c delete.c init.c config.c bind.c attr.c \
filterindex.c unbind.c kerberos.c close.c alias.c startup.c \
timing.c porter.c txn.c
-OBJS = idl.o add.o search.o cache.o dbcache.o dn2id.o entry.o id2entry.o \
- index.o id2children.o nextid.o abandon.o compare.o group.o \
- modify.o modrdn.o delete.o init.o config.o bind.o attr.o \
- filterindex.o unbind.o kerberos.o close.o alias.o startup.o \
- timing.o porter.o txn.o
+OBJS = idl.lo add.lo search.lo cache.lo dbcache.lo dn2id.lo entry.lo id2entry.lo \
+ index.lo id2children.lo nextid.lo abandon.lo compare.lo group.lo \
+ modify.lo modrdn.lo delete.lo init.lo config.lo bind.lo attr.lo \
+ filterindex.lo unbind.lo kerberos.lo close.lo alias.lo startup.lo \
+ timing.lo porter.lo txn.lo
LDAP_INCDIR= ../../../include
LDAP_LIBDIR= ../../../libraries
BUILD_OPT = "--enable-bdb2"
-BUILD_SRV = @BUILD_BDB2@
+BUILD_MOD = @BUILD_BDB2@
+LINKAGE = @BUILD_BDB2_DYNAMIC@
+
+LIBBASE = back_bdb2
XINCPATH = -I.. -I$(srcdir)/..
XDEFS = $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS)
-PROGRAMS = libback-bdb2.a
-
-all-local-srv: FORCE
- $(MAKE) $(MFLAGS) libback-bdb2.a
-
-libback-bdb2.a: version.o
- $(AR) ruv $@ $(OBJS) version.o
- @$(RANLIB) $@
- @touch ../.backend
-
-version.c: $(OBJS) $(LDAP_LIBDEPEND)
- @-$(RM) $@
- $(MKVERSION) back-bdb2 > $@
#include "back-bdb2.h"
#ifdef SLAPD_BDB2_DYNAMIC
-#include <gmodule.h>
-G_MODULE_EXPORT void init_module(int argc, char *argv[]) {
+void back_bdb2_LTX_init_module(int argc, char *argv[]) {
BackendInfo bi;
memset( &bi, 0, sizeof(bi) );
LDAP_LIBDIR= ../../../libraries
BUILD_OPT = "--enable-ldap"
-BUILD_LIB = @BUILD_LDAP@
-BUILD_MOD = @BUILD_LDAP_DYNAMIC@
+BUILD_MOD = @BUILD_LDAP@
+LINKAGE = @BUILD_LDAP_DYNAMIC@
LIBBASE = back_ldap
XDEFS = $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS)
-all-lib-local: ../.backend
-
-../.backend: $(LIBSTAT)
- @touch ../.backend
-
-XSRCS = version.c
SRCS = idl.c add.c search.c cache.c dbcache.c dn2id.c entry.c id2entry.c \
index.c id2children.c nextid.c abandon.c compare.c group.c \
modify.c modrdn.c delete.c init.c config.c bind.c attr.c \
filterindex.c unbind.c kerberos.c close.c alias.c
-OBJS = idl.o add.o search.o cache.o dbcache.o dn2id.o entry.o id2entry.o \
- index.o id2children.o nextid.o abandon.o compare.o group.o \
- modify.o modrdn.o delete.o init.o config.o bind.o attr.o \
- filterindex.o unbind.o kerberos.o close.o alias.o
+OBJS = idl.lo add.lo search.lo cache.lo dbcache.lo dn2id.lo entry.lo id2entry.lo \
+ index.lo id2children.lo nextid.lo abandon.lo compare.lo group.lo \
+ modify.lo modrdn.lo delete.lo init.lo config.lo bind.lo attr.lo \
+ filterindex.lo unbind.lo kerberos.lo close.lo alias.lo
LDAP_INCDIR= ../../../include
LDAP_LIBDIR= ../../../libraries
BUILD_OPT = "--enable-ldbm"
-BUILD_SRV = @BUILD_LDBM@
+BUILD_MOD = @BUILD_LDBM@
+LINKAGE = @BUILD_LDBM_DYNAMIC@
+
+LIBBASE = back_ldbm
XINCPATH = -I.. -I$(srcdir)/..
XDEFS = $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS)
-PROGRAMS = libback-ldbm.a
-
-all-local-srv: FORCE
- $(MAKE) $(MFLAGS) libback-ldbm.a
-
-libback-ldbm.a: version.o
- $(AR) ruv $@ $(OBJS) version.o
- @$(RANLIB) $@
- @touch ../.backend
-
-version.c: $(OBJS) $(LDAP_LIBDEPEND)
- @-$(RM) $@
- $(MKVERSION) back-ldbm > $@
#include "back-ldbm.h"
#ifdef SLAPD_LDBM_DYNAMIC
-#include <gmodule.h>
-G_MODULE_EXPORT void init_module(int argc, char *argv[]) {
+void back_ldbm_LTX_init_module(int argc, char *argv[]) {
BackendInfo bi;
memset( &bi, 0, sizeof(bi) );
-XSRCS = version.c
SRCS = search.c config.c init.c
-OBJS = search.o config.o init.o
+OBJS = search.lo config.lo init.lo
LDAP_INCDIR= ../../../include
LDAP_LIBDIR= ../../../libraries
BUILD_OPT = "--enable-passwd"
-BUILD_SRV = @BUILD_PASSWD@
+BUILD_MOD = @BUILD_PASSWD@
+LINKAGE = @BUILD_PASSWD_DYNAMIC@
-PROGRAMS= libback-passwd.a
+LIBBASE = back_passwd
XINCPATH = -I.. -I$(srcdir)/..
XDEFS = $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS)
-all-local-srv: FORCE
- $(MAKE) $(MFLAGS) libback-passwd.a
-
-libback-passwd.a: version.o
- $(AR) ruv $@ $(OBJS) version.o
- @$(RANLIB) $@
- @touch ../.backend
-
-version.c: $(OBJS) $(LDAP_LIBDEPEND)
- @-$(RM) $@
- $(MKVERSION) back-passwd > $@
-
#include "external.h"
#ifdef SLAPD_PASSWD_DYNAMIC
-#include <gmodule.h>
-G_MODULE_EXPORT void init_module(int argc, char *argv[]) {
+void back_passwd_LTX_init_module(int argc, char *argv[]) {
BackendInfo bi;
memset( &bi, 0, sizeof(bi) );
# in file LICENSE in the top-level directory of the distribution.
#
##########################################################################
-XSRCS = version.c
SRCS = init.c search.c close.c config.c bind.c unbind.c compare.c \
modify.c add.c modrdn.c delete.c
-OBJS = init.o search.o close.o config.o bind.o unbind.o compare.o \
- modify.o add.o modrdn.o delete.o
+OBJS = init.lo search.lo close.lo config.lo bind.lo unbind.lo compare.lo \
+ modify.lo add.lo modrdn.lo delete.lo
LDAP_INCDIR= ../../../include
LDAP_LIBDIR= ../../../libraries
BUILD_OPT = "--enable-perl"
-BUILD_SRV = @BUILD_PERL@
+BUILD_MOD = @BUILD_PERL@
+LINKAGE = @BUILD_PERL_DYNAMIC@
-PROGRAMS = libback-perl.a
+LIBBASE = back_perl
XINCPATH = -I.. -I$(srcdir)/..
XDEFS = $(PERL_CPPFLAGS) $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS)
-all-local-srv: FORCE
- $(MAKE) $(MFLAGS) libback-perl.a
-
-libback-perl.a: version.o
- $(AR) ruv $@ $(OBJS) version.o
- @$(RANLIB) $@
- @touch ../.backend
-
-version.c: $(OBJS) $(LDAP_LIBDEPEND)
- @-$(RM) $@
- $(MKVERSION) back-perl > $@
ldap_pvt_thread_mutex_t perl_interpreter_mutex;
#ifdef SLAPD_PERL_DYNAMIC
-#include <gmodule.h>
-G_MODULE_EXPORT void init_module(int argc, char *argv[]) {
+void back_perl_LTX_init_module(int argc, char *argv[]) {
BackendInfo bi;
memset( &bi, 0, sizeof(bi) );
-XSRCS = version.c
SRCS = init.c config.c fork.c search.c bind.c unbind.c add.c delete.c \
modify.c modrdn.c compare.c abandon.c result.c
-OBJS = init.o config.o fork.o search.o bind.o unbind.o add.o delete.o \
- modify.o modrdn.o compare.o abandon.o result.o
+OBJS = init.lo config.lo fork.lo search.lo bind.lo unbind.lo add.lo delete.lo \
+ modify.lo modrdn.lo compare.lo abandon.lo result.lo
LDAP_INCDIR= ../../../include
LDAP_LIBDIR= ../../../libraries
BUILD_OPT = "--enable-shell"
-BUILD_SRV = @BUILD_SHELL@
+BUILD_MOD = @BUILD_SHELL@
+LINKAGE = @BUILD_SHELL_DYNAMIC@
-PROGRAMS = libback-shell.a
+LIBBASE = back_shell
XINCPATH = -I.. -I$(srcdir)/..
XDEFS = $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS)
-all-local-srv: FORCE
- $(MAKE) $(MFLAGS) libback-shell.a
-
-libback-shell.a: version.o
- $(AR) ruv $@ $(OBJS) version.o
- @$(RANLIB) $@
- @touch ../.backend
-
-version.c: $(OBJS) $(LDAP_LIBDEPEND)
- @-$(RM) $@
- $(MKVERSION) back-shell > $@
-
#include "shell.h"
#ifdef SLAPD_SHELL_DYNAMIC
-#include <gmodule.h>
-G_MODULE_EXPORT void init_module(int argc, char *argv[]) {
+void back_shell_LTX_init_module(int argc, char *argv[]) {
BackendInfo bi;
memset( &bi, 0, sizeof(bi) );
# in file LICENSE in the top-level directory of the distribution.
#
##########################################################################
-XSRCS = version.c
SRCS = tcl_init.c tcl_search.c tcl_close.c tcl_config.c tcl_bind.c \
tcl_unbind.c tcl_compare.c tcl_modify.c tcl_add.c tcl_modrdn.c \
tcl_delete.c tcl_abandon.c tcl_util.c
-OBJS = tcl_init.o tcl_search.o tcl_close.o tcl_config.o tcl_bind.o \
- tcl_unbind.o tcl_compare.o tcl_modify.o tcl_add.o tcl_modrdn.o \
- tcl_delete.o tcl_abandon.o tcl_util.o
+OBJS = tcl_init.lo tcl_search.lo tcl_close.lo tcl_config.lo tcl_bind.lo \
+ tcl_unbind.lo tcl_compare.lo tcl_modify.lo tcl_add.lo tcl_modrdn.lo \
+ tcl_delete.lo tcl_abandon.lo tcl_util.lo
LDAP_INCDIR= ../../../include
LDAP_LIBDIR= ../../../libraries
BUILD_OPT = "--enable-tcl"
-BUILD_SRV = @BUILD_TCL@
+BUILD_MOD = @BUILD_TCL@
+LINKAGE = @BUILD_TCL_DYNAMIC@
-PROGRAMS = libback-tcl.a
+LIBBASE = back_tcl
XDEFS = $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS)
XINCPATH = -I.. -I$(srcdir)/..
-all-local-srv: FORCE
- $(MAKE) $(MFLAGS) libback-tcl.a
-
-libback-tcl.a: version.o
- $(AR) ruv $@ $(OBJS) version.o
- @$(RANLIB) $@
- @touch ../.backend
-
-version.c: $(OBJS) $(LDAP_LIBDEPEND)
- @-$(RM) $@
- $(MKVERSION) back-tcl > $@
-
/* tcl_init.c - tcl backend initialization
*
- * $Id: tcl_init.c,v 1.9 1999/07/05 04:26:30 kdz Exp $
+ * $Id: tcl_init.c,v 1.10 1999/08/06 11:16:27 hyc Exp $
*
* Copyright 1999, Ben Collins <bcollins@debian.org>, All rights reserved.
*
ldap_pvt_thread_mutex_t tcl_interpreter_mutex;
#ifdef SLAPD_TCL_DYNAMIC
-#include <gmodule.h>
-G_MODULE_EXPORT void init_module(int argc, char *argv[]) {
+void back_tcl_LTX_init_module(int argc, char *argv[]) {
BackendInfo bi;
memset( &bi, 0, sizeof(bi) );
# Stand alone LDAP server tools makefile
#
#-----------------------------------------------------------------------------
-HAVE_QUIPU = @HAVE_QUIPU@
+HAVE_QUIPU = @BUILD_QUIPU@
BUILD_LDBM = @BUILD_LDBM@
BUILD_BDB2 = @BUILD_BDB2@
all-local: build-ldbm build-bdb2 build-edb2ldif build-chlog2replog
-build-ldbm: FORCE
- @if [ "$(BUILD_LDBM)" = "yes" ]; then \
- $(MAKE) $(MFLAGS) ldbm-tools; \
- else \
- echo "run configure with --with-ldbm to build LDBM tools"; \
- fi
+build-ldbm: ldbm-tools-$(BUILD_LDBM)
+ldbm-tools-no:
+ @echo "run configure with --enable-ldbm to build LDBM tools"
-build-bdb2: FORCE
- @if [ "$(BUILD_BDB2)" = "yes" ]; then \
- $(MAKE) $(MFLAGS) bdb2-tools; \
- else \
- echo "run configure with --enable-bdb2 to build BDB2 tools"; \
- fi
+build-bdb2: bdb2-tools-$(BUILD_BDB2)
+bdb2-tools-no:
+ @echo "run configure with --enable-bdb2 to build BDB2 tools"
-ldbm-tools: $(PROGRAMS)
+ldbm-tools-yes ldbm-tools-mod: $(PROGRAMS)
-bdb2-tools: $(PROGRAMS2)
+bdb2-tools-yes bdb2-tools-mod: $(PROGRAMS2)
-build-edb2ldif: FORCE
- @if [ "$(HAVE_QUIPU)" = "yes" ]; then \
- $(MAKE) $(MFLAGS) edb2ldif; \
- else \
- echo "run configure with --enable-quipu to build edb2ldif"; \
- fi
+build-edb2ldif: edb-$(HAVE_QUIPU)
+edb-no:
+ @echo "run configure with --enable-quipu to build edb2ldif"
+edb-yes: edb2ldif
edb2ldif: edb2-vers.o
$(CC) $(LDFLAGS) -o $@ $(EDB2LDIFOBJS) edb2-vers.o $(LIBS)
@-$(RM) $@
$(MKVERSION) ebd2ldif > $@
-build-chlog2replog: FORCE
- @if [ "$(HAVE_QUIPU)" = "yes" ]; then \
- $(MAKE) $(MFLAGS) chlog2replog; \
- else \
- echo "run configure with --enable-quipu to build chlog2replog"; \
- fi
+build-chlog2replog: chlog-$(HAVE_QUIPU)
+chlog-no:
+ @echo "run configure with --enable-quipu to build chlog2replog"
+chlog-yes: chlog2replog
chlog2replog: chlog2replog.o ../lock.o ../ch_malloc.o $(SLAPD_LIBDEPEND)
$(LTLINK) -o $@ chlog2replog.o ../lock.o ../ch_malloc.o $(LIBS)
depend-local: FORCE
@DEPEND=no ; DEPEND_LDBM= ; DEPEND_BDB2= ; DEPEND_QUIPU= ; \
- if [ "$(BUILD_LDBM)" = "yes" ]; then \
+ if [ "$(BUILD_LDBM)" != "no" ]; then \
DEPEND_LDBM="$(SRCS)"; \
DEPEND=yes ; \
fi; \
- if [ "$(BUILD_BDB2)" = "yes" ]; then \
+ if [ "$(BUILD_BDB2)" != "no" ]; then \
DEPEND_BDB2="$(SRCS2)"; \
DEPEND=yes ; \
fi; \
- if [ "$(HAVE_QUIPU)" = "yes" ]; then \
+ if [ "$(HAVE_QUIPU)" != "no" ]; then \
DEPEND_QUIPU="$(QUIPUINCLUDEFLAG) chlog2replog.c $(EDB2LDIFSRCS)"; \
DEPEND=yes ; \
fi; \
echo "slapd-tools: no dependencies to make"; \
fi
-install-local: install-ldbm install-bdb2 install-quipu FORCE
+install-local: install-ldbm-$(BUILD_LDBM) install-bdb2-$(BUILD_BDB2) \
+ install-quipu-$(HAVE_QUIPU)
-install-ldbm: FORCE
- @-$(MKDIR) $(sbindir)
- @if [ "$(BUILD_LDBM)" = "yes" ]; then \
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm $(sbindir) ; \
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2index $(sbindir) ; \
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry $(sbindir) ; \
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children $(sbindir) ; \
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldbmcat $(sbindir) ; \
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif $(sbindir) ; \
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 centipede $(sbindir) ; \
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldbmtest $(sbindir) ; \
- else \
- exit 0 ; \
- fi
+install-ldbm-no install-bdb2-no install-quipu-no:
-install-bdb2: FORCE
+install-ldbm-yes install-ldbm-mod: FORCE
@-$(MKDIR) $(sbindir)
- @if [ "$(BUILD_BDB2)" = "yes" ]; then \
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm-bdb2 $(sbindir) ; \
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2index-bdb2 $(sbindir) ; \
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry-bdb2 $(sbindir) ; \
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children-bdb2 $(sbindir) ; \
- else \
- exit 0 ; \
- fi
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm $(sbindir) ; \
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2index $(sbindir) ; \
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry $(sbindir) ; \
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children $(sbindir) ; \
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldbmcat $(sbindir) ; \
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif $(sbindir) ; \
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 centipede $(sbindir) ; \
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldbmtest $(sbindir)
+
+install-bdb2-yes install-bdb2-mod: FORCE
+ @-$(MKDIR) $(sbindir)
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm-bdb2 $(sbindir) ; \
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2index-bdb2 $(sbindir) ; \
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry-bdb2 $(sbindir) ; \
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children-bdb2 $(sbindir)
-install-quipu: FORCE
+install-quipu-yes: FORCE
@-$(MKDIR) $(sbindir)
- @if [ "$(HAVE_QUIPU)" = "yes" ]; then \
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 edb2ldif $(sbindir); \
- $(LTINSTALL) $(INSTALLFLAGS) -m 755 chlog2replog $(sbindir); \
- else \
- exit 0 ; \
- fi
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 edb2ldif $(sbindir); \
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 chlog2replog $(sbindir)