openldap/servers/slapd/Makefile.in
Ben Collins ed75be1b3c * configure.in: add tcl8.2 to list of tcl libs to search for, also added new MOD_TCL_LIB
and related AC_SUBST() so that when back-tcl is compiled as a dynamic module we link
  -ltcl to the module and not slapd (this is the correct way to do this since the .la file
  handles giving the correct libs when we pass the module to it in the linker line with
  -dlopen). Also modified the perl backend in a similar way except that the PERL_CPPFLAGS
  always go to the module and never to slapd (slapd doesn't need them).
* build/mod.mk: added $(MODLIBS) to the dynamic module link line to accomodate module
  specific libraries. These should be defined in the back-*/Makefile.in file for each
  module (so far only back-tcl and back-perl need it).
* build/top.mk: modified the perl ldflags and cppflags slightly
* servers/slapd/Makefile.in: same here
* servers/slapd/back-perl/Makefile.in: added MODLIBS=$(MOD_PERL_LDFLAGS) for when we are
  using a dynamic module (problem, libtool wont allow linking static libs into a libtool
  lib, so unless perl's libs are compiled dynamic, then back-perl can't be a dynamic
  module. We need a test for this on perl and tcl).
* servers/slapd/back-tcl/Makefile.in: added MODLIBS=$(MOD_TCL_LIB)
* back-perl and back-tcl now compile
1999-09-23 05:32:10 +00:00

163 lines
4.5 KiB
Makefile

# $OpenLDAP$
##
## Makefile.in for slapd
##
PROGRAMS=slapd
XPROGRAMS=sslapd libbackends.a .backend
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 \
dn.c compare.c modify.c delete.c modrdn.c ch_malloc.c \
value.c ava.c bind.c unbind.c abandon.c filterentry.c \
phonetic.c acl.c str2filter.c aclparse.c init.c user.c \
repl.c lock.c controls.c extended.c \
schema.c schemaparse.c monitor.c configinfo.c \
root_dse.c sasl.c module.c suffixalias.c
OBJS = main.o daemon.o connection.o search.o filter.o add.o charray.o \
attr.o entry.o config.o backend.o result.o operation.o \
dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o \
value.o ava.o bind.o unbind.o abandon.o filterentry.o \
phonetic.o acl.o str2filter.o aclparse.o init.o user.o \
repl.o lock.o controls.o extended.o \
schema.o schemaparse.o monitor.o configinfo.o \
root_dse.o sasl.o module.o suffixalias.o
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
SLAP_DIR=
SLAPD_MODULES=@SLAPD_MODULES_LIST@
XDEFS = $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS) $(SLAPD_MODULES)
# $(LTHREAD_LIBS) must be last
XLIBS = libbackends.a -lavl -lldbm -lldif -lldap_r -llber -llutil
XXLIBS = $(LDBM_LIBS) $(SLAPD_LIBS) \
$(SLAPD_PERL_LDFLAGS) $(SECURITY_LIBS) \
$(LDIF_LIBS) $(LUTIL_LIBS)
XXXLIBS = $(LTHREAD_LIBS) $(MODULES_LIBS)
BUILD_OPT = "--enable-slapd"
BUILD_SRV = @BUILD_SLAPD@
all-local-srv: all-cffiles
slapd: libbackends.a version.o
$(LTLINK) -o $@ $(OBJS) version.o $(LIBS) $(WRAP_LIBS)
(cd tools; $(MAKE) $(MFLAGS) all)
sslapd: version.o
$(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS) $(WRAP_LIBS)
.backend: FORCE
@for i in back-*; do \
if [ -d $$i ]; then \
echo " "; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \
( cd $$i; $(MAKE) $(MFLAGS) all ); \
fi; \
done; \
echo " "
libbackends.a: .backend
@$(RM) -r tmp
@$(MKDIR) tmp
@-for i in back-*/*.a; do \
( \
cd tmp; \
$(AR) x ../$$i; \
pre=`echo $$i | sed -e 's/\/.*$$//' -e 's/back-//'`; \
for j in *.o; do \
mv $$j $${pre}$$j; \
done; \
$(AR) ruv libbackends.a *.o 2>&1 | grep -v truncated; \
$(RM) *.o __.SYMDEF; \
echo "added backend library $$i"; \
); \
done
@mv -f tmp/libbackends.a ./libbackends.a
@$(RM) -r tmp
@if [ ! -z "$(RANLIB)" ]; then \
$(RANLIB) libbackends.a; \
fi
@ls -l libbackends.a
version.c: libbackends.a $(OBJS) $(SLAPD_LIBDEPEND)
@-$(RM) $@
$(MKVERSION) -s -n Versionstr slapd > $@
depend-local-srv: FORCE
@for i in back-* shell-backends tools; do \
if [ -d $$i ]; then \
echo; echo " cd $$i; $(MAKE) $(MFLAGS) depend"; \
( cd $$i; $(MAKE) $(MFLAGS) depend ); \
fi; \
done
clean-local-srv: FORCE
@for i in back-* shell-backends tools; do \
if [ -d $$i ]; then \
echo; echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \
( cd $$i; $(MAKE) $(MFLAGS) clean ); \
fi; \
done
rm -f *.tmp all-cffiles
veryclean-local-srv: FORCE
@for i in back-* shell-backends tools; do \
if [ -d $$i ]; then \
echo; echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \
( cd $$i; $(MAKE) $(MFLAGS) veryclean ); \
fi; \
done
install-local-srv: install-slapd install-conf install-tools
install-slapd: FORCE
-$(MKDIR) $(DESTDIR)$(libexecdir)
-$(MKDIR) $(DESTDIR)$(localstatedir)
$(LTINSTALL) $(INSTALLFLAGS) -m 755 slapd $(DESTDIR)$(libexecdir)
@if [ ! -z "$(SLAPD_MODULES)" ]; then \
for i in back-* shell-backends tools; do \
if [ -d $$i ]; then \
echo; echo " cd $$i; $(MAKE) $(MFLAGS) install"; \
( cd $$i; $(MAKE) $(MFLAGS) install ); \
fi; \
done; \
fi
CFFILES=slapd.conf slapd.at.conf slapd.oc.conf
all-cffiles: slapd
@for i in $(CFFILES); do \
tmpcf=$$i.tmp; \
$(SED) -e 's;%SYSCONFDIR%;$(sysconfdir);' \
-e 's;%LOCALSTATEDIR%;$(localstatedir);' \
$(srcdir)/$$i > $$tmpcf ; \
done
touch all-cffiles
install-conf: FORCE
@-$(MKDIR) $(DESTDIR)$(sysconfdir)
@for i in $(CFFILES); do \
tmpcf=$$i.tmp ; \
if test $$i = slapd.conf ; then \
mode=600 ; \
else \
mode=644 ; \
fi ; \
if test ! -f $(DESTDIR)$(sysconfdir)/$$i; then \
echo "installing $$i in $(sysconfdir)"; \
echo "$(INSTALL) $(INSTALLFLAGS) -m $$mode $$tmpcf $(DESTDIR)$(sysconfdir)/$$i"; \
$(INSTALL) $(INSTALLFLAGS) -m $$mode $$tmpcf $(DESTDIR)$(sysconfdir)/$$i; \
else \
echo "PRESERVING EXISTING CONFIGURATION FILE $(DESTDIR)$(sysconfdir)/$$i" ; \
fi; \
$(INSTALL) $(INSTALLFLAGS) -m $$mode $$tmpcf $(DESTDIR)$(sysconfdir)/$$i.default ; \
done
install-tools: FORCE
@-$(MKDIR) $(DESTDIR)$(sbindir)
(cd tools; $(MAKE) $(MFLAGS) install)