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@
|
|
|
|
|
|
|
|
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-10-28 15:20:07 +08:00
|
|
|
XLIBS = -lavl -lldif -lldbm -llutil -lldap_r -llber
|
2000-06-26 05:40:13 +08:00
|
|
|
XXLIBS = $(SLAPD_LIBS) \
|
2000-05-11 05:18:12 +08:00
|
|
|
$(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-12-16 10:18:50 +08:00
|
|
|
PROGRAMS=ldif slappasswd slapadd slapcat slapindex
|
1999-08-18 03:00:59 +08:00
|
|
|
LDBMPROGRAMS=centipede sizecount
|
1999-02-08 19:42:14 +08:00
|
|
|
|
1999-10-28 15:20:07 +08:00
|
|
|
# CPPFLAGS will include the defines for dynamic libs in Mingw32.
|
2000-06-19 03:48:07 +08:00
|
|
|
NT_DYN_DEFS = -DLBER_DECL=dllimport -DLDAP_DECL=dllimport
|
1999-10-28 15:20:07 +08:00
|
|
|
CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_DEFS)
|
|
|
|
|
2000-06-09 23:03:04 +08:00
|
|
|
SRCS = ldif.c mimic.c slapcommon.c slapadd.c slapcat.c slapindex.c
|
1999-02-08 19:42:14 +08:00
|
|
|
|
1998-11-22 14:24:59 +08:00
|
|
|
XSRCS = edb2-vers.c
|
|
|
|
|
2000-06-09 23:03:04 +08:00
|
|
|
# LDBMSRCS = centipede.c sizecount.c
|
|
|
|
LDBMSRCS =
|
1999-08-18 03:00:59 +08:00
|
|
|
|
|
|
|
SLAPD_OBJS = ../config.o ../ch_malloc.o ../backend.o ../charray.o \
|
2000-01-30 03:43:19 +08:00
|
|
|
../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 \
|
2000-06-05 06:59:38 +08:00
|
|
|
../controls.o ../kerberos.o ../passwd.o ../index.o \
|
1999-12-10 06:33:22 +08:00
|
|
|
../extended.o ../starttls.o
|
1999-12-08 12:37:59 +08:00
|
|
|
|
1999-12-16 10:18:50 +08:00
|
|
|
SLAPOBJS = $(SLAPD_OBJS) slapcommon.o mimic.o
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-08-18 03:00:59 +08:00
|
|
|
EDB2LDIFSRCS = edb2ldif.c ldapsyntax.c
|
|
|
|
EDB2LDIFOBJS = edb2ldif.o ldapsyntax.o
|
|
|
|
|
2000-06-26 05:40:13 +08:00
|
|
|
UNIX_PRGS = build-ldbm
|
1999-10-28 15:20:07 +08:00
|
|
|
|
|
|
|
all-local: build-progs $(@PLAT@_PRGS)
|
1999-08-18 03:00:59 +08:00
|
|
|
|
|
|
|
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
|
|
|
|
1999-08-18 03:00:59 +08:00
|
|
|
ldbm-tools-yes ldbm-tools-mod: $(LDBMPROGRAMS)
|
|
|
|
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
1999-08-18 03:00:59 +08:00
|
|
|
slapcat: slapcat.o ../libbackends.a $(SLAPOBJS) $(SLAPD_LIBDEPEND)
|
|
|
|
$(LTLINK) -o $@ slapcat.o $(SLAPOBJS) ../libbackends.a $(LIBS)
|
1999-02-08 19:42:14 +08:00
|
|
|
|
1999-08-18 03:00:59 +08:00
|
|
|
slapindex: slapindex.o ../libbackends.a $(SLAPOBJS) $(SLAPD_LIBDEPEND)
|
|
|
|
$(LTLINK) -o $@ slapindex.o $(SLAPOBJS) ../libbackends.a $(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-12-16 10:18:50 +08:00
|
|
|
slappasswd: slappasswd.o $(SLAPD_LIBDEPEND)
|
|
|
|
$(LTLINK) -o $@ slappasswd.o $(LIBS)
|
|
|
|
|
1999-08-18 03:00:59 +08:00
|
|
|
#
|
|
|
|
# LDBM Specific Tools
|
2000-06-09 23:03:04 +08:00
|
|
|
# (deprecated)
|
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
|
|
|
|
|
|
|
clean-local: FORCE
|
2000-06-26 05:40:13 +08:00
|
|
|
$(RM) $(PROGRAMS) $(LDBMPROGRAMS) \
|
1999-10-28 15:20:07 +08:00
|
|
|
$(XPROGRAMS) $(XSRCS) *.o core .libs/* *.exe
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
depend-local: FORCE
|
2000-06-26 05:40:13 +08:00
|
|
|
DEPEND_LDBM= ; \
|
1999-08-07 19:37:43 +08:00
|
|
|
if [ "$(BUILD_LDBM)" != "no" ]; then \
|
1999-08-18 03:00:59 +08:00
|
|
|
DEPEND_LDBM="$(LDBMSRCS)"; \
|
1999-04-11 01:43:27 +08:00
|
|
|
fi; \
|
2000-06-26 05:40:13 +08:00
|
|
|
$(MKDEP) $(DEFS) $(DEFINES) $(SRCS) $$DEPEND_LDBM
|
1998-10-25 09:41:42 +08:00
|
|
|
|
2000-06-26 05:40:13 +08:00
|
|
|
install-local: install-ldbm-$(BUILD_LDBM)
|
1998-10-25 09:41:42 +08:00
|
|
|
|
2000-06-26 05:40:13 +08:00
|
|
|
install-ldbm-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-09-23 05:51:30 +08:00
|
|
|
-$(MKDIR) $(DESTDIR)$(sbindir)
|
1999-10-28 15:20:07 +08:00
|
|
|
@for bin in $(PROGRAMS); do \
|
2000-05-31 02:23:56 +08:00
|
|
|
$(LTINSTALL) $(INSTALLFLAGS) -s -m 755 \
|
|
|
|
$$bin$(EXEEXT) $(DESTDIR)$(sbindir); \
|
1999-09-23 05:51:30 +08:00
|
|
|
done
|