]> git.sur5r.net Git - openldap/blob - servers/slapd/tools/Makefile.in
QUIPU -> Attic
[openldap] / servers / slapd / tools / Makefile.in
1 # $OpenLDAP$
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.
6 # All rights reserved.
7 #
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.
14 #
15 #       Stand alone LDAP server tools makefile
16 #
17 #-----------------------------------------------------------------------------
18 BUILD_LDBM = @BUILD_LDBM@
19
20 LDAP_INCDIR= ../../../include       
21 LDAP_LIBDIR= ../../../libraries
22
23 SLAP_DIR=../
24 SLAPD_MODULES = @SLAPD_MODULES_LIST@
25 XDEFS = $(MODULES_CPPFLAGS)
26 XLDFLAGS = $(MODULES_LDFLAGS) $(SLAPD_MODULES)
27
28 XLIBS = -lavl -lldif -lldbm -llutil -lldap_r -llber
29 XXLIBS = $(SLAPD_LIBS) \
30         $(LDBM_LIBS) $(SECURITY_LIBS) \
31         $(LDIF_LIBS) $(LUTIL_LIBS)
32 XXXLIBS = $(LTHREAD_LIBS) $(MODULES_LIBS)
33
34 PROGRAMS=ldif slappasswd slapadd slapcat slapindex
35 LDBMPROGRAMS=centipede sizecount
36
37 # CPPFLAGS will include the defines for dynamic libs in Mingw32.
38 NT_DYN_DEFS = -DLBER_DECL=dllimport -DLDAP_DECL=dllimport
39 CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_DEFS)
40
41 SRCS = ldif.c mimic.c slapcommon.c slapadd.c slapcat.c slapindex.c
42
43 XSRCS = edb2-vers.c
44
45 # LDBMSRCS = centipede.c sizecount.c
46 LDBMSRCS =
47
48 SLAPD_OBJS = ../config.o ../ch_malloc.o ../backend.o ../charray.o \
49                 ../module.o ../aclparse.o ../filterentry.o \
50                 ../schema.o ../schema_check.o ../schema_init.o ../schema_prep.o \
51                 ../schemaparse.o ../ad.o ../at.o ../mr.o ../oc.o ../syntax.o \
52                 ../acl.o ../phonetic.o ../attr.o ../value.o ../entry.o \
53                 ../dn.o ../filter.o ../str2filter.o ../ava.o ../init.o \
54                 ../controls.o ../kerberos.o ../passwd.o ../index.o \
55                 ../extended.o ../starttls.o
56
57 SLAPOBJS = $(SLAPD_OBJS) slapcommon.o mimic.o
58
59 EDB2LDIFSRCS    = edb2ldif.c ldapsyntax.c
60 EDB2LDIFOBJS    = edb2ldif.o ldapsyntax.o
61
62 UNIX_PRGS = build-ldbm
63
64 all-local: build-progs $(@PLAT@_PRGS)
65
66 build-progs: $(PROGRAMS)
67
68 build-ldbm: ldbm-tools-$(BUILD_LDBM)
69 ldbm-tools-no:
70         @echo "run configure with --enable-ldbm to build LDBM tools"
71
72 ldbm-tools-yes ldbm-tools-mod: $(LDBMPROGRAMS)
73
74 #
75 # SLAP Tools
76 #
77 slapadd:        slapadd.o ../libbackends.a $(SLAPOBJS) $(SLAPD_LIBDEPEND) 
78         $(LTLINK) -o $@ slapadd.o $(SLAPOBJS) ../libbackends.a $(LIBS)
79
80 slapcat:        slapcat.o ../libbackends.a $(SLAPOBJS) $(SLAPD_LIBDEPEND) 
81         $(LTLINK) -o $@ slapcat.o $(SLAPOBJS) ../libbackends.a $(LIBS)
82
83 slapindex:      slapindex.o ../libbackends.a $(SLAPOBJS) $(SLAPD_LIBDEPEND) 
84         $(LTLINK) -o $@ slapindex.o $(SLAPOBJS) ../libbackends.a $(LIBS)
85
86 ldif:           ldif.o $(SLAPD_LIBDEPEND) 
87         $(LTLINK) -o $@ ldif.o $(LIBS)
88
89 slappasswd:             slappasswd.o $(SLAPD_LIBDEPEND) 
90         $(LTLINK) -o $@ slappasswd.o $(LIBS)
91
92 #
93 # LDBM Specific Tools
94 #       (deprecated)
95 centipede:      centipede.o $(SLAPD_LIBDEPEND) 
96         $(LTLINK) -o $@ centipede.o $(LIBS)
97
98 sizecount:      sizecount.o ../phonetic.o ../ch_malloc.o $(SLAPD_LIBDEPEND) 
99         $(LTLINK) -o $@ sizecount.o ../phonetic.o ../ch_malloc.o $(LIBS)
100
101 clean-local: FORCE
102         $(RM) $(PROGRAMS) $(LDBMPROGRAMS) \
103                 $(XPROGRAMS) $(XSRCS) *.o core .libs/* *.exe
104
105 depend-local: FORCE
106         DEPEND_LDBM= ; \
107         if [ "$(BUILD_LDBM)" != "no" ]; then \
108                 DEPEND_LDBM="$(LDBMSRCS)"; \
109         fi; \
110         $(MKDEP) $(DEFS) $(DEFINES) $(SRCS) $$DEPEND_LDBM
111
112 install-local: install-ldbm-$(BUILD_LDBM)
113
114 install-ldbm-no:
115
116 install-ldbm-yes install-ldbm-mod: FORCE
117         -$(MKDIR) $(DESTDIR)$(sbindir) 
118         @for bin in $(PROGRAMS); do \
119                 $(LTINSTALL) $(INSTALLFLAGS) -s -m 755 \
120                         $$bin$(EXEEXT) $(DESTDIR)$(sbindir); \
121         done