]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/tools/Makefile.in
allow 'all' vs. 'any' sasl-authz-policy
[openldap] / servers / slapd / tools / Makefile.in
index e083ca7ce6c5718f9877277f19bf68ac081192ce..14e887cb0baf85981ce0d29e54a486a6981145d1 100644 (file)
-#-----------------------------------------------------------------------------
-# Copyright (c) 1995 Regents of the University of Michigan.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms are permitted
-# provided that this notice is preserved and that due credit is given
-# to the University of Michigan at Ann Arbor. The name of the University
-# may not be used to endorse or promote products derived from this
-# software without specific prior written permission. This software
-# is provided ``as is'' without express or implied warranty.
-#
-#       Stand alone LDAP server tools makefile
-#
-#-----------------------------------------------------------------------------
-HAVE_QUIPU = @HAVE_QUIPU@
-BUILD_LDBM = @BUILD_LDBM@
-BUILD_BDB2 = @BUILD_BDB2@
+# Makefile.in for slapd tools
+# $OpenLDAP$
+## This work is part of OpenLDAP Software <http://www.openldap.org/>.
+##
+## Copyright 1998-2003 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>.
 
 LDAP_INCDIR= ../../../include       
 LDAP_LIBDIR= ../../../libraries
 
+SLAP_DIR=../
 XDEFS = $(MODULES_CPPFLAGS)
 XLDFLAGS = $(MODULES_LDFLAGS)
 
-XLIBS = -lavl -lldif -lldbm -lldap_r -llber -llutil
-XXLIBS = $(LDAPD_LIBS) $(SLAPD_LIBS) \
-       $(PERL_LDFLAGS) $(LDBM_LIBS) $(KRB_LIBS) $(TLS_LIBS) \
-       $(LDIF_LIBS) $(LUTIL_LIBS)
+XLIBS = $(SLAPD_L) $(LDBM_LIBS)
+XXLIBS = $(SLAPD_LIBS) \
+       $(LDBM_LIBS) $(SECURITY_LIBS) $(LUTIL_LIBS)
 XXXLIBS = $(LTHREAD_LIBS)
+SLAPI_DEP_LIBS = $(LIBS) @LIBSLAPITOOLS@ @SLAPI_LIBS@ $(MODULES_LIBS)
 
-PROGRAMS=ldif2index ldif2ldbm ldbmcat ldif2id2entry ldif2id2children \
-       centipede ldbmtest ldif
-
-PROGRAMS2=ldif2index-bdb2 ldif2ldbm-bdb2 \
-       ldif2id2entry-bdb2 ldif2id2children-bdb2
-
-SRCS = centipede.c ldbmcat.c ldbmtest.c sizecount.c \
-       ldif.c ldif2id2children.c ldif2id2entry.c ldif2index.c ldif2ldbm.c \
-       mimic.c ldif2common.c
-
-SRCS2 = ldif2id2children-bdb2.c ldif2id2entry-bdb2.c \
-       ldif2index-bdb2.c ldif2ldbm-bdb2.c
-
-XSRCS = edb2-vers.c
-
-EDB2LDIFSRCS   = edb2ldif.c ldapsyntax.c
-EDB2LDIFOBJS   = edb2ldif.o ldapsyntax.o
-
-OBJS1  = mimic.o \
-               ../config.o ../ch_malloc.o ../backend.o ../charray.o \
-               ../module.o ../aclparse.o ../schema.o ../filterentry.o \
-               ../acl.o ../phonetic.o ../attr.o ../value.o ../entry.o \
-               ../dn.o ../filter.o ../str2filter.o ../ava.o ../init.o \
-               ../controls.o ../schemaparse.o
-OBJS2  = $(OBJS1) ldif2common.o
-
-all-local: build-ldbm build-bdb2 build-edb2ldif build-chlog2replog
-
-build-ldbm: FORCE
-       @if [ "$(BUILD_LDBM)" = "yes" ]; then \
-               $(MAKE) $(MFLAGS) ldbm-tools; \
-       else \
-               echo "run configure with --with-ldbm to build LDBM tools"; \
-       fi
-
-build-bdb2: FORCE
-       @if [ "$(BUILD_BDB2)" = "yes" ]; then \
-               $(MAKE) $(MFLAGS) bdb2-tools; \
-       else \
-               echo "run configure with --enable-bdb2 to build BDB2 tools"; \
-       fi
+STATIC_DEPENDS=@SLAPD_NO_STATIC@ ../libbackends.a
 
-ldbm-tools: $(PROGRAMS)
+PROGRAMS=slapadd slapcat slapindex slappasswd
 
-bdb2-tools: $(PROGRAMS2)
+SRCS = mimic.c slapcommon.c \
+       slapadd.c slapcat.c slapindex.c slappasswd.c
 
-build-edb2ldif:        FORCE
-       @if [ "$(HAVE_QUIPU)" = "yes" ]; then \
-               $(MAKE) $(MFLAGS) edb2ldif; \
-       else \
-               echo "run configure with --enable-quipu to build edb2ldif"; \
-       fi
+SLAPD_OBJS = ../globals.o ../config.o ../ch_malloc.o ../cr.o ../backend.o \
+               ../module.o ../aclparse.o ../filterentry.o ../schema.o \
+               ../schema_check.o ../schema_init.o ../schema_prep.o \
+               ../schemaparse.o ../ad.o ../at.o ../mr.o ../oc.o \
+               ../syntax.o ../acl.o ../phonetic.o ../attr.o ../value.o \
+               ../entry.o ../dn.o ../filter.o ../str2filter.o ../ava.o \
+               ../init.o ../controls.o ../kerberos.o ../passwd.o \
+               ../index.o ../extended.o ../starttls.o ../sets.o ../mra.o \
+               ../referral.o ../backglue.o ../oidm.o ../mods.o ../operation.o \
+               ../cancel.o ../sl_malloc.o ../backover.o ../ctxcsn.o ../syncrepl.o \
+               ../ldapsync.o ../sessionlog.o
 
-edb2ldif:      edb2-vers.o
-       $(CC) $(LDFLAGS) -o $@ $(EDB2LDIFOBJS) edb2-vers.o $(LIBS)
+SLAPOBJS = $(SLAPD_OBJS) slapcommon.o mimic.o
 
-edb2-vers.c: $(EDB2LDIFOBJS)
-       @-$(RM) $@
-       $(MKVERSION) ebd2ldif > $@
+all-local: build-progs
 
-build-chlog2replog: FORCE
-       @if [ "$(HAVE_QUIPU)" = "yes" ]; then \
-               $(MAKE) $(MFLAGS) chlog2replog; \
-       else \
-               echo "run configure with --enable-quipu to build chlog2replog"; \
-       fi
+build-progs: $(PROGRAMS)
 
-chlog2replog: chlog2replog.o ../lock.o ../ch_malloc.o $(SLAPD_LIBDEPEND) 
-       $(LTLINK) -o $@ chlog2replog.o ../lock.o ../ch_malloc.o $(LIBS)
-
-ldif2index:    ldif2index.o ../libbackends.a $(OBJS2) $(SLAPD_LIBDEPEND) 
-       $(LTLINK) -o $@ ldif2index.o $(OBJS2) ../libbackends.a $(LIBS)
-
-ldif2index-bdb2:       ldif2index-bdb2.o ../libbackends.a \
-               $(OBJS2) $(SLAPD_LIBDEPEND) 
-       $(LTLINK) -o $@ ldif2index-bdb2.o $(OBJS2) ../libbackends.a $(LIBS)
-
-ldif2ldbm:     ldif2ldbm.o ../libbackends.a $(OBJS2) $(SLAPD_LIBDEPEND) 
-       $(LTLINK) -o $@ ldif2ldbm.o $(OBJS2) ../libbackends.a $(LIBS)
-
-ldif2ldbm-bdb2:        ldif2ldbm-bdb2.o ../libbackends.a $(OBJS2) $(SLAPD_LIBDEPEND) 
-       $(LTLINK) -o $@ ldif2ldbm-bdb2.o $(OBJS2) ../libbackends.a $(LIBS)
-
-ldif2id2entry: ldif2id2entry.o ../libbackends.a $(OBJS2) $(SLAPD_LIBDEPEND) 
-       $(LTLINK) -o $@ ldif2id2entry.o $(OBJS2) ../libbackends.a $(LIBS)
-
-ldif2id2entry-bdb2:    ldif2id2entry-bdb2.o ../libbackends.a \
-               $(OBJS2) $(SLAPD_LIBDEPEND) 
-       $(LTLINK) -o $@ ldif2id2entry-bdb2.o $(OBJS2) ../libbackends.a $(LIBS)
-
-ldif2id2children:      ldif2id2children.o ../libbackends.a \
-               $(OBJS2) $(SLAPD_LIBDEPEND) 
-       $(LTLINK) -o $@ ldif2id2children.o $(OBJS2) ../libbackends.a $(LIBS)
-
-ldif2id2children-bdb2: ldif2id2children-bdb2.o ../libbackends.a \
-               $(OBJS2) $(SLAPD_LIBDEPEND) 
-       $(LTLINK) -o $@ ldif2id2children-bdb2.o $(OBJS2) ../libbackends.a $(LIBS)
-
-ldbmcat:       ldbmcat.o $(SLAPD_LIBDEPEND) 
-       $(LTLINK) -o $@ ldbmcat.o $(LIBS)
-
-ldif:          ldif.o $(SLAPD_LIBDEPEND) 
-       $(LTLINK) -o $@ ldif.o $(LIBS)
+#
+# SLAP Tools
+#
+slapadd:       slapadd.o $(STATIC_DEPENDS) $(SLAPOBJS) $(SLAPD_L) 
+       $(LTLINK) -o $@ slapadd.o $(SLAPOBJS) $(STATIC_DEPENDS) \
+       $(SLAPI_DEP_LIBS)
 
-centipede:     centipede.o $(SLAPD_LIBDEPEND) 
-       $(LTLINK) -o $@ centipede.o $(LIBS)
+slapcat:       slapcat.o $(STATIC_DEPENDS) $(SLAPOBJS) $(SLAPD_L) 
+       $(LTLINK) -o $@ slapcat.o $(SLAPOBJS) $(STATIC_DEPENDS) \
+       $(SLAPI_DEP_LIBS)
 
-sizecount:     sizecount.o ../phonetic.o ../ch_malloc.o $(SLAPD_LIBDEPEND) 
-       $(LTLINK) -o $@ sizecount.o ../phonetic.o ../ch_malloc.o $(LIBS)
+slapindex:     slapindex.o $(STATIC_DEPENDS) $(SLAPOBJS) $(SLAPD_L) 
+       $(LTLINK) -o $@ slapindex.o $(SLAPOBJS) $(STATIC_DEPENDS) \
+       $(SLAPI_DEP_LIBS)
 
-ldbmtest:      ldbmtest.o ../libbackends.a $(OBJS1) $(SLAPD_LIBDEPEND
-       $(LTLINK) -o ldbmtest ldbmtest.o $(OBJS1) ../libbackends.a $(LIBS)
+slappasswd:            slappasswd.o $(SLAPD_L
+       $(LTLINK) -o $@ slappasswd.o $(LIBS)
 
 clean-local: FORCE
-       $(RM) $(PROGRAMS) $(PROGRAMS2) $(XPROGRAMS) $(XSRCS) edb2-vers.c \
-               *.o core .libs/*
+       $(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) *.o core .libs/* *.exe
 
 depend-local: FORCE
-       @DEPEND=no ; DEPEND_LDBM= ; DEPEND_BDB2= ; DEPEND_QUIPU= ; \
-       if [ "$(BUILD_LDBM)" = "yes" ]; then \
-               DEPEND_LDBM="$(SRCS)"; \
-               DEPEND=yes ; \
-       fi; \
-       if [ "$(BUILD_BDB2)" = "yes" ]; then \
-               DEPEND_BDB2="$(SRCS2)"; \
-               DEPEND=yes ; \
-       fi; \
-       if [ "$(HAVE_QUIPU)" = "yes" ]; then \
-               DEPEND_QUIPU="$(QUIPUINCLUDEFLAG) chlog2replog.c $(EDB2LDIFSRCS)"; \
-               DEPEND=yes ; \
-       fi; \
-       if [ "$$DEPEND" = "yes" ]; then \
-       $(MKDEP) $(DEFS) $(DEFINES) $$DEPEND_QUIPU \
-                       $$DEPEND_LDBM $$DEPEND_BDB2; \
-       else \
-               echo "slapd-tools: no dependencies to make"; \
-       fi
-
-install-local: install-ldbm install-bdb2 install-quipu FORCE
-
-install-ldbm: FORCE
-       @-$(MKDIR) $(sbindir) 
-       @if [ "$(BUILD_LDBM)" = "yes" ]; then \
-               $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm $(sbindir)        ; \
-               $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2index $(sbindir)       ; \
-               $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry $(sbindir)    ; \
-               $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children $(sbindir) ; \
-               $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldbmcat $(sbindir)  ; \
-               $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif $(sbindir)     ; \
-               $(LTINSTALL) $(INSTALLFLAGS) -m 755 centipede $(sbindir)        ; \
-               $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldbmtest $(sbindir) ; \
-       else \
-               exit 0 ; \
-       fi
-
-install-bdb2: FORCE
-       @-$(MKDIR) $(sbindir) 
-       @if [ "$(BUILD_BDB2)" = "yes" ]; then \
-               $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm-bdb2 $(sbindir)   ; \
-               $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2index-bdb2 $(sbindir)  ; \
-               $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry-bdb2 $(sbindir)       ; \
-               $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children-bdb2 $(sbindir) ; \
-       else \
-               exit 0 ; \
-       fi
-
-install-quipu: FORCE
-       @-$(MKDIR) $(sbindir)
-       @if [ "$(HAVE_QUIPU)" = "yes" ]; then \
-               $(LTINSTALL) $(INSTALLFLAGS) -m 755 edb2ldif $(sbindir); \
-               $(LTINSTALL) $(INSTALLFLAGS) -m 755 chlog2replog $(sbindir); \
-       else \
-               exit 0 ; \
-       fi
+       $(MKDEP) $(DEFS) $(DEFINES) $(SRCS)
+
+install-local: FORCE
+       -$(MKDIR) $(DESTDIR)$(sbindir)
+       @for bin in $(PROGRAMS); do \
+               $(LTINSTALL) $(INSTALLFLAGS) -s -m 755 \
+                       $$bin$(EXEEXT) $(DESTDIR)$(sbindir); \
+       done