1998-10-25 09:41:42 +08:00
|
|
|
##
|
|
|
|
## Makefile.in for slapd
|
|
|
|
##
|
|
|
|
PROGRAMS=slapd
|
1998-11-22 12:22:28 +08:00
|
|
|
XPROGRAMS=sslapd libbackends.a .backend
|
1998-11-22 14:24:59 +08:00
|
|
|
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 \
|
1998-11-05 09:30:02 +08:00
|
|
|
repl.c lock.c \
|
1998-10-25 09:54:37 +08:00
|
|
|
suffixalias.c schema.c schemaparse.c monitor.c configinfo.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 \
|
1998-11-05 09:30:02 +08:00
|
|
|
repl.o lock.o \
|
1998-10-25 09:41:42 +08:00
|
|
|
suffixalias.o schema.o schemaparse.o monitor.o configinfo.o
|
|
|
|
|
|
|
|
LDAP_INCDIR= ../../include
|
|
|
|
LDAP_LIBDIR= ../../libraries
|
|
|
|
|
|
|
|
BUILD_OPT = "--enable-slapd"
|
|
|
|
BUILD_SRV = @BUILD_SLAPD@
|
|
|
|
|
|
|
|
all-local: FORCE
|
|
|
|
$(MAKE) $(MFLAGS) backendslib
|
|
|
|
$(MAKE) $(MFLAGS) slapd
|
|
|
|
(cd tools; $(MAKE) $(MFLAGS) all)
|
|
|
|
|
|
|
|
XLIBS = @SLAPD_LIBS@ libbackends.a \
|
1998-11-26 07:49:12 +08:00
|
|
|
-lavl -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ \
|
|
|
|
$(KRB_LIBS) -llutil @LUTIL_LIBS@
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
slapd: version.o
|
1998-11-22 12:22:28 +08:00
|
|
|
$(LTLINK) -o $@ $(OBJS) version.o $(LIBS)
|
|
|
|
|
|
|
|
sslapd: version.o
|
|
|
|
$(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS)
|
1998-10-25 09:41:42 +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
|
|
|
|
|
|
|
|
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) $(LDAP_LIBDEPEND) \
|
|
|
|
$(LDAP_LIBDIR)/libldbm.a \
|
|
|
|
$(LDAP_LIBDIR)/libavl.a \
|
|
|
|
$(LDAP_LIBDIR)/libldif.a \
|
|
|
|
$(LDAP_LIBDIR)/liblutil.a \
|
|
|
|
$(LDAP_LIBDIR)/liblthread.a
|
|
|
|
$(RM) $@
|
|
|
|
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
|
|
|
|
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
|
|
|
|
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
|
|
|
|
-e "s|%VERSION%|$${v}|" \
|
|
|
|
< $(srcdir)/Version.c > $@)
|
|
|
|
|
1998-11-22 14:24:59 +08:00
|
|
|
depend-local: 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
|
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
clean-local: FORCE
|
1998-11-22 14:24:59 +08:00
|
|
|
@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
|
|
|
|
|
1998-11-22 14:24:59 +08:00
|
|
|
veryclean-local: FORCE
|
|
|
|
@for i in back-* shell-backends tools; do \
|
|
|
|
if [ -d $$i ]; then \
|
|
|
|
echo; echo " cd $$i; $(MAKE) $(MFLAGS) veryclean"; \
|
|
|
|
( cd $$i; $(MAKE) $(MFLAGS) veryclean ); \
|
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
install-local: install-slapd install-conf install-tools
|
|
|
|
|
|
|
|
install-slapd: FORCE
|
|
|
|
@-$(MKDIR) $(libexecdir)
|
1998-11-22 12:22:28 +08:00
|
|
|
$(LTINSTALL) $(INSTALLFLAGS) -m 755 slapd $(libexecdir)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1998-11-30 03:48:28 +08:00
|
|
|
CFFILES=slapd.conf slapd.at.conf slapd.oc.conf
|
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
install-conf: FORCE
|
1998-11-30 03:48:28 +08:00
|
|
|
@-$(MKDIR) $(sysconfdir)
|
|
|
|
@for i in $(CFFILES); do \
|
|
|
|
tmpcf=/tmp/$$i.$$ ; \
|
|
|
|
$(SED) -e 's;%SYSCONFDIR%;$(sysconfdir);' $$i > $$tmpcf ; \
|
|
|
|
if test ! -f $(sysconfdir)/$$i; then \
|
|
|
|
echo "installing $$i in $(sysconfdir)"; \
|
|
|
|
echo "$(INSTALL) $(INSTALLFLAGS) -m 644 $$tmpcf $(sysconfdir)/$$i"; \
|
|
|
|
$(INSTALL) $(INSTALLFLAGS) -m 644 $$tmpcf $(sysconfdir)/$$i; \
|
|
|
|
else \
|
|
|
|
echo "PRESERVING EXISTING CONFIGURATION FILE $(sysconfdir)/$$i" ; \
|
|
|
|
fi; \
|
|
|
|
$(INSTALL) $(INSTALLFLAGS) -m 644 $$tmpcf $(sysconfdir)/$$i.default; \
|
|
|
|
$(RM) -f /tmp/slapd.$$ ; \
|
|
|
|
done
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
install-tools: FORCE
|
|
|
|
@-$(MKDIR) $(sbindir)
|
|
|
|
(cd tools; $(MAKE) $(MFLAGS) install)
|
|
|
|
|