]> git.sur5r.net Git - openldap/blob - libraries/libldap_r/Makefile.in
Avoid premature free
[openldap] / libraries / libldap_r / Makefile.in
1 # $OpenLDAP$
2 ## Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
3 ## COPYING RESTRICTIONS APPLY, see COPYRIGHT file
4 ##
5 ## Makefile.in for LDAP -lldap
6 ##
7 LIBRARY = libldap_r.la
8 XLIBRARY = ../libldap_r.a
9
10 PROGRAMS = apitest ltest ttest
11
12 XXDIR = $(srcdir)/../libldap
13 XXSRCS  = apitest.c test.c tmpltest.c extended.c \
14         bind.c controls.c open.c result.c error.c compare.c search.c \
15         modify.c add.c modrdn.c delete.c abandon.c ufn.c cache.c cyrus.c \
16         getfilter.c sasl.c sbind.c kbind.c unbind.c friendly.c \
17         free.c disptmpl.c srchpref.c dsparse.c tmplout.c sort.c \
18         getdn.c getentry.c getattr.c getvalues.c addentry.c \
19         request.c os-ip.c url.c sortctrl.c vlvctrl.c \
20         init.c options.c print.c string.c util-int.c schema.c \
21         charray.c tls.c dn.c os-local.c dnssrv.c \
22         utf-8.c
23 SRCS    = threads.c rdwr.c tpool.c \
24         thr_posix.c thr_cthreads.c thr_thr.c thr_lwp.c thr_nt.c \
25         thr_pth.c thr_stub.c
26 OBJS    = threads.lo rdwr.lo tpool.lo  \
27         thr_posix.lo thr_cthreads.lo thr_thr.lo thr_lwp.lo thr_nt.lo \
28         thr_pth.lo thr_stub.lo \
29         extended.lo \
30         bind.lo controls.lo open.lo result.lo error.lo compare.lo search.lo \
31         modify.lo add.lo modrdn.lo delete.lo abandon.lo ufn.lo cache.lo cyrus.lo \
32         getfilter.lo sasl.lo sbind.lo kbind.lo unbind.lo friendly.lo \
33         free.lo disptmpl.lo srchpref.lo dsparse.lo tmplout.lo sort.lo \
34         getdn.lo getentry.lo getattr.lo getvalues.lo addentry.lo \
35         request.lo os-ip.lo url.lo sortctrl.lo vlvctrl.lo \
36         init.lo options.lo print.lo string.lo util-int.lo schema.lo \
37         charray.lo tls.lo dn.lo os-local.lo dnssrv.lo \
38         utf-8.lo
39
40 LDAP_INCDIR= ../../include       
41 LDAP_LIBDIR= ../../libraries
42
43 XDEFS = -DLDAP_R_COMPILE -I$(XXDIR)
44 XLIBS = -lldap_r -llber -llutil
45 XXLIBS = $(SECURITY_LIBS) $(LUTIL_LIBS)
46 XXXLIBS = $(LTHREAD_LIBS)
47
48 LINKAGE = @LT_LIB_LINKAGE@
49
50 NT_DYN_LIB_LIBS  = -llber -llutil $(AC_LIBS)
51 NT_DYN_LIB_DEFS  = -DLBER_DECL=dllimport
52 NT_DYN_TEST_DEFS = -DLBER_DECL=dllimport -DLDAP_DECL=dllimport
53
54 NT_XXLIBS = $(SECURITY_LIBS)
55
56 UNIX_DYN_LIB_LIBS  = -llber $(AC_LIBS)
57 UNIX_XXLIBS = $(SECURITY_LIBS)
58
59 # Extras for building the library
60 EXTRA_DEFS = $(@PLAT@_@LIB_LINKAGE@_LIB_DEFS)
61 EXTRA_LIBS = $(@PLAT@_@LIB_LINKAGE@_LIB_LIBS) $(@PLAT@_XXLIBS)
62
63 # Only the test programs will pick up these defs.
64 CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_TEST_DEFS)
65
66 .links :
67         @for i in $(XXSRCS); do \
68                 $(RM) $$i ; \
69                 $(LN_S) $(XXDIR)/$$i . ; \
70         done
71         touch .links
72
73 $(XXSRCS) : .links
74
75 clean-local: FORCE
76         @$(RM) .links
77
78 depend-common: .links
79
80 apitest:        $(LIBRARY) apitest.o $(LDAP_LIBLBER_DEPEND)
81         $(LTLINK) -o $@ apitest.o $(LIBS)
82 ltest:  $(LIBRARY) test.o $(LDAP_LIBLBER_DEPEND)
83         $(LTLINK) -o $@ test.o $(LIBS)
84 ttest:  $(LIBRARY) tmpltest.o $(LDAP_LIBLBER_DEPEND)
85         $(LTLINK) -o $@ tmpltest.o $(LIBS)
86
87 install-local: $(CFFILES) FORCE
88         -$(MKDIR) $(DESTDIR)$(libdir)
89         $(LTINSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(DESTDIR)$(libdir)