]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/Makefile.in
Skip spurious Statslog's for callback-intercepted responses.
[openldap] / servers / slapd / Makefile.in
index 985bff3209fdb09a2a0813288b0220be7765c49f..6a503c3f6d1875a3282d08a6b6556a22cbbea7e5 100644 (file)
@@ -1,55 +1,71 @@
+## Makefile.in for slapd
 # $OpenLDAP$
+## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Makefile.in for slapd
+## Copyright 1998-2004 The OpenLDAP Foundation.
+## All rights reserved.
+##
+## Redistribution and use in source and binary forms, with or without
+## modification, are permitted only as authorized by the OpenLDAP
+## Public License.
 ##
+## 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>.
+
 PROGRAMS=slapd
-XPROGRAMS=sslapd libbackends.a .backend
+XPROGRAMS=sslapd libbackends.a .backend liboverlays.a
 XSRCS=version.c
 
+SUBDIRS=back-* shell-backends slapi overlays tools
+
 NT_SRCS = nt_svc.c
 NT_OBJS = nt_svc.o ../../libraries/liblutil/slapdmsg.res
 
-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 \
+SRCS   = main.c globals.c config.c daemon.c \
+               connection.c search.c filter.c add.c cr.c \
+               attr.c entry.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 schema_prep.c \
                schemaparse.c ad.c at.c mr.c syntax.c oc.c saslauthz.c \
-               configinfo.c starttls.c index.c sets.c referral.c \
-               root_dse.c sasl.c module.c suffixalias.c mra.c mods.c \
-               limits.c backglue.c operational.c \
-               $(@PLAT@_SRCS)
-
-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 \
+               oidm.c starttls.c index.c sets.c referral.c root_dse.c \
+               sasl.c module.c mra.c mods.c sl_malloc.c limits.c \
+               backglue.c operational.c matchedValues.c cancel.c syncrepl.c \
+               backover.c ctxcsn.c ldapsync.c sessionlog.c $(@PLAT@_SRCS)
+
+OBJS   = main.o globals.o config.o daemon.o \
+               connection.o search.o filter.o add.o cr.o \
+               attr.o entry.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 schema_prep.o \
                schemaparse.o ad.o at.o mr.o syntax.o oc.o saslauthz.o \
-               configinfo.o starttls.o index.o sets.o referral.o \
-               root_dse.o sasl.o module.o suffixalias.o mra.o mods.o \
-               limits.o backglue.o operational.o \
-               $(@PLAT@_OBJS)
+               oidm.o starttls.o index.o sets.o referral.o root_dse.o \
+               sasl.o module.o mra.o mods.o sl_malloc.o limits.o \
+               backglue.o operational.o matchedValues.o cancel.o syncrepl.o \
+               backover.o ctxcsn.o ldapsync.o sessionlog.o $(@PLAT@_OBJS)
 
-LDAP_INCDIR= ../../include
+LDAP_INCDIR= ../../include -I$(srcdir)/slapi
 LDAP_LIBDIR= ../../libraries
 
 SLAP_DIR=
-SLAPD_MODULES=@SLAPD_MODULES_LIST@
+SLAPD_STATIC_DEPENDS=@SLAPD_NO_STATIC@ libbackends.a liboverlays.a
 SLAPD_STATIC_BACKENDS=@SLAPD_STATIC_BACKENDS@
 SLAPD_DYNAMIC_BACKENDS=@SLAPD_DYNAMIC_BACKENDS@
 
+SLAPI_LIBS=@LIBSLAPI@ @SLAPI_LIBS@
+
 XDEFS = $(MODULES_CPPFLAGS)
-XLDFLAGS = $(MODULES_LDFLAGS) $(SLAPD_MODULES)
+XLDFLAGS = $(MODULES_LDFLAGS)
 
-# $(LTHREAD_LIBS) must be last
-XLIBS = libbackends.a -lavl @LDBM_LIB@ -lldif -llutil -llunicode -lldap_r -llber
-XXLIBS = $(LDBM_LIBS) $(SLAPD_LIBS) $(SECURITY_LIBS) $(LDIF_LIBS) $(LUTIL_LIBS)
-XXXLIBS = $(LTHREAD_LIBS) $(MODULES_LIBS)
+XLIBS = $(SLAPD_STATIC_DEPENDS) $(SLAPD_L)
+XXLIBS = $(LDBM_LIBS) $(SLAPD_LIBS) $(SECURITY_LIBS) $(LUTIL_LIBS)
+XXXLIBS = $(LTHREAD_LIBS) $(SLAPI_LIBS) $(MODULES_LIBS)
 
 BUILD_OPT = "--enable-slapd"
 BUILD_SRV = @BUILD_SLAPD@
@@ -59,7 +75,7 @@ all-local-srv: all-cffiles
 NT_SLAPD_DEPENDS = slapd.exp
 NT_SLAPD_OBJECTS = slapd.exp symdummy.o $(OBJS) version.o
 
-UNIX_SLAPD_DEPENDS = libbackends.a version.o
+UNIX_SLAPD_DEPENDS = $(SLAPD_STATIC_DEPENDS) version.o $(SLAPD_L)
 UNIX_SLAPD_OBJECTS = $(OBJS) version.o
 
 SLAPD_DEPENDS = $(@PLAT@_SLAPD_DEPENDS)
@@ -78,7 +94,7 @@ SLAPD_OBJECTS = $(@PLAT@_SLAPD_OBJECTS)
 # 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
-# linked with, e.g. avl, ldbm, ldif, lunicode, lutil, etc. This list
+# linked with, e.g. avl, ldbm, lunicode, lutil, etc. This list
 # 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,
@@ -129,7 +145,7 @@ SLAPD_OBJECTS = $(@PLAT@_SLAPD_OBJECTS)
 # Thus, we do the best we can by depending on version.o, which depends
 # on its own very long list of dependencies.
 #
-slapd.def: libbackends.a version.o
+slapd.def: libbackends.a liboverlays.a version.o
        @for i in $(LDFLAGS) ; do \
            path=`expr "$$i" : "-L\(.*\)"`; \
            if test $$? != 0; then continue; fi; \
@@ -225,24 +241,23 @@ slapd.exp: libslapd.a
        dlltool --dllname slapd.exe --input-def slapd.def \
                --base-file slapd.base --output-exp $@
 
-slapd: $(SLAPD_DEPENDS)
-       $(LTLINK) -o $@ $(SLAPD_OBJECTS) $(LIBS) $(WRAP_LIBS)
-       @if test -n "$(SLAPD_DYNAMIC_BACKENDS)"; then \
-           echo "building dynamic backends..."; \
-           for i in XX $(SLAPD_DYNAMIC_BACKENDS); do \
-               if test $$i != XX; then \
-                   echo " "; echo "  cd $$i; $(MAKE) $(MFLAGS) all"; \
-                   ( cd $$i; $(MAKE) $(MFLAGS) all ); \
-                   if test $$? != 0; then exit 1; fi; \
-               fi; \
-           done; \
-           echo " "; \
-       fi
-       cd tools; $(MAKE) $(MFLAGS) all
+slapi/.libs/libslapi.a: FORCE
+       (cd slapi; $(MAKE) $(MFLAGS) all)
+
+libslapi.a: slapi/.libs/libslapi.a
+       cp slapi/.libs/libslapi.a .
+
+slapd: $(SLAPD_DEPENDS) @LIBSLAPI@
+       $(LTLINK) -o $@ $(SLAPD_OBJECTS) $(LIBS) \
+               $(WRAP_LIBS)
 
 sslapd: version.o
        $(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS) $(WRAP_LIBS)
 
+tools $(SLAPD_DYNAMIC_BACKENDS): slapd
+       cd $@; $(MAKE) $(MFLAGS) all
+       @touch $@
+
 #
 # In Windows, dynamic backends have to be built after slapd. For this
 # reason, we only build static backends now and dynamic backends later.
@@ -284,12 +299,17 @@ libbackends.a: .backend
        fi
        @ls -l libbackends.a; echo ""
 
-version.c: $(OBJS) $(SLAPD_LIBDEPEND) 
+liboverlays.a: FORCE
+       @cd overlays; $(MAKE) $(MFLAGS) all
+
+version.c: Makefile
        @-$(RM) $@
        $(MKVERSION) -s -n Versionstr slapd > $@
 
+version.o: version.c $(OBJS) $(SLAPD_LIBDEPEND) 
+
 depend-local-srv: FORCE
-       @for i in back-* shell-backends tools; do \
+       @for i in $(SUBDIRS); do \
                if test -d $$i -a -f $$i/Makefile ; then \
                        echo; echo "  cd $$i; $(MAKE) $(MFLAGS) depend"; \
                        ( cd $$i; $(MAKE) $(MFLAGS) depend ); \
@@ -302,7 +322,7 @@ clean-local:
        rm -f *.exp *.def *.base *.a *.objs symdummy.c
 
 clean-local-srv: FORCE
-       @for i in back-* shell-backends tools; do \
+       @for i in $(SUBDIRS); do \
                if test -d $$i -a -f $$i/Makefile ; then \
                        echo; echo "  cd $$i; $(MAKE) $(MFLAGS) clean"; \
                        ( cd $$i; $(MAKE) $(MFLAGS) clean ); \
@@ -312,7 +332,7 @@ clean-local-srv: FORCE
        rm -f *.tmp all-cffiles
 
 veryclean-local-srv: FORCE
-       @for i in back-* shell-backends tools; do \
+       @for i in $(SUBDIRS); do \
                if test -d $$i -a -f $$i/Makefile ; then \
                        echo; echo "  cd $$i; $(MAKE) $(MFLAGS) clean"; \
                        ( cd $$i; $(MAKE) $(MFLAGS) veryclean ); \
@@ -323,10 +343,10 @@ install-local-srv: install-slapd install-conf install-schema install-tools
 
 install-slapd: FORCE
        -$(MKDIR) $(DESTDIR)$(libexecdir)
-       -$(MKDIR) $(DESTDIR)$(localstatedir)
+       -$(MKDIR) $(DESTDIR)$(localstatedir)/run
        $(LTINSTALL) $(INSTALLFLAGS) -s -m 755 \
                slapd$(EXEEXT) $(DESTDIR)$(libexecdir)
-       @for i in back-* shell-backends tools; do \
+       @for i in $(SUBDIRS); do \
            if test -d $$i -a -f $$i/Makefile ; then \
                echo; echo "  cd $$i; $(MAKE) $(MFLAGS) install"; \
                ( cd $$i; $(MAKE) $(MFLAGS) install ); \
@@ -334,7 +354,7 @@ install-slapd: FORCE
            fi; \
        done
 
-all-cffiles: slapd
+all-cffiles: slapd $(SLAPD_DYNAMIC_BACKENDS) tools
        @if test $(PLAT) = NT; then \
            sysconfdir=`cygpath -w $(sysconfdir) | \
                $(SED) -e 's/\\\\/\\\\\\\\\\\\\\\\/g'`; \
@@ -355,6 +375,11 @@ all-cffiles: slapd
 
 install-schema: FORCE
        @-$(MKDIR) $(DESTDIR)$(schemadir)
+       i="$(srcdir)/schema/README" ; \
+       SF=`basename $$i` ; \
+       SD="$(DESTDIR)$(schemadir)/$$SF" ; \
+       echo $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $$SD ; \
+       $(INSTALL) $(INSTALLFLAGS) -m 444 $$i $$SD
        for i in $(srcdir)/schema/*.schema ; do \
                SF=`basename $$i` ; \
                SD="$(DESTDIR)$(schemadir)/$$SF" ; \
@@ -370,7 +395,7 @@ install-schema: FORCE
 
 install-conf: FORCE
        @-$(MKDIR) $(DESTDIR)$(sysconfdir)
-       @-$(INSTALL) -m 700 -d $(DESTDIR)$(localstatedir)/openldap-ldbm
+       @-$(INSTALL) -m 700 -d $(DESTDIR)$(localstatedir)/openldap-data
        $(INSTALL) $(INSTALLFLAGS) -m 600 slapd.conf.tmp $(DESTDIR)$(sysconfdir)/slapd.conf.default
        if test ! -f $(DESTDIR)$(sysconfdir)/slapd.conf; then \
                echo "installing slapd.conf in $(sysconfdir)"; \