openldap/servers/slapd/Makefile.in

165 lines
4.2 KiB
Makefile
Raw Normal View History

1998-10-25 09:41:42 +08:00
##
## Makefile.in for slapd
##
PROGRAMS=slapd
XPROGRAMS=sslapd libbackends.a .backend
XSRCS=version.c
1998-10-25 09:41:42 +08:00
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 \
1999-07-28 02:43:30 +08:00
root_dse.c module.c suffixalias.c
1998-10-25 09:41:42 +08:00
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 \
1999-07-28 02:43:30 +08:00
root_dse.o module.o suffixalias.o
1998-10-25 09:41:42 +08:00
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
XDEFS = $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS)
# $(LTHREAD_LIBS) must be last
XLIBS = libbackends.a -lavl -lldbm -lldif -lldap_r -llber -llutil
XXLIBS = $(LDBM_LIBS) $(SLAPD_LIBS) \
1999-07-14 03:15:14 +08:00
$(PERL_LDFLAGS) $(KRB_LIBS) $(TLS_LIBS) $(LUTIL_LIBS)
XXXLIBS = $(LTHREAD_LIBS)
1998-10-25 09:41:42 +08:00
BUILD_OPT = "--enable-slapd"
BUILD_SRV = @BUILD_SLAPD@
1999-07-25 05:40:58 +08:00
all-local-srv: FORCE
$(MAKE) $(MFLAGS) backendslib
$(MAKE) $(MFLAGS) slapd
(cd tools; $(MAKE) $(MFLAGS) all)
$(MAKE) $(MFLAGS) all-cffiles
1998-10-25 09:41:42 +08:00
1999-07-25 05:40:58 +08:00
slapd: version.o
$(LTLINK) -o $@ $(OBJS) version.o $(LIBS)
1999-07-25 05:40:58 +08:00
sslapd: version.o
$(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS)
1998-10-25 09:41:42 +08:00
1999-07-25 05:40:58 +08:00
backendslib: 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 " "; \
$(MAKE) $(MFLAGS) libbackends.a
1999-07-25 05:40:58 +08:00
libbackends.a: .backend
1998-10-25 09:41:42 +08:00
@$(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) $@
1999-04-29 04:39:40 +08:00
$(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 \
1998-10-25 09:41:42 +08:00
if [ -d $$i ]; then \
echo; echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \
( cd $$i; $(MAKE) $(MFLAGS) clean ); \
fi; \
done
rm -f *.tmp all-cffiles
1998-10-25 09:41:42 +08:00
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
1998-10-25 09:41:42 +08:00
install-slapd: FORCE
@-$(MKDIR) $(libexecdir)
@-$(MKDIR) $(localstatedir)
$(LTINSTALL) $(INSTALLFLAGS) -m 755 slapd $(libexecdir)
1998-10-25 09:41:42 +08:00
CFFILES=slapd.conf slapd.at.conf slapd.oc.conf
all-cffiles:
@for i in $(CFFILES); do \
tmpcf=$$i.tmp; \
$(SED) -e 's;%SYSCONFDIR%;$(sysconfdir);' \
-e 's;%LOCALSTATEDIR%;$(localstatedir);' \
$(srcdir)/$$i > $$tmpcf ; \
done
touch all-cffiles
1998-10-25 09:41:42 +08:00
install-conf: FORCE
@-$(MKDIR) $(sysconfdir)
@for i in $(CFFILES); do \
tmpcf=$$i.tmp ; \
1999-01-16 03:57:32 +08:00
if test $$i = slapd.conf ; then \
mode=600 ; \
else \
mode=644 ; \
fi ; \
if test ! -f $(sysconfdir)/$$i; then \
echo "installing $$i in $(sysconfdir)"; \
1999-01-15 10:48:00 +08:00
echo "$(INSTALL) $(INSTALLFLAGS) -m $$mode $$tmpcf $(sysconfdir)/$$i"; \
$(INSTALL) $(INSTALLFLAGS) -m $$mode $$tmpcf $(sysconfdir)/$$i; \
else \
echo "PRESERVING EXISTING CONFIGURATION FILE $(sysconfdir)/$$i" ; \
fi; \
1999-01-15 10:48:00 +08:00
$(INSTALL) $(INSTALLFLAGS) -m $$mode $$tmpcf $(sysconfdir)/$$i.default ; \
done
1998-10-25 09:41:42 +08:00
install-tools: FORCE
@-$(MKDIR) $(sbindir)
(cd tools; $(MAKE) $(MFLAGS) install)
1999-07-25 05:40:58 +08:00