2003-11-26 10:58:56 +08:00
|
|
|
## Makefile.in for slapd
|
1999-09-09 06:52:19 +08:00
|
|
|
# $OpenLDAP$
|
2003-11-27 09:17:14 +08:00
|
|
|
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
|
|
|
##
|
2005-01-02 04:49:32 +08:00
|
|
|
## Copyright 1998-2005 The OpenLDAP Foundation.
|
2003-11-26 10:58:56 +08:00
|
|
|
## All rights reserved.
|
1998-10-25 09:41:42 +08:00
|
|
|
##
|
2003-11-26 10:58:56 +08:00
|
|
|
## Redistribution and use in source and binary forms, with or without
|
|
|
|
## modification, are permitted only as authorized by the OpenLDAP
|
|
|
|
## Public License.
|
1998-10-25 09:41:42 +08:00
|
|
|
##
|
2003-11-26 10:58:56 +08:00
|
|
|
## A copy of this license is available in the file LICENSE in the
|
|
|
|
## top-level directory of the distribution or, alternatively, at
|
|
|
|
## <http://www.OpenLDAP.org/license.html>.
|
|
|
|
|
2004-04-20 08:08:44 +08:00
|
|
|
SLAPTOOLS=slapadd slapcat slapdn slapindex slappasswd slaptest slapauth slapacl
|
2004-02-27 03:03:41 +08:00
|
|
|
PROGRAMS=slapd $(SLAPTOOLS)
|
2003-12-06 19:04:39 +08:00
|
|
|
XPROGRAMS=sslapd libbackends.a .backend liboverlays.a
|
2005-01-14 08:12:14 +08:00
|
|
|
XSRCS=version.c
|
1999-10-28 15:20:07 +08:00
|
|
|
|
2004-02-27 03:03:41 +08:00
|
|
|
SUBDIRS=back-* shell-backends slapi overlays
|
2003-12-10 16:45:53 +08:00
|
|
|
|
1999-10-28 15:20:07 +08:00
|
|
|
NT_SRCS = nt_svc.c
|
|
|
|
NT_OBJS = nt_svc.o ../../libraries/liblutil/slapdmsg.res
|
|
|
|
|
2005-02-21 02:33:40 +08:00
|
|
|
SRCS = main.c globals.c bconfig.c config.c daemon.c \
|
2003-03-01 08:14:32 +08:00
|
|
|
connection.c search.c filter.c add.c cr.c \
|
|
|
|
attr.c entry.c backend.c result.c operation.c \
|
1998-10-25 09:41:42 +08:00
|
|
|
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 \
|
1999-04-03 11:19:07 +08:00
|
|
|
phonetic.c acl.c str2filter.c aclparse.c init.c user.c \
|
1999-11-24 03:00:09 +08:00
|
|
|
repl.c lock.c controls.c extended.c kerberos.c passwd.c \
|
2000-05-25 09:49:21 +08:00
|
|
|
schema.c schema_check.c schema_init.c schema_prep.c \
|
2000-09-22 01:32:54 +08:00
|
|
|
schemaparse.c ad.c at.c mr.c syntax.c oc.c saslauthz.c \
|
2003-05-02 07:39:29 +08:00
|
|
|
oidm.c starttls.c index.c sets.c referral.c root_dse.c \
|
2004-12-10 01:35:05 +08:00
|
|
|
sasl.c module.c mra.c mods.c sl_malloc.c zn_malloc.c limits.c \
|
2004-12-05 03:41:58 +08:00
|
|
|
operational.c matchedValues.c cancel.c syncrepl.c \
|
2005-09-01 19:45:04 +08:00
|
|
|
backglue.c backover.c ctxcsn.c ldapsync.c frontend.c \
|
2004-03-18 07:25:09 +08:00
|
|
|
slapadd.c slapcat.c slapcommon.c slapdn.c slapindex.c \
|
2004-08-28 03:00:15 +08:00
|
|
|
slappasswd.c slaptest.c slapauth.c slapacl.c component.c \
|
2005-09-04 23:21:57 +08:00
|
|
|
aci.c alock.c \
|
2004-03-18 09:18:35 +08:00
|
|
|
$(@PLAT@_SRCS)
|
1999-10-28 15:20:07 +08:00
|
|
|
|
2005-02-21 02:33:40 +08:00
|
|
|
OBJS = main.o globals.o bconfig.o config.o daemon.o \
|
2003-03-01 08:14:32 +08:00
|
|
|
connection.o search.o filter.o add.o cr.o \
|
2005-05-06 08:14:36 +08:00
|
|
|
attr.o entry.o backend.o backends.o result.o operation.o \
|
1998-10-25 09:41:42 +08:00
|
|
|
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 \
|
1999-04-03 11:19:07 +08:00
|
|
|
phonetic.o acl.o str2filter.o aclparse.o init.o user.o \
|
1999-11-24 03:00:09 +08:00
|
|
|
repl.o lock.o controls.o extended.o kerberos.o passwd.o \
|
2000-05-25 09:49:21 +08:00
|
|
|
schema.o schema_check.o schema_init.o schema_prep.o \
|
2000-09-22 01:32:54 +08:00
|
|
|
schemaparse.o ad.o at.o mr.o syntax.o oc.o saslauthz.o \
|
2003-05-02 07:39:29 +08:00
|
|
|
oidm.o starttls.o index.o sets.o referral.o root_dse.o \
|
2004-12-10 01:35:05 +08:00
|
|
|
sasl.o module.o mra.o mods.o sl_malloc.o zn_malloc.o limits.o \
|
2004-12-05 03:41:58 +08:00
|
|
|
operational.o matchedValues.o cancel.o syncrepl.o \
|
2005-09-01 19:45:04 +08:00
|
|
|
backglue.o backover.o ctxcsn.o ldapsync.o frontend.o \
|
2004-03-18 07:25:09 +08:00
|
|
|
slapadd.o slapcat.o slapcommon.o slapdn.o slapindex.o \
|
2004-08-28 03:00:15 +08:00
|
|
|
slappasswd.o slaptest.o slapauth.o slapacl.o component.o \
|
2005-09-04 23:21:57 +08:00
|
|
|
aci.o alock.o \
|
2004-03-18 09:18:35 +08:00
|
|
|
$(@PLAT@_OBJS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
2005-01-14 01:30:07 +08:00
|
|
|
LDAP_INCDIR= ../../include -I$(srcdir) -I$(srcdir)/slapi -I.
|
1998-10-25 09:41:42 +08:00
|
|
|
LDAP_LIBDIR= ../../libraries
|
|
|
|
|
1999-08-07 15:58:11 +08:00
|
|
|
SLAP_DIR=
|
2005-05-06 06:57:19 +08:00
|
|
|
SLAPD_STATIC_DEPENDS=@SLAPD_NO_STATIC@ libbackends.a liboverlays.a
|
2001-12-08 12:01:30 +08:00
|
|
|
SLAPD_STATIC_BACKENDS=@SLAPD_STATIC_BACKENDS@
|
|
|
|
SLAPD_DYNAMIC_BACKENDS=@SLAPD_DYNAMIC_BACKENDS@
|
2000-03-17 02:54:11 +08:00
|
|
|
|
2003-09-23 14:11:38 +08:00
|
|
|
SLAPI_LIBS=@LIBSLAPI@ @SLAPI_LIBS@
|
|
|
|
|
1999-06-25 01:06:34 +08:00
|
|
|
XDEFS = $(MODULES_CPPFLAGS)
|
2002-05-18 10:05:17 +08:00
|
|
|
XLDFLAGS = $(MODULES_LDFLAGS)
|
1999-06-25 01:06:34 +08:00
|
|
|
|
2005-05-06 06:57:19 +08:00
|
|
|
XLIBS = $(SLAPD_STATIC_DEPENDS) $(SLAPD_L)
|
2004-04-17 23:12:20 +08:00
|
|
|
XXLIBS = $(SLAPD_LIBS) $(SECURITY_LIBS) $(LUTIL_LIBS)
|
2003-09-23 14:11:38 +08:00
|
|
|
XXXLIBS = $(LTHREAD_LIBS) $(SLAPI_LIBS) $(MODULES_LIBS)
|
1999-01-10 10:25:41 +08:00
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
BUILD_OPT = "--enable-slapd"
|
|
|
|
BUILD_SRV = @BUILD_SLAPD@
|
|
|
|
|
1999-08-10 07:01:31 +08:00
|
|
|
all-local-srv: all-cffiles
|
1998-10-25 09:41:42 +08:00
|
|
|
|
2001-12-07 12:03:25 +08:00
|
|
|
NT_SLAPD_DEPENDS = slapd.exp
|
2005-05-06 08:14:36 +08:00
|
|
|
NT_SLAPD_OBJECTS = slapd.exp symdummy.o $(OBJS) version.o
|
2001-12-07 12:03:25 +08:00
|
|
|
|
2005-05-06 08:14:36 +08:00
|
|
|
UNIX_SLAPD_DEPENDS = $(SLAPD_STATIC_DEPENDS) version.o $(SLAPD_L)
|
|
|
|
UNIX_SLAPD_OBJECTS = $(OBJS) version.o
|
2001-12-07 12:03:25 +08:00
|
|
|
|
2005-05-06 06:57:19 +08:00
|
|
|
SLAPD_DEPENDS = $(@PLAT@_SLAPD_DEPENDS)
|
2001-12-07 12:03:25 +08:00
|
|
|
SLAPD_OBJECTS = $(@PLAT@_SLAPD_OBJECTS)
|
|
|
|
|
|
|
|
# Notes about slapd for Windows
|
|
|
|
# =============================
|
|
|
|
# slapd.exe must export all of its global symbols, just like a DLL.
|
|
|
|
# The purpose of this is to allow dynamic modules (dynamic backends
|
|
|
|
# or external dynamic modules) to bind with the symbols at run-time.
|
|
|
|
#
|
|
|
|
# Exporting symbols from an .EXE is a bit tricky and involves multiple
|
|
|
|
# steps. First a .DEF file must be generated. The .DEF file indicates
|
|
|
|
# the set of symbols that are to be exported. Many times, it's possible
|
|
|
|
# to manually create this file with an editor. However, with slapd,
|
|
|
|
# we want to export EVERY global symbol that it knows about (NOT including
|
|
|
|
# symbols that are imported from other DLLs). The set of symbols to
|
|
|
|
# export INCLUDES symbols from all static libraries that slapd gets
|
2003-11-26 07:22:12 +08:00
|
|
|
# linked with, e.g. avl, ldbm, lunicode, lutil, etc. This list
|
2001-12-07 12:03:25 +08:00
|
|
|
# will also include liblber and libldap_r if they were built as static
|
|
|
|
# libraries. ALSO included will be symbols from other STATIC libraries
|
|
|
|
# outside the domain of the OpenLDAP source tree, e.g. regex, ltdl,
|
|
|
|
# crypto, ssl, sasl, etc. (If these libraries are dynamic, we won't want
|
|
|
|
# to include their symbols in the list). The correct set of symbols
|
|
|
|
# CAN be determined at build time. The slapd.def target automatically
|
|
|
|
# determines the correct set of symbols and generates the slapd.def file.
|
|
|
|
#
|
|
|
|
# The slapd.def file, serving multiple purposes, will:
|
|
|
|
#
|
|
|
|
# 1) be used to generate libslapd.a, the import library for slapd.exe.
|
|
|
|
#
|
|
|
|
# 2) be used to generate the symdummy.c file.
|
|
|
|
#
|
|
|
|
# 3) be used to help create slapd.exp, the binary-formated slapd export file.
|
|
|
|
#
|
|
|
|
# The import library is used by dynamic modules at link time. With this
|
|
|
|
# library, dynamic modules indicate to the linker that it will resolve
|
|
|
|
# these symbols from the slapd.exe binary at run-time. Of course, whenever
|
|
|
|
# a module imports dynamic symbols, those symbols should be marked with
|
|
|
|
# the __declspec(dllimport) directive in the header files that the dynamic
|
|
|
|
# modules build with. In OpenLDAP, this is handled automatically in the
|
|
|
|
# header files. (See ldap_cdefs.h for an explanation). Writers of
|
|
|
|
# dynamic backend modules should keep in mind that slapd.exe might export
|
|
|
|
# other global symbols that are not part of OpenLDAP (e.g. regex, ltdl,
|
|
|
|
# crypto, ssl, sasl, etc.) When a writer actually uses (i.e. imports) these
|
|
|
|
# symbols, he must verify that the header files from these external packages
|
|
|
|
# include a mechanism to mark imported symbols with the __declspec(dllimport)
|
|
|
|
# directive. Whether or not such a mechanism exists, the writer must be
|
|
|
|
# able to include these directives appropriately when their symbols are
|
|
|
|
# being imported from slapd.exe. The directive is not completely necessary
|
|
|
|
# for functions, but it is required for variables.
|
|
|
|
#
|
|
|
|
# The symdummy.c file basically references EVERY symbol available to slapd.exe,
|
|
|
|
# including symbols that slapd.exe never actually refereneced. The file
|
|
|
|
# is compiled and included at link time. Without this object file, slapd.exe
|
|
|
|
# would NOT export symbols that it never referenced. The reason that these
|
|
|
|
# symbols must still be exported is because a dynamic module may want to
|
|
|
|
# use a symbol even if it had not been referenced by slapd.exe.
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# slapd.def REALLY depends upon all slapd objects and all static libraries
|
|
|
|
# included in $(LIBS), including static libraries outside of OpenLDAP.
|
|
|
|
# When slapd.def is built, the absolute paths to all static libraries
|
|
|
|
# (both inside and outside of OpenLDAP) are generated. We don't have
|
|
|
|
# any way to include this generated list as a dependency of slapd.def (sigh).
|
|
|
|
# Thus, we do the best we can by depending on version.o, which depends
|
|
|
|
# on its own very long list of dependencies.
|
|
|
|
#
|
2004-01-15 15:25:35 +08:00
|
|
|
slapd.def: libbackends.a liboverlays.a version.o
|
2001-12-07 12:03:25 +08:00
|
|
|
@for i in $(LDFLAGS) ; do \
|
|
|
|
path=`expr "$$i" : "-L\(.*\)"`; \
|
|
|
|
if test $$? != 0; then continue; fi; \
|
|
|
|
paths="$$paths $$path"; \
|
|
|
|
done; \
|
|
|
|
objs=""; \
|
|
|
|
for i in $(OBJS) version.o $(LIBS) ; do \
|
2001-12-18 12:02:17 +08:00
|
|
|
obj="" ; \
|
2001-12-07 12:03:25 +08:00
|
|
|
case $$i in \
|
|
|
|
-l*) \
|
|
|
|
done="" ;\
|
|
|
|
base=`expr "$$i" : "-l\(.*\)"`; \
|
|
|
|
for p in $$paths ; do \
|
2005-09-07 18:27:55 +08:00
|
|
|
for ext in la dll dll.a a ; do \
|
2001-12-07 12:03:25 +08:00
|
|
|
path=$$p/lib$$base.$$ext; \
|
|
|
|
test ! -f $$path && continue; \
|
|
|
|
if test $$ext = la ; then \
|
|
|
|
for t in dlname old_library ; do \
|
|
|
|
line=`grep "^$$t=" $$path`; \
|
|
|
|
lib=`expr "$$line" : "[^']*'\(.*\)'"`; \
|
|
|
|
test -n "$$lib" && test -f $$p/$$lib && \
|
|
|
|
path=$$p/$$lib && break; \
|
|
|
|
done; \
|
|
|
|
test $$t = dlname && ext=dll; \
|
|
|
|
test $$t = old_library && ext=a; \
|
|
|
|
fi; \
|
|
|
|
if test $$ext = a ; then \
|
|
|
|
obj=$$path; \
|
|
|
|
fi; \
|
|
|
|
done=done; \
|
|
|
|
break; \
|
|
|
|
done; \
|
|
|
|
test -n "$$done" && break; \
|
|
|
|
done; \
|
|
|
|
test -z "$$obj" && continue; \
|
|
|
|
;; \
|
2005-05-06 09:45:05 +08:00
|
|
|
*.la) \
|
2005-09-07 18:27:55 +08:00
|
|
|
if test -n "$(LTSTATIC)"; then \
|
2005-05-06 09:45:05 +08:00
|
|
|
base=`expr "$$i" : ".*/\(.*\).la"`; \
|
|
|
|
path=`expr "$$i" : "\(.*/\).*"`; \
|
|
|
|
obj=$$path.libs/$$base.a; \
|
|
|
|
fi; \
|
|
|
|
;; \
|
2005-09-07 18:27:55 +08:00
|
|
|
*.dll.a) \
|
|
|
|
;; \
|
2001-12-07 12:03:25 +08:00
|
|
|
*.o | *.a) \
|
|
|
|
obj=$$i; \
|
|
|
|
esac; \
|
|
|
|
objs="$$objs $$obj"; \
|
|
|
|
done; \
|
|
|
|
echo dlltool --exclude-symbols main,ServiceMain@8 --export-all-symbols \
|
|
|
|
--output-def $@.tmp $$objs; \
|
|
|
|
dlltool --exclude-symbols main,ServiceMain@8 --export-all-symbols \
|
|
|
|
--output-def $@.tmp $$objs;
|
|
|
|
echo EXPORTS > $@
|
|
|
|
$(SED) -e 1,2d -e 's/ @ [0-9][0-9]*//' $@.tmp | sort >> $@
|
|
|
|
$(RM) $@.tmp
|
|
|
|
|
|
|
|
symdummy.c: slapd.def
|
|
|
|
$(RM) $@
|
|
|
|
@echo "generating $@..."; \
|
|
|
|
echo "static void never_called() {" > $@.tmp; \
|
|
|
|
cat $< | while read line; \
|
2000-05-12 04:50:20 +08:00
|
|
|
do \
|
|
|
|
set dummy $$line; \
|
|
|
|
case $$# in \
|
2001-12-07 12:03:25 +08:00
|
|
|
3) \
|
2000-05-12 04:50:20 +08:00
|
|
|
echo "int $$2();" >> $@; \
|
2001-12-07 12:03:25 +08:00
|
|
|
echo "$$2();" >> $@.tmp; \
|
2000-05-12 04:50:20 +08:00
|
|
|
;; \
|
2001-12-07 12:03:25 +08:00
|
|
|
4) \
|
2000-05-12 04:50:20 +08:00
|
|
|
echo "extern int $$2;" >> $@; \
|
2001-12-07 12:03:25 +08:00
|
|
|
echo "$$2 = 0;" >> $@.tmp; \
|
2000-05-12 04:50:20 +08:00
|
|
|
;; \
|
|
|
|
esac; \
|
2001-12-07 12:03:25 +08:00
|
|
|
done; \
|
|
|
|
echo "" >> $@; \
|
|
|
|
echo "}" >> $@.tmp; \
|
|
|
|
cat $@.tmp >> $@; \
|
|
|
|
$(RM) $@.tmp
|
|
|
|
|
|
|
|
libslapd.a: symdummy.o
|
|
|
|
dlltool --dllname slapd.exe --input-def slapd.def --output-lib $@
|
|
|
|
|
|
|
|
slapd.exp: libslapd.a
|
|
|
|
@echo $(LTLINK) -Wl,--base-file,slapd.base -o slapd \
|
|
|
|
$(OBJS) symdummy.o version.o $(LIBS) $(WRAP_LIBS); \
|
|
|
|
$(LTLINK) -Wl,--base-file,slapd.base -o slapd \
|
|
|
|
$(OBJS) symdummy.o version.o $(LIBS) $(WRAP_LIBS)
|
|
|
|
$(RM) slapd.exe
|
|
|
|
@echo dlltool --dllname slapd.exe --input-def slapd.def \
|
|
|
|
--base-file slapd.base --output-exp $@; \
|
|
|
|
dlltool --dllname slapd.exe --input-def slapd.def \
|
|
|
|
--base-file slapd.base --output-exp $@; \
|
|
|
|
echo $(LTLINK) -Wl,--base-file,slapd.base -o slapd $@ \
|
|
|
|
$(OBJS) symdummy.o version.o $(LIBS) $(WRAP_LIBS); \
|
|
|
|
$(LTLINK) -Wl,--base-file,slapd.base -o slapd $@ \
|
|
|
|
$(OBJS) symdummy.o version.o $(LIBS) $(WRAP_LIBS)
|
|
|
|
$(RM) slapd.exe
|
|
|
|
@echo dlltool --dllname slapd.exe --input-def slapd.def \
|
|
|
|
--base-file slapd.base --output-exp $@; \
|
|
|
|
dlltool --dllname slapd.exe --input-def slapd.def \
|
|
|
|
--base-file slapd.base --output-exp $@
|
|
|
|
|
2003-09-26 04:33:07 +08:00
|
|
|
slapi/.libs/libslapi.a: FORCE
|
2002-12-27 20:10:05 +08:00
|
|
|
(cd slapi; $(MAKE) $(MFLAGS) all)
|
2002-12-08 01:19:29 +08:00
|
|
|
|
2003-09-26 04:33:07 +08:00
|
|
|
libslapi.a: slapi/.libs/libslapi.a
|
2003-09-23 14:11:38 +08:00
|
|
|
cp slapi/.libs/libslapi.a .
|
2002-12-27 19:48:41 +08:00
|
|
|
|
2002-12-27 20:10:05 +08:00
|
|
|
slapd: $(SLAPD_DEPENDS) @LIBSLAPI@
|
2002-12-08 01:19:29 +08:00
|
|
|
$(LTLINK) -o $@ $(SLAPD_OBJECTS) $(LIBS) \
|
|
|
|
$(WRAP_LIBS)
|
2004-09-05 11:24:28 +08:00
|
|
|
$(RM) $(SLAPTOOLS)
|
2004-02-27 03:03:41 +08:00
|
|
|
for i in $(SLAPTOOLS); do \
|
2004-07-21 05:40:33 +08:00
|
|
|
$(LN_S) slapd$(EXEEXT) $$i$(EXEEXT); done
|
2004-02-27 03:03:41 +08:00
|
|
|
|
1998-11-22 12:22:28 +08:00
|
|
|
|
2005-05-06 08:14:36 +08:00
|
|
|
sslapd: version.o
|
|
|
|
$(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS) $(WRAP_LIBS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
2004-11-24 14:41:21 +08:00
|
|
|
dummy $(SLAPD_DYNAMIC_BACKENDS): slapd
|
2004-03-28 07:20:55 +08:00
|
|
|
cd $@; $(MAKE) $(MFLAGS) all
|
|
|
|
@touch $@
|
2002-09-04 18:58:25 +08:00
|
|
|
|
2005-05-06 06:57:19 +08:00
|
|
|
dynamic_overlays: slapd
|
|
|
|
cd overlays; $(MAKE) $(MFLAGS) dynamic
|
|
|
|
|
2001-12-07 12:03:25 +08:00
|
|
|
#
|
|
|
|
# In Windows, dynamic backends have to be built after slapd. For this
|
|
|
|
# reason, we only build static backends now and dynamic backends later.
|
|
|
|
#
|
|
|
|
.backend: FORCE
|
2001-12-08 12:01:30 +08:00
|
|
|
@if test -n "$(SLAPD_STATIC_BACKENDS)"; then \
|
|
|
|
echo "building static backends..."; \
|
|
|
|
for i in XX $(SLAPD_STATIC_BACKENDS); do \
|
|
|
|
if test $$i != XX; then \
|
|
|
|
echo " "; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \
|
2001-12-07 12:03:25 +08:00
|
|
|
( cd $$i; $(MAKE) $(MFLAGS) all ); \
|
2001-12-08 12:01:30 +08:00
|
|
|
if test $$? != 0; then exit 1; fi; \
|
1999-07-25 05:40:58 +08:00
|
|
|
fi; \
|
2001-12-08 12:01:30 +08:00
|
|
|
done; \
|
|
|
|
echo " "; \
|
|
|
|
fi
|
1999-08-09 09:29:27 +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; \
|
2001-12-07 12:03:25 +08:00
|
|
|
pre=`echo $$i | $(SED) -e 's/\/.*$$//' -e 's/back-//'`; \
|
1998-10-25 09:41:42 +08:00
|
|
|
for j in *.o; do \
|
|
|
|
mv $$j $${pre}$$j; \
|
|
|
|
done; \
|
|
|
|
$(AR) ruv libbackends.a *.o 2>&1 | grep -v truncated; \
|
2000-06-14 01:24:18 +08:00
|
|
|
$(RM) *.o __.SYMDEF ________64ELEL_ ; \
|
1998-10-25 09:41:42 +08:00
|
|
|
echo "added backend library $$i"; \
|
2001-12-07 12:03:25 +08:00
|
|
|
echo ""; \
|
1998-10-25 09:41:42 +08:00
|
|
|
); \
|
|
|
|
done
|
|
|
|
@mv -f tmp/libbackends.a ./libbackends.a
|
|
|
|
@$(RM) -r tmp
|
2000-10-05 01:00:03 +08:00
|
|
|
@if test ! -z "$(RANLIB)" ; then \
|
1998-10-25 09:41:42 +08:00
|
|
|
$(RANLIB) libbackends.a; \
|
|
|
|
fi
|
2001-12-07 12:03:25 +08:00
|
|
|
@ls -l libbackends.a; echo ""
|
1998-10-25 09:41:42 +08:00
|
|
|
|
2003-12-06 19:04:39 +08:00
|
|
|
liboverlays.a: FORCE
|
2005-05-06 06:57:19 +08:00
|
|
|
cd overlays; $(MAKE) $(MFLAGS) static
|
2003-12-06 19:04:39 +08:00
|
|
|
|
2003-03-29 02:42:12 +08:00
|
|
|
version.c: Makefile
|
1999-04-28 13:40:17 +08:00
|
|
|
@-$(RM) $@
|
1999-04-29 04:39:40 +08:00
|
|
|
$(MKVERSION) -s -n Versionstr slapd > $@
|
1999-07-13 12:13:21 +08:00
|
|
|
|
2003-03-29 02:42:12 +08:00
|
|
|
version.o: version.c $(OBJS) $(SLAPD_LIBDEPEND)
|
|
|
|
|
2005-01-14 08:12:14 +08:00
|
|
|
backends.o: backends.c $(srcdir)/slap.h
|
|
|
|
|
1998-12-20 08:55:39 +08:00
|
|
|
depend-local-srv: FORCE
|
2003-12-10 16:45:53 +08:00
|
|
|
@for i in $(SUBDIRS); do \
|
2000-10-05 01:00:03 +08:00
|
|
|
if test -d $$i -a -f $$i/Makefile ; then \
|
1998-11-22 14:24:59 +08:00
|
|
|
echo; echo " cd $$i; $(MAKE) $(MFLAGS) depend"; \
|
|
|
|
( cd $$i; $(MAKE) $(MFLAGS) depend ); \
|
2000-06-10 01:42:40 +08:00
|
|
|
if test $$? != 0 ; then exit 1; fi ; \
|
1998-11-22 14:24:59 +08:00
|
|
|
fi; \
|
|
|
|
done
|
1999-10-28 15:20:07 +08:00
|
|
|
@echo ""
|
|
|
|
|
|
|
|
clean-local:
|
2004-09-05 11:24:28 +08:00
|
|
|
$(RM) *.exp *.def *.base *.a *.objs symdummy.c
|
1998-11-22 14:24:59 +08:00
|
|
|
|
2005-01-14 08:12:14 +08:00
|
|
|
veryclean-local:
|
|
|
|
$(RM) backends.c
|
|
|
|
|
1998-12-20 08:55:39 +08:00
|
|
|
clean-local-srv: FORCE
|
2003-12-10 16:45:53 +08:00
|
|
|
@for i in $(SUBDIRS); do \
|
2000-10-05 01:00:03 +08:00
|
|
|
if test -d $$i -a -f $$i/Makefile ; then \
|
1998-10-25 09:41:42 +08:00
|
|
|
echo; echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \
|
|
|
|
( cd $$i; $(MAKE) $(MFLAGS) clean ); \
|
2000-06-10 01:42:40 +08:00
|
|
|
if test $$? != 0 ; then exit 1; fi ; \
|
1998-10-25 09:41:42 +08:00
|
|
|
fi; \
|
|
|
|
done
|
2004-09-05 11:24:28 +08:00
|
|
|
$(RM) *.tmp all-cffiles
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-03-01 01:07:47 +08:00
|
|
|
veryclean-local-srv: FORCE
|
2003-12-10 16:45:53 +08:00
|
|
|
@for i in $(SUBDIRS); do \
|
2000-10-05 01:00:03 +08:00
|
|
|
if test -d $$i -a -f $$i/Makefile ; then \
|
1999-03-01 01:07:47 +08:00
|
|
|
echo; echo " cd $$i; $(MAKE) $(MFLAGS) clean"; \
|
|
|
|
( cd $$i; $(MAKE) $(MFLAGS) veryclean ); \
|
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
|
2004-06-18 12:49:08 +08:00
|
|
|
install-local-srv: install-slapd install-tools \
|
|
|
|
install-conf install-db-config install-schema install-tools
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
install-slapd: FORCE
|
1999-09-23 05:51:30 +08:00
|
|
|
-$(MKDIR) $(DESTDIR)$(libexecdir)
|
2003-12-19 10:28:06 +08:00
|
|
|
-$(MKDIR) $(DESTDIR)$(localstatedir)/run
|
2005-04-14 16:57:07 +08:00
|
|
|
$(LTINSTALL) $(INSTALLFLAGS) $(STRIP) -m 755 \
|
2000-05-31 02:23:56 +08:00
|
|
|
slapd$(EXEEXT) $(DESTDIR)$(libexecdir)
|
2003-12-10 16:45:53 +08:00
|
|
|
@for i in $(SUBDIRS); do \
|
2001-12-07 12:03:25 +08:00
|
|
|
if test -d $$i -a -f $$i/Makefile ; then \
|
|
|
|
echo; echo " cd $$i; $(MAKE) $(MFLAGS) install"; \
|
|
|
|
( cd $$i; $(MAKE) $(MFLAGS) install ); \
|
|
|
|
if test $$? != 0 ; then exit 1; fi ; \
|
|
|
|
fi; \
|
|
|
|
done
|
1999-08-07 15:58:11 +08:00
|
|
|
|
2005-05-06 06:57:19 +08:00
|
|
|
all-cffiles: slapd $(SLAPD_DYNAMIC_BACKENDS) dynamic_overlays
|
2001-12-07 12:03:25 +08:00
|
|
|
@if test $(PLAT) = NT; then \
|
|
|
|
sysconfdir=`cygpath -w $(sysconfdir) | \
|
2001-12-12 06:49:16 +08:00
|
|
|
$(SED) -e 's/\\\\/\\\\\\\\\\\\\\\\/g'`; \
|
2001-12-07 12:03:25 +08:00
|
|
|
localstatedir=`cygpath -w $(localstatedir) | \
|
2001-12-12 06:49:16 +08:00
|
|
|
$(SED) -e 's/\\\\/\\\\\\\\\\\\\\\\/g'`; \
|
2001-12-07 12:03:25 +08:00
|
|
|
moduledir=`cygpath -w $(moduledir) | \
|
2001-12-12 06:49:16 +08:00
|
|
|
$(SED) -e 's/\\\\/\\\\\\\\\\\\\\\\/g'`; \
|
2001-12-07 12:03:25 +08:00
|
|
|
else \
|
|
|
|
sysconfdir=$(sysconfdir); \
|
|
|
|
localstatedir=$(localstatedir); \
|
|
|
|
moduledir=$(moduledir); \
|
|
|
|
fi; \
|
|
|
|
$(SED) -e "s;%SYSCONFDIR%;$$sysconfdir;" \
|
|
|
|
-e "s;%LOCALSTATEDIR%;$$localstatedir;" \
|
|
|
|
-e "s;%MODULEDIR%;$$moduledir;" \
|
2000-06-10 10:06:27 +08:00
|
|
|
$(srcdir)/slapd.conf > slapd.conf.tmp ; \
|
1999-03-19 04:36:42 +08:00
|
|
|
touch all-cffiles
|
|
|
|
|
1999-11-18 05:14:22 +08:00
|
|
|
install-schema: FORCE
|
2005-08-11 08:27:59 +08:00
|
|
|
@if test -d $(DESTDIR)$(schemadir) ; then \
|
2005-07-29 20:06:12 +08:00
|
|
|
echo "MOVING EXISTING SCHEMA DIR to $(DESTDIR)$(schemadir).$$$$" ; \
|
|
|
|
mv $(DESTDIR)$(schemadir) $(DESTDIR)$(schemadir).$$$$ ; \
|
|
|
|
fi
|
|
|
|
$(MKDIR) $(DESTDIR)$(schemadir)
|
|
|
|
@SD=$(DESTDIR)$(schemadir) ; \
|
2005-07-29 20:09:39 +08:00
|
|
|
files=`cd $(srcdir)/schema ; echo README *.ldif *.schema` ; \
|
2005-07-29 20:06:12 +08:00
|
|
|
for i in $$files ; do \
|
|
|
|
echo $(INSTALL) $(INSTALLFLAGS) -m 444 schema/$$i $$SD/$$i ; \
|
|
|
|
$(INSTALL) $(INSTALLFLAGS) -m 444 $(srcdir)/schema/$$i $$SD/$$i ; \
|
1999-11-18 05:14:22 +08:00
|
|
|
done
|
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
install-conf: FORCE
|
1999-09-23 05:51:30 +08:00
|
|
|
@-$(MKDIR) $(DESTDIR)$(sysconfdir)
|
2000-06-07 04:21:56 +08:00
|
|
|
$(INSTALL) $(INSTALLFLAGS) -m 600 slapd.conf.tmp $(DESTDIR)$(sysconfdir)/slapd.conf.default
|
2000-07-25 04:48:53 +08:00
|
|
|
if test ! -f $(DESTDIR)$(sysconfdir)/slapd.conf; then \
|
|
|
|
echo "installing slapd.conf in $(sysconfdir)"; \
|
2000-06-07 04:21:56 +08:00
|
|
|
echo "$(INSTALL) $(INSTALLFLAGS) -m 600 slapd.conf.tmp $(DESTDIR)$(sysconfdir)/slapd.conf"; \
|
|
|
|
$(INSTALL) $(INSTALLFLAGS) -m 600 slapd.conf.tmp $(DESTDIR)$(sysconfdir)/slapd.conf; \
|
2000-06-05 15:17:51 +08:00
|
|
|
else \
|
2000-06-07 04:21:56 +08:00
|
|
|
echo "PRESERVING EXISTING CONFIGURATION FILE $(DESTDIR)$(sysconfdir)/slapd.conf" ; \
|
|
|
|
fi
|
1998-10-25 09:41:42 +08:00
|
|
|
|
2004-06-18 12:49:08 +08:00
|
|
|
install-db-config: FORCE
|
|
|
|
@-$(MKDIR) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir)
|
|
|
|
@-$(INSTALL) -m 700 -d $(DESTDIR)$(localstatedir)/openldap-data
|
2004-06-19 06:21:01 +08:00
|
|
|
$(INSTALL) $(INSTALLFLAGS) -m 600 $(srcdir)/DB_CONFIG \
|
2004-06-18 12:49:08 +08:00
|
|
|
$(DESTDIR)$(localstatedir)/openldap-data/DB_CONFIG.example
|
2004-06-19 06:21:01 +08:00
|
|
|
$(INSTALL) $(INSTALLFLAGS) -m 600 $(srcdir)/DB_CONFIG \
|
2004-06-18 12:49:08 +08:00
|
|
|
$(DESTDIR)$(sysconfdir)/DB_CONFIG.example
|
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
install-tools: FORCE
|
2004-02-27 03:03:41 +08:00
|
|
|
-$(MKDIR) $(DESTDIR)$(sbindir)
|
|
|
|
for i in $(SLAPTOOLS); do \
|
2004-09-05 11:24:28 +08:00
|
|
|
$(RM) $(DESTDIR)$(sbindir)/$$i$(EXEEXT); \
|
|
|
|
$(LN_S) -f $(DESTDIR)$(libexecdir)/slapd$(EXEEXT) $(DESTDIR)$(sbindir)/$$i$(EXEEXT); \
|
2004-04-08 00:55:04 +08:00
|
|
|
done
|
1999-07-25 05:40:58 +08:00
|
|
|
|