openldap/servers/slapd/tools/Makefile.in

175 lines
5.2 KiB
Makefile
Raw Normal View History

1999-09-09 06:52:19 +08:00
# $OpenLDAP$
2000-05-13 10:47:56 +08:00
## Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
## COPYING RESTRICTIONS APPLY, see COPYRIGHT file
1998-10-25 09:41:42 +08:00
#-----------------------------------------------------------------------------
2000-05-13 10:47:56 +08:00
# Portions Copyright (c) 1995 Regents of the University of Michigan.
1998-10-25 09:41:42 +08:00
# 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
#
#-----------------------------------------------------------------------------
BUILD_LDBM = @BUILD_LDBM@
BUILD_BDB2 = @BUILD_BDB2@
BUILD_QUIPU = @BUILD_QUIPU@
1998-10-25 09:41:42 +08:00
LDAP_INCDIR= ../../../include
LDAP_LIBDIR= ../../../libraries
SLAP_DIR=../
SLAPD_MODULES = @SLAPD_MODULES_LIST@
XDEFS = $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS) $(SLAPD_MODULES)
XLIBS = -lavl -lldif -lldbm -llutil -lldap_r -llber
XXLIBS = $(QUIPU_LIBS) $(SLAPD_LIBS) \
$(LDBM_LIBS) $(SECURITY_LIBS) \
$(LDIF_LIBS) $(LUTIL_LIBS)
XXXLIBS = $(LTHREAD_LIBS) $(MODULES_LIBS)
1999-12-16 10:18:50 +08:00
PROGRAMS=ldif slappasswd slapadd slapcat slapindex
LDBMPROGRAMS=centipede sizecount
BDB2PROGRAMS=
QUIPUPROGRAMS=chlog2replog edb2ldif
# CPPFLAGS will include the defines for dynamic libs in Mingw32.
NT_DYN_DEFS = -DLIBLBER_DECL=dllimport -DLIBLDAP_DECL=dllimport
CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_DEFS)
SRCS = ldif.c mimic.c slapcommon.c
XSRCS = edb2-vers.c
LDBMSRCS = centipede.c sizecount.c
BDB2SRCS =
1998-10-25 09:41:42 +08:00
QUIPUSRCS = edb2ldif.c ldapsyntax.c chlog2replog.c
SLAPD_OBJS = ../config.o ../ch_malloc.o ../backend.o ../charray.o \
../module.o ../aclparse.o ../filterentry.o \
2000-05-25 11:46:55 +08:00
../schema.o ../schema_check.o ../schema_init.o ../schema_prep.o \
2000-05-25 09:49:21 +08:00
../schemaparse.o ../ad.o ../at.o ../mr.o ../oc.o ../syntax.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 \
../controls.o ../kerberos.o ../passwd.o \
../extended.o ../starttls.o
1999-12-16 10:18:50 +08:00
SLAPOBJS = $(SLAPD_OBJS) slapcommon.o mimic.o
1998-10-25 09:41:42 +08:00
EDB2LDIFSRCS = edb2ldif.c ldapsyntax.c
EDB2LDIFOBJS = edb2ldif.o ldapsyntax.o
UNIX_PRGS = build-ldbm build-bdb2 build-quipu
all-local: build-progs $(@PLAT@_PRGS)
build-progs: $(PROGRAMS)
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
ldbm-tools-yes ldbm-tools-mod: $(LDBMPROGRAMS)
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"
bdb2-tools-yes bdb2-tools-mod: $(BDB2PROGRAMS)
build-quipu: quipu-tools-$(BUILD_QUIPU)
quipu-tools-no:
@echo "run configure with --enable-quipu to build QUIPU tools"
1998-10-25 09:41:42 +08:00
quipu-tools-yes quipu-tools-mod: $(QUIPUPROGRAMS)
#
# SLAP Tools
#
slapadd: slapadd.o ../libbackends.a $(SLAPOBJS) $(SLAPD_LIBDEPEND)
$(LTLINK) -o $@ slapadd.o $(SLAPOBJS) ../libbackends.a $(LIBS)
1998-10-25 09:41:42 +08:00
slapcat: slapcat.o ../libbackends.a $(SLAPOBJS) $(SLAPD_LIBDEPEND)
$(LTLINK) -o $@ slapcat.o $(SLAPOBJS) ../libbackends.a $(LIBS)
slapindex: slapindex.o ../libbackends.a $(SLAPOBJS) $(SLAPD_LIBDEPEND)
$(LTLINK) -o $@ slapindex.o $(SLAPOBJS) ../libbackends.a $(LIBS)
1998-10-25 09:41:42 +08:00
ldif: ldif.o $(SLAPD_LIBDEPEND)
$(LTLINK) -o $@ ldif.o $(LIBS)
1998-10-25 09:41:42 +08:00
1999-12-16 10:18:50 +08:00
slappasswd: slappasswd.o $(SLAPD_LIBDEPEND)
$(LTLINK) -o $@ slappasswd.o $(LIBS)
#
# LDBM Specific Tools
#
centipede: centipede.o $(SLAPD_LIBDEPEND)
$(LTLINK) -o $@ centipede.o $(LIBS)
1998-10-25 09:41:42 +08:00
sizecount: sizecount.o ../phonetic.o ../ch_malloc.o $(SLAPD_LIBDEPEND)
$(LTLINK) -o $@ sizecount.o ../phonetic.o ../ch_malloc.o $(LIBS)
1998-10-25 09:41:42 +08:00
#
# BDBM Specific Tools
#
#
# QUIPU Specific Tools
#
edb2ldif: edb2-vers.o
$(CC) $(LDFLAGS) -o $@ $(EDB2LDIFOBJS) edb2-vers.o $(LIBS)
edb2-vers.c: $(EDB2LDIFOBJS)
@-$(RM) $@
$(MKVERSION) ebd2ldif > $@
chlog2replog: chlog2replog.o ../lock.o ../ch_malloc.o $(SLAPD_LIBDEPEND)
$(LTLINK) -o $@ chlog2replog.o ../lock.o ../ch_malloc.o $(LIBS)
1998-10-25 09:41:42 +08:00
clean-local: FORCE
1999-08-18 15:20:30 +08:00
$(RM) $(PROGRAMS) $(LDBMPROGRAMS) $(BDB2PROGRAMS) $(QUIPUPROGRAMS) \
$(XPROGRAMS) $(XSRCS) *.o core .libs/* *.exe
1998-10-25 09:41:42 +08:00
depend-local: FORCE
DEPEND_LDBM= ; DEPEND_BDB2= ; DEPEND_QUIPU= ; \
1999-08-07 19:37:43 +08:00
if [ "$(BUILD_LDBM)" != "no" ]; then \
DEPEND_LDBM="$(LDBMSRCS)"; \
fi; \
1999-08-07 19:37:43 +08:00
if [ "$(BUILD_BDB2)" != "no" ]; then \
DEPEND_BDB2="$(BDBMSRCS)"; \
fi; \
if [ "$(BUILD_QUIPU)" != "no" ]; then \
DEPEND_QUIPU="$(QUIPUINCLUDEFLAG) $(QUIPUSRCS)"; \
fi; \
$(MKDEP) $(DEFS) $(DEFINES) $(SRCS) $$DEPEND_QUIPU \
$$DEPEND_LDBM $$DEPEND_BDB2
1998-10-25 09:41:42 +08:00
1999-08-07 19:37:43 +08:00
install-local: install-ldbm-$(BUILD_LDBM) install-bdb2-$(BUILD_BDB2) \
1999-08-20 06:26:35 +08:00
install-quipu-$(BUILD_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
-$(MKDIR) $(DESTDIR)$(sbindir)
@for bin in $(PROGRAMS); do \
$(LTINSTALL) $(INSTALLFLAGS) -s -m 755 \
$$bin$(EXEEXT) $(DESTDIR)$(sbindir); \
done
1999-08-07 19:37:43 +08:00
install-bdb2-yes install-bdb2-mod: FORCE
@-$(MKDIR) $(DESTDIR)$(sbindir)
1999-08-07 19:37:43 +08:00
install-quipu-yes: FORCE
@-$(MKDIR) $(DESTDIR)$(sbindir)
for bin in edb2ldif chlog2replog; do \
$(LTINSTALL) $(INSTALLFLAGS) -s -m 755 \
$$bin $(DESTDIR)$(sbindir); \
done