2 ## Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
3 ## COPYING RESTRICTIONS APPLY, see COPYRIGHT file
4 #-----------------------------------------------------------------------------
5 # Portions Copyright (c) 1995 Regents of the University of Michigan.
8 # Redistribution and use in source and binary forms are permitted
9 # provided that this notice is preserved and that due credit is given
10 # to the University of Michigan at Ann Arbor. The name of the University
11 # may not be used to endorse or promote products derived from this
12 # software without specific prior written permission. This software
13 # is provided ``as is'' without express or implied warranty.
15 # Stand alone LDAP server tools makefile
17 #-----------------------------------------------------------------------------
18 BUILD_LDBM = @BUILD_LDBM@
20 LDAP_INCDIR= ../../../include
21 LDAP_LIBDIR= ../../../libraries
24 SLAPD_MODULES = @SLAPD_MODULES_LIST@
25 XDEFS = $(MODULES_CPPFLAGS)
26 XLDFLAGS = $(MODULES_LDFLAGS) $(SLAPD_MODULES)
28 XLIBS = -lavl -lldif @LDBM_LIB@ -llutil -llunicode -lldap_r -llber
29 XXLIBS = $(SLAPD_LIBS) \
30 $(LDBM_LIBS) $(SECURITY_LIBS) \
31 $(LDIF_LIBS) $(LUTIL_LIBS)
32 XXXLIBS = $(MODULES_LIBS) $(LTHREAD_LIBS)
34 PROGRAMS=slapadd slapcat slapindex slappasswd
36 # CPPFLAGS will include the defines for dynamic libs in Mingw32.
37 NT_DYN_DEFS = -DLBER_DECL=dllimport -DLDAP_DECL=dllimport
38 CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_DEFS)
40 SRCS = mimic.c slapcommon.c \
41 slapadd.c slapcat.c slapindex.c slappasswd.c
43 SLAPD_OBJS = ../config.o ../ch_malloc.o ../backend.o ../charray.o \
44 ../module.o ../aclparse.o ../filterentry.o \
45 ../schema.o ../schema_check.o ../schema_init.o ../schema_prep.o \
46 ../schemaparse.o ../ad.o ../at.o ../mr.o ../oc.o ../syntax.o \
47 ../acl.o ../phonetic.o ../attr.o ../value.o ../entry.o \
48 ../dn.o ../filter.o ../str2filter.o ../ava.o ../init.o \
49 ../controls.o ../kerberos.o ../passwd.o ../index.o \
50 ../extended.o ../starttls.o ../sets.o ../mra.o \
53 SLAPOBJS = $(SLAPD_OBJS) slapcommon.o mimic.o
55 all-local: build-progs
57 build-progs: $(PROGRAMS)
62 slapadd: slapadd.o ../libbackends.a $(SLAPOBJS) $(SLAPD_LIBDEPEND)
63 $(LTLINK) -o $@ slapadd.o $(SLAPOBJS) ../libbackends.a $(LIBS)
65 slapcat: slapcat.o ../libbackends.a $(SLAPOBJS) $(SLAPD_LIBDEPEND)
66 $(LTLINK) -o $@ slapcat.o $(SLAPOBJS) ../libbackends.a $(LIBS)
68 slapindex: slapindex.o ../libbackends.a $(SLAPOBJS) $(SLAPD_LIBDEPEND)
69 $(LTLINK) -o $@ slapindex.o $(SLAPOBJS) ../libbackends.a $(LIBS)
71 slappasswd: slappasswd.o $(SLAPD_LIBDEPEND)
72 $(LTLINK) -o $@ slappasswd.o $(LIBS)
75 $(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) *.o core .libs/* *.exe
78 $(MKDEP) $(DEFS) $(DEFINES) $(SRCS)
80 install-local: install-ldbm-$(BUILD_LDBM)
84 install-ldbm-yes install-ldbm-mod: FORCE
85 -$(MKDIR) $(DESTDIR)$(sbindir)
86 @for bin in $(PROGRAMS); do \
87 $(LTINSTALL) $(INSTALLFLAGS) -s -m 755 \
88 $$bin$(EXEEXT) $(DESTDIR)$(sbindir); \