2 ## Copyright 1998-2002 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 #-----------------------------------------------------------------------------
19 LDAP_INCDIR= ../../../include
20 LDAP_LIBDIR= ../../../libraries
23 SLAPD_MODULES = @SLAPD_MODULES_LIST@
24 XDEFS = $(MODULES_CPPFLAGS)
25 XLDFLAGS = $(MODULES_LDFLAGS) $(SLAPD_MODULES)
27 XLIBS = $(SLAPD_L) $(LDBM_LIBS)
28 XXLIBS = $(SLAPD_LIBS) \
29 $(LDBM_LIBS) $(SECURITY_LIBS) \
30 $(LDIF_LIBS) $(LUTIL_LIBS)
31 XXXLIBS = $(MODULES_LIBS) $(LTHREAD_LIBS)
33 PROGRAMS=slapadd slapcat slapindex slappasswd
35 SRCS = mimic.c slapcommon.c \
36 slapadd.c slapcat.c slapindex.c slappasswd.c
38 SLAPD_OBJS = ../config.o ../ch_malloc.o ../backend.o ../charray.o \
39 ../module.o ../aclparse.o ../filterentry.o ../schema.o \
40 ../schema_check.o ../schema_init.o ../schema_prep.o \
41 ../schemaparse.o ../ad.o ../at.o ../mr.o ../oc.o \
42 ../syntax.o ../acl.o ../phonetic.o ../attr.o ../value.o \
43 ../entry.o ../dn.o ../filter.o ../str2filter.o ../ava.o \
44 ../init.o ../controls.o ../kerberos.o ../passwd.o \
45 ../index.o ../extended.o ../starttls.o ../sets.o ../mra.o \
46 ../referral.o ../backglue.o ../oidm.o ../mods.o
48 SLAPOBJS = $(SLAPD_OBJS) slapcommon.o mimic.o
50 all-local: build-progs
52 build-progs: $(PROGRAMS)
57 slapadd: slapadd.o ../libbackends.a $(SLAPOBJS) $(SLAPD_L)
58 $(LTLINK) -o $@ slapadd.o $(SLAPOBJS) ../libbackends.a $(LIBS)
60 slapcat: slapcat.o ../libbackends.a $(SLAPOBJS) $(SLAPD_L)
61 $(LTLINK) -o $@ slapcat.o $(SLAPOBJS) ../libbackends.a $(LIBS)
63 slapindex: slapindex.o ../libbackends.a $(SLAPOBJS) $(SLAPD_L)
64 $(LTLINK) -o $@ slapindex.o $(SLAPOBJS) ../libbackends.a $(LIBS)
66 slappasswd: slappasswd.o $(SLAPD_L)
67 $(LTLINK) -o $@ slappasswd.o $(LIBS)
70 $(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) *.o core .libs/* *.exe
73 $(MKDEP) $(DEFS) $(DEFINES) $(SRCS)
76 -$(MKDIR) $(DESTDIR)$(sbindir)
77 @for bin in $(PROGRAMS); do \
78 $(LTINSTALL) $(INSTALLFLAGS) -s -m 755 \
79 $$bin$(EXEEXT) $(DESTDIR)$(sbindir); \