openldap/servers/slapd/Makefile.in

226 lines
6.3 KiB
Makefile
Raw Normal View History

1999-09-09 06:52:19 +08:00
# $OpenLDAP$
1998-10-25 09:41:42 +08:00
##
## Makefile.in for slapd
##
PROGRAMS=slapd
XPROGRAMS=sslapd libbackends.a .backend
XSRCS=version.c
NT_SRCS = nt_svc.c
NT_OBJS = nt_svc.o ../../libraries/liblutil/slapdmsg.res
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 kerberos.c passwd.c \
schema.c schema_check.c schema_init.c schemaparse.c \
ad.c at.c mr.c syntax.c oc.c \
monitor.c configinfo.c starttls.c \
root_dse.c sasl.c module.c suffixalias.c $(@PLAT@_SRCS)
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 kerberos.o passwd.o \
schema.o schema_check.o schema_init.o schemaparse.o \
ad.o at.o mr.o syntax.o oc.o \
monitor.o configinfo.o starttls.o \
root_dse.o sasl.o module.o suffixalias.o $(@PLAT@_OBJS)
1998-10-25 09:41:42 +08:00
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 -llutil -lldap_r -llber
XXLIBS = $(LDBM_LIBS) $(SLAPD_LIBS) \
$(SECURITY_LIBS) \
$(LDIF_LIBS) $(LUTIL_LIBS)
XXXLIBS = $(LTHREAD_LIBS) $(MODULES_LIBS)
1998-10-25 09:41:42 +08:00
BUILD_OPT = "--enable-slapd"
BUILD_SRV = @BUILD_SLAPD@
all-local-srv: all-cffiles
1998-10-25 09:41:42 +08:00
NT_GEN_DEFS = -DLIBLUTIL_DECL=dllexport -DLIBAVL_DECL=dllexport \
-DLIBLDBM_DECL=dllexport -DLIBLDIF_DECL=dllexport
1999-11-28 07:40:08 +08:00
NT_DYN_DEFS = -DLIBLBER_DECL=dllimport -DLIBLDAP_DECL=dllimport
DEFINES = $(@PLAT@_@LIB_LINKAGE@_DEFS)
slapd.def: slapd.syms
( \
echo EXPORTS > $@; \
_hint=1; \
for symbol in `cat $<`; do \
echo " $$symbol @ $$_hint ; " >> $@; \
_hint=`expr 1 + $$_hint`; \
done \
)
slapd.base: version.o
$(LTLINK) -o slapd $(OBJS) version.o $(LIBS) $(WRAP_LIBS) \
-Wl,--base-file,$@
rm -f slapd
slapd.exp: slapd.def slapd.base
dlltool --dllname slapd.exe --def slapd.def --base-file slapd.base \
--output-exp $@
libslapd.a: slapd.def
dlltool --dllname slapd.exe --def $< --output-lib $@
NT_EXP = slapd.exp
NT_IMP_LIB = libslapd.a
slapd: $(@PLAT@_IMP_LIB) libbackends.a version.o $(@PLAT@_EXP)
$(LTLINK) -o $@ $(OBJS) version.o $(LIBS) $(WRAP_LIBS) $(@PLAT@_EXP)
1999-08-07 19:37:43 +08:00
(cd tools; $(MAKE) $(MFLAGS) all)
1999-07-25 05:40:58 +08:00
sslapd: version.o
$(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS) $(WRAP_LIBS)
1998-10-25 09:41:42 +08:00
.backend: FORCE
1999-07-25 05:40:58 +08:00
@for i in back-*; do \
if [ -d $$i ]; then \
echo " "; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \
( cd $$i; $(MAKE) $(MFLAGS) all ); \
fi; \
done; \
1999-08-07 19:37:43 +08:00
echo " "
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
@echo ""
clean-local:
rm -f *.exp *.def *.base *.a
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
1999-11-18 05:14:22 +08:00
install-local-srv: install-slapd install-conf install-schema install-tools
1998-10-25 09:41:42 +08:00
install-slapd: FORCE
-$(MKDIR) $(DESTDIR)$(libexecdir)
-$(MKDIR) $(DESTDIR)$(localstatedir)
$(LTINSTALL) $(INSTALLFLAGS) -m 755 slapd$(EXEEXT) \
$(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
1998-10-25 09:41:42 +08:00
CFFILES=slapd.conf slapd.at.conf slapd.oc.conf
1999-08-07 19:37:43 +08:00
all-cffiles: slapd
@for i in $(CFFILES); do \
tmpcf=$$i.tmp; \
$(SED) -e 's;%SYSCONFDIR%;$(sysconfdir);' \
-e 's;%LOCALSTATEDIR%;$(localstatedir);' \
-e 's;%MODULEDIR%;$(moduledir);' \
$(srcdir)/$$i > $$tmpcf ; \
done
touch all-cffiles
1999-11-18 05:14:22 +08:00
install-schema: FORCE
@-$(MKDIR) $(DESTDIR)$(sysconfdir)/schema
2000-02-13 04:04:45 +08:00
@cd $(srcdir) ; \
for i in schema/*.schema schema/*.conf ; do \
1999-11-18 05:14:22 +08:00
if test ! -f $(DESTDIR)$(sysconfdir)/$$i; then \
echo "installing $$i in $(sysconfdir)"; \
echo $(INSTALL) $(INSTALLFLAGS) $$i $(DESTDIR)$(sysconfdir)/$$i; \
$(INSTALL) $(INSTALLFLAGS) $$i $(DESTDIR)$(sysconfdir)/$$i; \
else \
echo "PRESERVING EXISTING SCHEMA FILE $(DESTDIR)$(sysconfdir)/$$i"; \
fi; \
$(INSTALL) $(INSTALLFLAGS) $$i $(DESTDIR)$(sysconfdir)/$$i.default ; \
done
1998-10-25 09:41:42 +08:00
install-conf: FORCE
@-$(MKDIR) $(DESTDIR)$(sysconfdir)
@-$(MKDIR) $(DESTDIR)$(localstatedir)/openldap-ldbm
@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 $(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
1998-10-25 09:41:42 +08:00
install-tools: FORCE
@-$(MKDIR) $(DESTDIR)$(sbindir)
1998-10-25 09:41:42 +08:00
(cd tools; $(MAKE) $(MFLAGS) install)
1999-07-25 05:40:58 +08:00