1998-10-25 09:41:42 +08:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# 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
|
|
|
|
#
|
|
|
|
#-----------------------------------------------------------------------------
|
1999-08-07 19:37:43 +08:00
|
|
|
HAVE_QUIPU = @BUILD_QUIPU@
|
1998-10-25 09:41:42 +08:00
|
|
|
BUILD_LDBM = @BUILD_LDBM@
|
1999-02-08 19:42:14 +08:00
|
|
|
BUILD_BDB2 = @BUILD_BDB2@
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
LDAP_INCDIR= ../../../include
|
|
|
|
LDAP_LIBDIR= ../../../libraries
|
|
|
|
|
1999-08-07 15:58:11 +08:00
|
|
|
SLAP_DIR=../
|
|
|
|
SLAPD_MODULES = @SLAPD_MODULES_LIST@
|
1999-06-25 01:06:34 +08:00
|
|
|
XDEFS = $(MODULES_CPPFLAGS)
|
1999-08-07 15:58:11 +08:00
|
|
|
XLDFLAGS = $(MODULES_LDFLAGS) $(SLAPD_MODULES)
|
1999-06-25 01:06:34 +08:00
|
|
|
|
1999-01-28 12:34:55 +08:00
|
|
|
XLIBS = -lavl -lldif -lldbm -lldap_r -llber -llutil
|
1999-01-14 09:31:43 +08:00
|
|
|
XXLIBS = $(LDAPD_LIBS) $(SLAPD_LIBS) \
|
1999-08-05 10:25:19 +08:00
|
|
|
$(PERL_LDFLAGS) $(LDBM_LIBS) $(SECURITY_LIBS) \
|
1999-07-31 11:23:26 +08:00
|
|
|
$(LDIF_LIBS) $(LUTIL_LIBS)
|
1999-08-07 15:58:11 +08:00
|
|
|
XXXLIBS = $(LTHREAD_LIBS) $(MODULES_LIBS)
|
1999-01-10 10:25:41 +08:00
|
|
|
|
1999-02-08 19:42:14 +08:00
|
|
|
PROGRAMS=ldif2index ldif2ldbm ldbmcat ldif2id2entry ldif2id2children \
|
|
|
|
centipede ldbmtest ldif
|
|
|
|
|
|
|
|
PROGRAMS2=ldif2index-bdb2 ldif2ldbm-bdb2 \
|
|
|
|
ldif2id2entry-bdb2 ldif2id2children-bdb2
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
SRCS = centipede.c ldbmcat.c ldbmtest.c sizecount.c \
|
1999-03-22 15:14:54 +08:00
|
|
|
ldif.c ldif2id2children.c ldif2id2entry.c ldif2index.c ldif2ldbm.c \
|
1999-08-04 13:49:36 +08:00
|
|
|
mimic.c ldif2common.c
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-02-08 19:42:14 +08:00
|
|
|
SRCS2 = ldif2id2children-bdb2.c ldif2id2entry-bdb2.c \
|
|
|
|
ldif2index-bdb2.c ldif2ldbm-bdb2.c
|
|
|
|
|
1998-11-22 14:24:59 +08:00
|
|
|
XSRCS = edb2-vers.c
|
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
EDB2LDIFSRCS = edb2ldif.c ldapsyntax.c
|
|
|
|
EDB2LDIFOBJS = edb2ldif.o ldapsyntax.o
|
|
|
|
|
1999-08-04 13:49:36 +08:00
|
|
|
OBJS1 = mimic.o \
|
1999-03-22 15:14:54 +08:00
|
|
|
../config.o ../ch_malloc.o ../backend.o ../charray.o \
|
1999-06-25 01:06:34 +08:00
|
|
|
../module.o ../aclparse.o ../schema.o ../filterentry.o \
|
1998-10-25 09:41:42 +08:00
|
|
|
../acl.o ../phonetic.o ../attr.o ../value.o ../entry.o \
|
|
|
|
../dn.o ../filter.o ../str2filter.o ../ava.o ../init.o \
|
1999-07-16 10:45:46 +08:00
|
|
|
../controls.o ../schemaparse.o
|
1999-08-04 13:49:36 +08:00
|
|
|
OBJS2 = $(OBJS1) ldif2common.o
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-02-08 19:42:14 +08:00
|
|
|
all-local: build-ldbm build-bdb2 build-edb2ldif build-chlog2replog
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-08-07 19:37:43 +08:00
|
|
|
build-ldbm: ldbm-tools-$(BUILD_LDBM)
|
|
|
|
ldbm-tools-no:
|
|
|
|
@echo "run configure with --enable-ldbm to build LDBM tools"
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-08-07 19:37:43 +08:00
|
|
|
build-bdb2: bdb2-tools-$(BUILD_BDB2)
|
|
|
|
bdb2-tools-no:
|
|
|
|
@echo "run configure with --enable-bdb2 to build BDB2 tools"
|
1999-02-08 19:42:14 +08:00
|
|
|
|
1999-08-07 19:37:43 +08:00
|
|
|
ldbm-tools-yes ldbm-tools-mod: $(PROGRAMS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-08-07 19:37:43 +08:00
|
|
|
bdb2-tools-yes bdb2-tools-mod: $(PROGRAMS2)
|
1999-02-08 19:42:14 +08:00
|
|
|
|
1999-08-07 19:37:43 +08:00
|
|
|
build-edb2ldif: edb-$(HAVE_QUIPU)
|
|
|
|
edb-no:
|
|
|
|
@echo "run configure with --enable-quipu to build edb2ldif"
|
|
|
|
edb-yes: edb2ldif
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
edb2ldif: edb2-vers.o
|
|
|
|
$(CC) $(LDFLAGS) -o $@ $(EDB2LDIFOBJS) edb2-vers.o $(LIBS)
|
|
|
|
|
|
|
|
edb2-vers.c: $(EDB2LDIFOBJS)
|
1999-04-28 13:40:17 +08:00
|
|
|
@-$(RM) $@
|
|
|
|
$(MKVERSION) ebd2ldif > $@
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-08-07 19:37:43 +08:00
|
|
|
build-chlog2replog: chlog-$(HAVE_QUIPU)
|
|
|
|
chlog-no:
|
|
|
|
@echo "run configure with --enable-quipu to build chlog2replog"
|
|
|
|
chlog-yes: chlog2replog
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-02-03 13:25:04 +08:00
|
|
|
chlog2replog: chlog2replog.o ../lock.o ../ch_malloc.o $(SLAPD_LIBDEPEND)
|
1998-11-22 12:22:28 +08:00
|
|
|
$(LTLINK) -o $@ chlog2replog.o ../lock.o ../ch_malloc.o $(LIBS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-02-03 13:25:04 +08:00
|
|
|
ldif2index: ldif2index.o ../libbackends.a $(OBJS2) $(SLAPD_LIBDEPEND)
|
1998-11-22 12:22:28 +08:00
|
|
|
$(LTLINK) -o $@ ldif2index.o $(OBJS2) ../libbackends.a $(LIBS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-02-08 19:42:14 +08:00
|
|
|
ldif2index-bdb2: ldif2index-bdb2.o ../libbackends.a \
|
|
|
|
$(OBJS2) $(SLAPD_LIBDEPEND)
|
|
|
|
$(LTLINK) -o $@ ldif2index-bdb2.o $(OBJS2) ../libbackends.a $(LIBS)
|
|
|
|
|
1999-02-03 13:25:04 +08:00
|
|
|
ldif2ldbm: ldif2ldbm.o ../libbackends.a $(OBJS2) $(SLAPD_LIBDEPEND)
|
1998-11-22 12:22:28 +08:00
|
|
|
$(LTLINK) -o $@ ldif2ldbm.o $(OBJS2) ../libbackends.a $(LIBS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-02-08 19:42:14 +08:00
|
|
|
ldif2ldbm-bdb2: ldif2ldbm-bdb2.o ../libbackends.a $(OBJS2) $(SLAPD_LIBDEPEND)
|
|
|
|
$(LTLINK) -o $@ ldif2ldbm-bdb2.o $(OBJS2) ../libbackends.a $(LIBS)
|
|
|
|
|
1999-02-03 13:25:04 +08:00
|
|
|
ldif2id2entry: ldif2id2entry.o ../libbackends.a $(OBJS2) $(SLAPD_LIBDEPEND)
|
1998-11-22 12:22:28 +08:00
|
|
|
$(LTLINK) -o $@ ldif2id2entry.o $(OBJS2) ../libbackends.a $(LIBS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-02-08 19:42:14 +08:00
|
|
|
ldif2id2entry-bdb2: ldif2id2entry-bdb2.o ../libbackends.a \
|
|
|
|
$(OBJS2) $(SLAPD_LIBDEPEND)
|
|
|
|
$(LTLINK) -o $@ ldif2id2entry-bdb2.o $(OBJS2) ../libbackends.a $(LIBS)
|
|
|
|
|
1999-02-03 13:25:04 +08:00
|
|
|
ldif2id2children: ldif2id2children.o ../libbackends.a \
|
|
|
|
$(OBJS2) $(SLAPD_LIBDEPEND)
|
1998-11-22 12:22:28 +08:00
|
|
|
$(LTLINK) -o $@ ldif2id2children.o $(OBJS2) ../libbackends.a $(LIBS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-02-08 19:42:14 +08:00
|
|
|
ldif2id2children-bdb2: ldif2id2children-bdb2.o ../libbackends.a \
|
|
|
|
$(OBJS2) $(SLAPD_LIBDEPEND)
|
|
|
|
$(LTLINK) -o $@ ldif2id2children-bdb2.o $(OBJS2) ../libbackends.a $(LIBS)
|
|
|
|
|
1999-02-03 13:25:04 +08:00
|
|
|
ldbmcat: ldbmcat.o $(SLAPD_LIBDEPEND)
|
1998-11-22 12:22:28 +08:00
|
|
|
$(LTLINK) -o $@ ldbmcat.o $(LIBS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-02-03 13:25:04 +08:00
|
|
|
ldif: ldif.o $(SLAPD_LIBDEPEND)
|
1999-01-10 10:25:41 +08:00
|
|
|
$(LTLINK) -o $@ ldif.o $(LIBS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-02-03 13:25:04 +08:00
|
|
|
centipede: centipede.o $(SLAPD_LIBDEPEND)
|
1999-01-10 10:25:41 +08:00
|
|
|
$(LTLINK) -o $@ centipede.o $(LIBS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-02-03 13:25:04 +08:00
|
|
|
sizecount: sizecount.o ../phonetic.o ../ch_malloc.o $(SLAPD_LIBDEPEND)
|
1999-01-10 10:25:41 +08:00
|
|
|
$(LTLINK) -o $@ sizecount.o ../phonetic.o ../ch_malloc.o $(LIBS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-08-04 13:49:36 +08:00
|
|
|
ldbmtest: ldbmtest.o ../libbackends.a $(OBJS1) $(SLAPD_LIBDEPEND)
|
|
|
|
$(LTLINK) -o ldbmtest ldbmtest.o $(OBJS1) ../libbackends.a $(LIBS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
clean-local: FORCE
|
1999-02-08 19:42:14 +08:00
|
|
|
$(RM) $(PROGRAMS) $(PROGRAMS2) $(XPROGRAMS) $(XSRCS) edb2-vers.c \
|
1998-11-22 14:24:59 +08:00
|
|
|
*.o core .libs/*
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
depend-local: FORCE
|
1999-08-05 09:23:04 +08:00
|
|
|
@DEPEND=no ; DEPEND_LDBM= ; DEPEND_BDB2= ; DEPEND_QUIPU= ; \
|
1999-08-07 19:37:43 +08:00
|
|
|
if [ "$(BUILD_LDBM)" != "no" ]; then \
|
1999-04-11 01:43:27 +08:00
|
|
|
DEPEND_LDBM="$(SRCS)"; \
|
1998-10-25 09:41:42 +08:00
|
|
|
DEPEND=yes ; \
|
1999-04-11 01:43:27 +08:00
|
|
|
fi; \
|
1999-08-07 19:37:43 +08:00
|
|
|
if [ "$(BUILD_BDB2)" != "no" ]; then \
|
1999-04-11 01:43:27 +08:00
|
|
|
DEPEND_BDB2="$(SRCS2)"; \
|
1999-02-08 19:42:14 +08:00
|
|
|
DEPEND=yes ; \
|
1999-04-11 01:43:27 +08:00
|
|
|
fi; \
|
1999-08-07 19:37:43 +08:00
|
|
|
if [ "$(HAVE_QUIPU)" != "no" ]; then \
|
1999-08-05 09:23:04 +08:00
|
|
|
DEPEND_QUIPU="$(QUIPUINCLUDEFLAG) chlog2replog.c $(EDB2LDIFSRCS)"; \
|
1998-10-25 09:41:42 +08:00
|
|
|
DEPEND=yes ; \
|
1999-04-11 01:43:27 +08:00
|
|
|
fi; \
|
1998-10-25 09:41:42 +08:00
|
|
|
if [ "$$DEPEND" = "yes" ]; then \
|
1999-08-05 09:23:04 +08:00
|
|
|
$(MKDEP) $(DEFS) $(DEFINES) $$DEPEND_QUIPU \
|
1999-02-08 19:42:14 +08:00
|
|
|
$$DEPEND_LDBM $$DEPEND_BDB2; \
|
1998-10-25 09:41:42 +08:00
|
|
|
else \
|
1998-12-20 08:55:39 +08:00
|
|
|
echo "slapd-tools: no dependencies to make"; \
|
1998-10-25 09:41:42 +08:00
|
|
|
fi
|
|
|
|
|
1999-08-07 19:37:43 +08:00
|
|
|
install-local: install-ldbm-$(BUILD_LDBM) install-bdb2-$(BUILD_BDB2) \
|
|
|
|
install-quipu-$(HAVE_QUIPU)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-08-07 19:37:43 +08:00
|
|
|
install-ldbm-no install-bdb2-no install-quipu-no:
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-08-07 19:37:43 +08:00
|
|
|
install-ldbm-yes install-ldbm-mod: FORCE
|
1999-02-08 19:42:14 +08:00
|
|
|
@-$(MKDIR) $(sbindir)
|
1999-08-07 19:37:43 +08:00
|
|
|
$(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)
|
|
|
|
|
|
|
|
install-bdb2-yes install-bdb2-mod: FORCE
|
|
|
|
@-$(MKDIR) $(sbindir)
|
|
|
|
$(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)
|
1999-02-08 19:42:14 +08:00
|
|
|
|
1999-08-07 19:37:43 +08:00
|
|
|
install-quipu-yes: FORCE
|
1998-11-30 03:48:28 +08:00
|
|
|
@-$(MKDIR) $(sbindir)
|
1999-08-07 19:37:43 +08:00
|
|
|
$(LTINSTALL) $(INSTALLFLAGS) -m 755 edb2ldif $(sbindir); \
|
|
|
|
$(LTINSTALL) $(INSTALLFLAGS) -m 755 chlog2replog $(sbindir)
|
1998-10-25 09:41:42 +08:00
|
|
|
|