]> git.sur5r.net Git - openldap/blob - libraries/libldap/Makefile.in
b89e4dee2c387f8ae10670ef44429c294a73cc21
[openldap] / libraries / libldap / 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.la
8 XLIBRARY = ../libldap.a
9
10 PROGRAMS = apitest ltest ttest
11
12 SRCS    = bind.c open.c result.c error.c compare.c search.c \
13         controls.c messages.c references.c extended.c cyrus.c \
14         modify.c add.c modrdn.c delete.c abandon.c ufn.c cache.c \
15         getfilter.c sasl.c sbind.c kbind.c unbind.c friendly.c cldap.c \
16         free.c disptmpl.c srchpref.c dsparse.c tmplout.c sort.c \
17         getdn.c getentry.c getattr.c getvalues.c addentry.c \
18         request.c os-ip.c url.c sortctrl.c vlvctrl.c \
19         init.c options.c print.c string.c util-int.c schema.c \
20         charray.c tls.c dn.c os-local.c dnssrv.c \
21         utf-8.c
22 OBJS    = bind.lo open.lo result.lo error.lo compare.lo search.lo \
23         controls.lo messages.lo references.lo extended.lo cyrus.lo \
24         modify.lo add.lo modrdn.lo delete.lo abandon.lo ufn.lo cache.lo \
25         getfilter.lo sasl.lo sbind.lo kbind.lo unbind.lo friendly.lo cldap.lo \
26         free.lo disptmpl.lo srchpref.lo dsparse.lo tmplout.lo sort.lo \
27         getdn.lo getentry.lo getattr.lo getvalues.lo addentry.lo \
28         request.lo os-ip.lo url.lo sortctrl.lo vlvctrl.lo \
29         init.lo options.lo print.lo string.lo util-int.lo schema.lo \
30         charray.lo tls.lo dn.lo os-local.lo dnssrv.lo \
31         utf-8.lo
32
33 LDAP_INCDIR= ../../include       
34 LDAP_LIBDIR= ../../libraries
35
36 XLIBS = -lldap -llber -llutil
37 XXLIBS = $(SECURITY_LIBS) $(TLS_LIBS)
38
39 LINKAGE = @LT_LIB_LINKAGE@
40
41 NT_DYN_LIB_LIBS  = -llber -llutil $(AC_LIBS)
42 NT_DYN_LIB_DEFS  = -DLBER_DECL=dllimport
43 NT_DYN_TEST_DEFS = -DLBER_DECL=dllimport -DLDAP_DECL=dllimport
44
45 NT_XXLIBS = $(SECURITY_LIBS)
46
47 UNIX_DYN_LIB_LIBS  = -llber $(AC_LIBS)
48 UNIX_XXLIBS = $(SECURITY_LIBS)
49
50 # Extras for building the library
51 EXTRA_DEFS = $(@PLAT@_@LIB_LINKAGE@_LIB_DEFS)
52 EXTRA_LIBS = $(@PLAT@_@LIB_LINKAGE@_LIB_LIBS) $(@PLAT@_XXLIBS)
53
54 # Only the test programs will pick up these defs.
55 CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_TEST_DEFS)
56
57 apitest:        $(LIBRARY) apitest.o $(LDAP_LIBLBER_DEPEND)
58         $(LTLINK) $(LDFLAGS) -o $@ apitest.o $(LIBS)
59 ltest:  $(LIBRARY) test.o $(LDAP_LIBLBER_DEPEND)
60         $(LTLINK) $(LDFLAGS) -o $@ test.o $(LIBS)
61 ttest:  $(LIBRARY) tmpltest.o $(LDAP_LIBLBER_DEPEND)
62         $(LTLINK) $(LDFLAGS) -o $@ tmpltest.o $(LIBS)
63
64 CFFILES=ldap.conf ldapfilter.conf ldaptemplates.conf ldapsearchprefs.conf
65
66 install-local: $(CFFILES) FORCE
67         -$(MKDIR) $(DESTDIR)$(libdir)
68         $(LTINSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(DESTDIR)$(libdir)
69         -$(MKDIR) $(DESTDIR)$(sysconfdir)
70         @for i in $(CFFILES); do \
71                 if test ! -f $(DESTDIR)$(sysconfdir)/$$i; then \
72                         echo "installing $$i in $(sysconfdir)"; \
73                         echo "$(INSTALL) $(INSTALLFLAGS) -m 644  $(srcdir)/$$i $(DESTDIR)$(sysconfdir)/$$i"; \
74                         $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/$$i $(DESTDIR)$(sysconfdir)/$$i; \
75                 else \
76                         echo "PRESERVING EXISTING CONFIGURATION FILE $(sysconfdir)/$$i" ; \
77                 fi; \
78                 $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/$$i $(DESTDIR)$(sysconfdir)/$$i.default; \
79         done
80         -$(MKDIR) $(DESTDIR)$(datadir)
81         -$(MV) $(DESTDIR)$(datadir)/ldapfriendly $(DESTDIR)$(datadir)/ldapfriendly-
82         $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/ldapfriendly $(DESTDIR)$(datadir)/ldapfriendly
83