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