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
|
|
|
|
#
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
HAVE_ISODE = @HAVE_ISODE@
|
|
|
|
BUILD_LDBM = @BUILD_LDBM@
|
|
|
|
|
|
|
|
LDAP_INCDIR= ../../../include
|
|
|
|
LDAP_LIBDIR= ../../../libraries
|
|
|
|
|
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-01-14 14:33:09 +08:00
|
|
|
$(PERL_LDFLAGS) $(LDBM_LIBS) $(KRB_LIBS) $(LUTIL_LIBS)
|
1999-01-14 09:31:43 +08:00
|
|
|
XXXLIBS = $(LTHREAD_LIBS)
|
1999-01-10 10:25:41 +08:00
|
|
|
|
1998-10-25 09:41:42 +08:00
|
|
|
PROGRAMS=ldif2index ldif2ldbm ldbmcat ldif2id2entry \
|
|
|
|
ldif2id2children centipede ldbmtest ldif
|
|
|
|
|
|
|
|
SRCS = centipede.c ldbmcat.c ldbmtest.c sizecount.c \
|
|
|
|
ldif.c ldif2id2children.c ldif2id2entry.c ldif2index.c ldif2ldbm.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
|
|
|
|
|
|
|
|
OBJS2 = ../config.o ../ch_malloc.o ../backend.o ../charray.o \
|
|
|
|
../aclparse.o ../schema.o ../result.o ../filterentry.o \
|
|
|
|
../acl.o ../phonetic.o ../attr.o ../value.o ../entry.o \
|
|
|
|
../dn.o ../filter.o ../str2filter.o ../ava.o ../init.o \
|
|
|
|
../schemaparse.o
|
|
|
|
|
|
|
|
all-local: build-ldbm 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
|
|
|
|
|
|
|
|
ldbm-tools: $(PROGRAMS)
|
|
|
|
|
|
|
|
build-edb2ldif: FORCE
|
|
|
|
@if [ "$(HAVE_ISODE)" = "yes" ]; then \
|
|
|
|
$(MAKE) $(MFLAGS) edb2ldif; \
|
|
|
|
else \
|
|
|
|
echo "run configure with --with-isode to build edb2ldif"; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
edb2ldif: edb2-vers.o
|
|
|
|
$(CC) $(LDFLAGS) -o $@ $(EDB2LDIFOBJS) edb2-vers.o $(LIBS)
|
|
|
|
|
|
|
|
edb2-vers.c: $(EDB2LDIFOBJS)
|
|
|
|
$(RM) $@
|
|
|
|
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
|
|
|
|
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
|
|
|
|
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
|
|
|
|
-e "s|%VERSION%|$${v}|" \
|
|
|
|
< Vers-edb2.c > $@)
|
|
|
|
|
|
|
|
build-chlog2replog: FORCE
|
|
|
|
@if [ "$(HAVE_ISODE)" = "yes" ]; then \
|
|
|
|
$(MAKE) $(MFLAGS) chlog2replog; \
|
|
|
|
else \
|
|
|
|
echo "run configure with --with-isode to build chlog2replog"; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
chlog2replog: chlog2replog.o ../lock.o ../ch_malloc.o
|
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
|
|
|
|
|
|
|
ldif2index: ldif2index.o ../libbackends.a $(OBJS2)
|
1998-11-22 12:22:28 +08:00
|
|
|
$(LTLINK) -o $@ ldif2index.o $(OBJS2) ../libbackends.a $(LIBS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
ldif2ldbm: ldif2ldbm.o ../libbackends.a $(OBJS2)
|
1998-11-22 12:22:28 +08:00
|
|
|
$(LTLINK) -o $@ ldif2ldbm.o $(OBJS2) ../libbackends.a $(LIBS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
ldif2id2entry: ldif2id2entry.o ../libbackends.a $(OBJS2)
|
1998-11-22 12:22:28 +08:00
|
|
|
$(LTLINK) -o $@ ldif2id2entry.o $(OBJS2) ../libbackends.a $(LIBS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
ldif2id2children: ldif2id2children.o ../libbackends.a $(OBJS2)
|
1998-11-22 12:22:28 +08:00
|
|
|
$(LTLINK) -o $@ ldif2id2children.o $(OBJS2) ../libbackends.a $(LIBS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
ldbmcat: ldbmcat.o
|
1998-11-22 12:22:28 +08:00
|
|
|
$(LTLINK) -o $@ ldbmcat.o $(LIBS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
ldif: ldif.o
|
1999-01-10 10:25:41 +08:00
|
|
|
$(LTLINK) -o $@ ldif.o $(LIBS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
centipede: centipede.o
|
1999-01-10 10:25:41 +08:00
|
|
|
$(LTLINK) -o $@ centipede.o $(LIBS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
sizecount: sizecount.o ../phonetic.o ../ch_malloc.o
|
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
|
|
|
|
|
|
|
ldbmtest: ldbmtest.o ../libbackends.a $(OBJS2)
|
1998-11-22 12:22:28 +08:00
|
|
|
$(LTLINK) -o ldbmtest ldbmtest.o $(OBJS2) ../libbackends.a $(LIBS)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
clean-local: FORCE
|
1998-11-22 14:24:59 +08:00
|
|
|
$(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) edb2-vers.c \
|
|
|
|
*.o core .libs/*
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
depend-local: FORCE
|
|
|
|
@DEPEND=no ; DEPEND_LDBM= ; DEPEND_ISODE= ; \
|
|
|
|
if [ "$(BUILD_LDBM)" = "yes" ]; then \
|
|
|
|
DEPEND_LDBM="$(SRCS)"; \
|
|
|
|
DEPEND=yes ; \
|
|
|
|
fi; \
|
|
|
|
if [ "$(HAVE_ISODE)" = "yes" ]; then \
|
|
|
|
DEPEND_ISODE="$(ISODEINCLUDEFLAG) chlog2replog.c $(EDB2LDIFSRCS)"; \
|
|
|
|
DEPEND=yes ; \
|
|
|
|
fi; \
|
|
|
|
if [ "$$DEPEND" = "yes" ]; then \
|
|
|
|
$(MKDEP) $(DEFS) $(DEFINES) $$DEPEND_ISODE $$DEPEND_LDBM; \
|
|
|
|
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
|
|
|
|
|
|
|
|
install-local: install-ldbm install-isode FORCE
|
|
|
|
|
|
|
|
install-ldbm: FORCE
|
1998-11-30 03:48:28 +08:00
|
|
|
@-$(MKDIR) $(sbindir)
|
1998-10-25 09:41:42 +08:00
|
|
|
@if [ "$(BUILD_LDBM)" = "yes" ]; then \
|
1998-11-22 12:22:28 +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) ; \
|
1998-10-25 09:41:42 +08:00
|
|
|
else \
|
|
|
|
exit 0 ; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
install-isode: FORCE
|
1998-11-30 03:48:28 +08:00
|
|
|
@-$(MKDIR) $(sbindir)
|
1998-10-25 09:41:42 +08:00
|
|
|
@if [ "$(HAVE_ISODE)" = "yes" ]; then \
|
1998-11-22 12:22:28 +08:00
|
|
|
$(LTINSTALL) $(INSTALLFLAGS) -m 755 edb2ldif $(sbindir); \
|
|
|
|
$(LTINSTALL) $(INSTALLFLAGS) -m 755 chlog2replog $(sbindir); \
|
1998-10-25 09:41:42 +08:00
|
|
|
else \
|
|
|
|
exit 0 ; \
|
|
|
|
fi
|
|
|
|
|