openldap/servers/slapd/tools/Makefile.in
Kurt Zeilenga 9ef1a740c2 Round one of LDAP_F() macro changes. In this round we rename
macros into our namespace and limit use to headers.  A subsequent
round will add macros to separately handle forward declarations
of variables from declaration of function prototypes.  The last
round will add additional macros for declaring actual variables and
functions.
2000-06-18 19:48:07 +00:00

154 lines
4.7 KiB
Makefile

# $OpenLDAP$
## Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
## COPYING RESTRICTIONS APPLY, see COPYRIGHT file
#-----------------------------------------------------------------------------
# Portions 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
#
#-----------------------------------------------------------------------------
BUILD_LDBM = @BUILD_LDBM@
BUILD_QUIPU = @BUILD_QUIPU@
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)
PROGRAMS=ldif slappasswd slapadd slapcat slapindex
LDBMPROGRAMS=centipede sizecount
QUIPUPROGRAMS=chlog2replog edb2ldif
# CPPFLAGS will include the defines for dynamic libs in Mingw32.
NT_DYN_DEFS = -DLBER_DECL=dllimport -DLDAP_DECL=dllimport
CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_DEFS)
SRCS = ldif.c mimic.c slapcommon.c slapadd.c slapcat.c slapindex.c
XSRCS = edb2-vers.c
# LDBMSRCS = centipede.c sizecount.c
LDBMSRCS =
QUIPUSRCS = edb2ldif.c ldapsyntax.c chlog2replog.c
SLAPD_OBJS = ../config.o ../ch_malloc.o ../backend.o ../charray.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
SLAPOBJS = $(SLAPD_OBJS) slapcommon.o mimic.o
EDB2LDIFSRCS = edb2ldif.c ldapsyntax.c
EDB2LDIFOBJS = edb2ldif.o ldapsyntax.o
UNIX_PRGS = build-ldbm build-quipu
all-local: build-progs $(@PLAT@_PRGS)
build-progs: $(PROGRAMS)
build-ldbm: ldbm-tools-$(BUILD_LDBM)
ldbm-tools-no:
@echo "run configure with --enable-ldbm to build LDBM tools"
ldbm-tools-yes ldbm-tools-mod: $(LDBMPROGRAMS)
build-quipu: quipu-tools-$(BUILD_QUIPU)
quipu-tools-no:
@echo "run configure with --enable-quipu to build QUIPU tools"
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)
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)
ldif: ldif.o $(SLAPD_LIBDEPEND)
$(LTLINK) -o $@ ldif.o $(LIBS)
slappasswd: slappasswd.o $(SLAPD_LIBDEPEND)
$(LTLINK) -o $@ slappasswd.o $(LIBS)
#
# LDBM Specific Tools
# (deprecated)
centipede: centipede.o $(SLAPD_LIBDEPEND)
$(LTLINK) -o $@ centipede.o $(LIBS)
sizecount: sizecount.o ../phonetic.o ../ch_malloc.o $(SLAPD_LIBDEPEND)
$(LTLINK) -o $@ sizecount.o ../phonetic.o ../ch_malloc.o $(LIBS)
#
# 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)
clean-local: FORCE
$(RM) $(PROGRAMS) $(LDBMPROGRAMS) $(QUIPUPROGRAMS) \
$(XPROGRAMS) $(XSRCS) *.o core .libs/* *.exe
depend-local: FORCE
DEPEND_LDBM= ; DEPEND_QUIPU= ; \
if [ "$(BUILD_LDBM)" != "no" ]; then \
DEPEND_LDBM="$(LDBMSRCS)"; \
fi; \
if [ "$(BUILD_QUIPU)" != "no" ]; then \
DEPEND_QUIPU="$(QUIPUINCLUDEFLAG) $(QUIPUSRCS)"; \
fi; \
$(MKDEP) $(DEFS) $(DEFINES) $(SRCS) $$DEPEND_QUIPU $$DEPEND_LDBM
install-local: install-ldbm-$(BUILD_LDBM) \
install-quipu-$(BUILD_QUIPU)
install-ldbm-no install-quipu-no:
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
install-quipu-yes: FORCE
@-$(MKDIR) $(DESTDIR)$(sbindir)
for bin in edb2ldif chlog2replog; do \
$(LTINSTALL) $(INSTALLFLAGS) -s -m 755 \
$$bin $(DESTDIR)$(sbindir); \
done