]> git.sur5r.net Git - openldap/blob - libraries/libldap/Make-template
Import latest leak fix from HEAD.
[openldap] / libraries / libldap / Make-template
1 #-----------------------------------------------------------------------------
2 # Copyright (c) 1994 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 #       LDAP library makefile
13 #
14 #-----------------------------------------------------------------------------
15
16 LDAPSRC = ../..
17
18 SRCS    = bind.c open.c result.c error.c compare.c search.c \
19         modify.c add.c modrdn.c delete.c abandon.c ufn.c cache.c \
20         getfilter.c regex.c sbind.c kbind.c unbind.c friendly.c cldap.c \
21         free.c disptmpl.c srchpref.c dsparse.c tmplout.c sort.c \
22         getdn.c getentry.c getattr.c getvalues.c addentry.c \
23         request.c getdxbyname.c os-ip.c url.c charset.c
24 OBJS    = bind.o open.o result.o error.o compare.o search.o \
25         modify.o add.o modrdn.o delete.o abandon.o ufn.o cache.o \
26         getfilter.o regex.o sbind.o kbind.o unbind.o friendly.o cldap.o \
27         free.o disptmpl.o srchpref.o dsparse.o tmplout.o sort.o \
28         getdn.o getentry.o getattr.o getvalues.o addentry.o \
29         request.o getdxbyname.o os-ip.o url.o charset.o
30
31 HDIR    = ../../include
32
33 INCLUDES= -I$(HDIR) $(KRBINCLUDEFLAG)
34 DEFINES = $(DEFS) -DFILTERFILE="\"$(RUNTIMEETCDIR)/ldapfilter.conf\"" \
35         -DTEMPLATEFILE="\"$(RUNTIMEETCDIR)/ldaptemplates.conf\""
36
37 CFLAGS  = $(INCLUDES) $(DEFINES) $(ACFLAGS)
38 LIBS    = -L. -L../liblber -lldap -llber $(KRBLIBFLAG) $(KRBLIBS) $(ALIBS)
39
40 all:    libldap.a ltest ttest
41
42 libldap.a:      version.o
43         $(AR) ruv $@ $(OBJS) version.o
44         @if [ ! -z "$(RANLIB)" ]; then \
45                 $(RANLIB) $@; \
46         fi; \
47         $(RM) ../$@; \
48         $(LN) libldap/$@ ../$@
49
50 ltest:  libldap.a test.o ../liblber/liblber.a
51         $(CC) $(ALDFLAGS) -o $@ test.o $(LIBS)
52
53 ttest:  libldap.a tmpltest.o ../liblber/liblber.a
54         $(CC) $(ALDFLAGS) -o $@ tmpltest.o $(LIBS)
55
56 version.c:      $(OBJS)
57         $(RM) $@
58         (u=$${USER-root} v=`$(CAT) ../../build/version` d=`$(PWD)` \
59         h=`$(HOSTNAME)` t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
60         -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
61         -e "s|%VERSION%|$${v}|" \
62         < Version.c > $@)
63
64 install:        libldap.a ldapfilter.conf ldapfriendly ldaptemplates.conf ldapsearchprefs.conf FORCE
65         -$(MKDIR) -p $(LIBDIR)
66         $(INSTALL) $(INSTALLFLAGS) -m 644 libldap.a $(LIBDIR)
67         @if [ ! -z "$(RANLIB)" ]; then \
68                 (cd /tmp; $(RANLIB) $(LIBDIR)/libldap.a) \
69         fi
70         -$(MKDIR) -p $(ETCDIR)
71         -$(MV) $(ETCDIR)/ldapfriendly $(ETCDIR)/ldapfriendly-
72         $(INSTALL) $(INSTALLFLAGS) -m 644 ldapfriendly $(ETCDIR)
73         -$(MV) $(ETCDIR)/ldapfilter.conf $(ETCDIR)/ldapfilter.conf-
74         $(INSTALL) $(INSTALLFLAGS) -m 644 ldapfilter.conf $(ETCDIR)
75         -$(MV) $(ETCDIR)/ldaptemplates.conf $(ETCDIR)/ldaptemplates.conf-
76         $(INSTALL) $(INSTALLFLAGS) -m 644 ldaptemplates.conf $(ETCDIR)
77         -$(MV) $(ETCDIR)/ldapsearchprefs.conf $(ETCDIR)/ldapsearchprefs.conf-
78         $(INSTALL) $(INSTALLFLAGS) -m 644 ldapsearchprefs.conf $(ETCDIR)
79
80 lint:   FORCE
81         $(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
82
83 5lint:  FORCE
84         $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
85
86 clean:  FORCE
87         $(RM) libldap.a ../libldap.a ltest ttest *.o core a.out *.log version.c
88
89 depend: FORCE
90         $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
91
92 links:
93         @$(LN) .src/*.[ch] .src/ldapfriendly .src/ldapfilter.conf \
94                 .src/ldaptemplates.conf .src/ldapsearchprefs.conf .
95
96 # DO NOT DELETE THIS LINE -- mkdep uses it.
97 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
98
99 bind.o: bind.c ../../include/lber.h ../../include/ldap.h
100 open.o: open.c ../../include/lber.h ../../include/ldap.h ldap-int.h
101 result.o: result.c ../../include/portable.h ../../include/lber.h
102 result.o: ../../include/ldap.h ldap-int.h
103 error.o: error.c ../../include/lber.h ../../include/ldap.h
104 compare.o: compare.c ../../include/lber.h ../../include/ldap.h ldap-int.h
105 search.o: search.c ../../include/lber.h ../../include/ldap.h ldap-int.h
106 modify.o: modify.c ../../include/lber.h ../../include/ldap.h ldap-int.h
107 add.o: add.c ../../include/lber.h ../../include/ldap.h ldap-int.h
108 modrdn.o: modrdn.c ../../include/lber.h ../../include/ldap.h ldap-int.h
109 delete.o: delete.c ../../include/lber.h ../../include/ldap.h ldap-int.h
110 abandon.o: abandon.c ../../include/lber.h ../../include/ldap.h ldap-int.h
111 ufn.o: ufn.c ../../include/lber.h ../../include/ldap.h
112 cache.o: cache.c ../../include/lber.h ../../include/ldap.h ldap-int.h
113 getfilter.o: getfilter.c ../../include/lber.h ../../include/ldap.h
114 getfilter.o: ../../include/regex.h
115 regex.o: regex.c ../../include/portable.h
116 sbind.o: sbind.c ../../include/lber.h ../../include/ldap.h ldap-int.h
117 kbind.o: kbind.c ../../include/lber.h ../../include/ldap.h ldap-int.h
118 unbind.o: unbind.c ../../include/lber.h ../../include/ldap.h ldap-int.h
119 friendly.o: friendly.c ../../include/lber.h ../../include/ldap.h
120 cldap.o: cldap.c ../../include/lber.h ../../include/ldap.h ldap-int.h
121 free.o: free.c ../../include/lber.h ../../include/ldap.h
122 disptmpl.o: disptmpl.c ../../include/lber.h ../../include/ldap.h
123 disptmpl.o: ../../include/disptmpl.h
124 srchpref.o: srchpref.c ../../include/lber.h ../../include/ldap.h
125 srchpref.o: ../../include/srchpref.h
126 dsparse.o: dsparse.c ../../include/lber.h ../../include/ldap.h
127 tmplout.o: tmplout.c ../../include/lber.h ../../include/ldap.h
128 tmplout.o: ../../include/disptmpl.h
129 sort.o: sort.c ../../include/lber.h ../../include/ldap.h
130 getdn.o: getdn.c ../../include/lber.h ../../include/ldap.h
131 getentry.o: getentry.c ../../include/lber.h ../../include/ldap.h
132 getattr.o: getattr.c ../../include/lber.h ../../include/ldap.h ldap-int.h
133 getvalues.o: getvalues.c ../../include/lber.h ../../include/ldap.h
134 addentry.o: addentry.c ../../include/lber.h ../../include/ldap.h
135 request.o: request.c ../../include/portable.h ../../include/lber.h
136 request.o: ../../include/ldap.h ldap-int.h
137 getdxbyname.o: getdxbyname.c
138 os-ip.o: os-ip.c ../../include/portable.h ../../include/lber.h
139 os-ip.o: ../../include/ldap.h
140 url.o: url.c ../../include/lber.h ../../include/ldap.h ldap-int.h
141 charset.o: charset.c
142
143 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY