]> git.sur5r.net Git - openldap/blob - servers/slapd/tools/Makefile.in
Fixed CRYPT, MD5, and SHA1 support.
[openldap] / servers / slapd / tools / Makefile.in
1 #-----------------------------------------------------------------------------
2 # Copyright (c) 1995 Regents of the University of Michigan.
3 # All rights reserved.
4 #
5 # Redistribution and use in source and binary forms are permitted
6 # provided that this notice is preserved and that due credit is given
7 # to the University of Michigan at Ann Arbor. The name of the University
8 # may not be used to endorse or promote products derived from this
9 # software without specific prior written permission. This software
10 # is provided ``as is'' without express or implied warranty.
11 #
12 #       Stand alone LDAP server tools makefile
13 #
14 #-----------------------------------------------------------------------------
15 HAVE_ISODE = @HAVE_ISODE@
16 BUILD_LDBM = @BUILD_LDBM@
17
18 PROGRAMS=ldif2index ldif2ldbm ldbmcat ldif2id2entry \
19         ldif2id2children centipede ldbmtest ldif
20
21 SRCS = centipede.c ldbmcat.c ldbmtest.c sizecount.c \
22         ldif.c ldif2id2children.c ldif2id2entry.c ldif2index.c ldif2ldbm.c
23
24 EDB2LDIFSRCS    = edb2ldif.c ldapsyntax.c
25 EDB2LDIFOBJS    = edb2ldif.o ldapsyntax.o ../strdup.o
26
27 OBJS2   = ../config.o ../ch_malloc.o ../backend.o ../charray.o \
28                 ../aclparse.o ../schema.o ../result.o ../filterentry.o \
29                 ../acl.o ../phonetic.o ../attr.o ../value.o ../entry.o \
30                 ../dn.o ../filter.o ../str2filter.o ../ava.o ../init.o \
31                 ../schemaparse.o ../strdup.o
32
33 all-local: build-edb2ldif build-chlog2replog $(PROGRAMS)
34
35 XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@
36 XLIBS = @SLAPD_LIBS@ -lavl -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ -llutil @LUTIL_LIBS@
37
38 build-edb2ldif: FORCE
39         @if [ "$(HAVE_ISODE)" = "yes" ]; then \
40                 $(MAKE) $(MFLAGS) edb2ldif; \
41     else \
42                 echo "run configure with --with-isode to build edb2ldif"; \
43     fi
44
45 edb2ldif:       edb2-vers.o
46         $(CC) $(LDFLAGS) -o $@ $(EDB2LDIFOBJS) edb2-vers.o $(LIBS)
47
48 edb2-vers.c: $(EDB2LDIFOBJS)
49         $(RM) $@
50         (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
51         t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
52         -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
53         -e "s|%VERSION%|$${v}|" \
54         < Vers-edb2.c > $@)
55
56 build-chlog2replog: FORCE
57         @if [ "$(HAVE_ISODE)" = "yes" ]; then \
58                 $(MAKE) $(MFLAGS) chlog2replog; \
59         else \
60                 echo "run configure with --with-isode to build chlog2replog"; \
61         fi
62
63 chlog2replog: chlog2replog.o ../lock.o ../ch_malloc.o
64         $(CC) $(LDFLAGS) -o $@ chlog2replog.o ../lock.o ../ch_malloc.o $(LIBS)
65
66 ldif2index:     ldif2index.o ../libbackends.a $(OBJS2)
67         $(CC) $(LDFLAGS) -o $@ ldif2index.o $(OBJS2) ../libbackends.a $(LIBS)
68
69 ldif2ldbm:      ldif2ldbm.o ../libbackends.a $(OBJS2)
70         $(CC) $(LDFLAGS) -o $@ ldif2ldbm.o $(OBJS2) ../libbackends.a $(LIBS)
71
72 ldif2id2entry:  ldif2id2entry.o ../libbackends.a $(OBJS2)
73         $(CC) $(LDFLAGS) -o $@ ldif2id2entry.o $(OBJS2) ../libbackends.a $(LIBS)
74
75 ldif2id2children:       ldif2id2children.o ../libbackends.a $(OBJS2)
76         $(CC) $(LDFLAGS) -o $@ ldif2id2children.o $(OBJS2) ../libbackends.a $(LIBS)
77
78 ldbmcat:        ldbmcat.o
79         $(CC) $(LDFLAGS) -o $@ ldbmcat.o $(LIBS)
80
81 ldif:           ldif.o
82         $(CC) $(LDFLAGS) -o $@ ldif.o $(LIBS) $(LIBS2)
83
84 centipede:      centipede.o 
85         $(CC) -o $@ centipede.o $(LIBS) $(KRBLIBFLAG) $(KRBLIBS)
86
87 sizecount:      sizecount.o ../phonetic.o ../ch_malloc.o
88         $(CC) $(LDFLAGS) -o $@ sizecount.o ../phonetic.o ../ch_malloc.o \
89                 $(LIBS) $(KRBLIBFLAG) $(KRBLIBS)
90
91 ldbmtest:       ldbmtest.o ../libbackends.a $(OBJS2)
92         $(CC) $(LDFLAGS) -o ldbmtest ldbmtest.o $(OBJS2) ../libbackends.a $(LIBS)
93
94 clean-local: FORCE
95         $(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) edb2-vers.c *.o a.out core
96
97 depend-local: FORCE
98         @if [ "$(HAVE_ISODE)" = "yes" ]; then \
99         DEPENDEXTRAS="$(ISODEINCLUDEFLAG) chlog2replog.c $(EDB2LDIFSRCS)"; \
100     fi; \
101     $(MKDEP) $(DEFS) $(DEFINES) $$DEPENDEXTRAS $(SRCS)
102
103 install-local: install-isode FORCE
104         @-$(MKDIR) -p $(sbindir)
105         $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm $(sbindir)
106         $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2index $(sbindir)
107         $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry $(sbindir)
108         $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children $(sbindir)
109         $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmcat $(sbindir)
110         $(INSTALL) $(INSTALLFLAGS) -m 755 ldif $(sbindir)
111         $(INSTALL) $(INSTALLFLAGS) -m 755 centipede $(sbindir)
112         $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmtest $(sbindir)
113
114 install-isode: FORCE
115         @-$(MKDIR) -p $(sbindir)
116         @if [ "$(HAVE_ISODE)" = "yes" ]; then \
117                 $(INSTALL) $(INSTALLFLAGS) -m 755 edb2ldif $(sbindir); \
118                 $(INSTALL) $(INSTALLFLAGS) -m 755 chlog2replog $(sbindir); \
119         else \
120                 exit 0; \
121         fi
122
123 all-common: all-local FORCE
124 install-common: all-common install-local FORCE
125 depend-common: depend-local FORCE
126 clean-common: clean-local FORCE
127 veryclean-common: clean-common veryclean-local FORCE