1# Makefile.in for LDAP -lldap
2# $OpenLDAP$
3## This work is part of OpenLDAP Software <http://www.openldap.org/>.
4##
5## Copyright 1998-2021 The OpenLDAP Foundation.
6## All rights reserved.
7##
8## Redistribution and use in source and binary forms, with or without
9## modification, are permitted only as authorized by the OpenLDAP
10## Public License.
11##
12## A copy of this license is available in the file LICENSE in the
13## top-level directory of the distribution or, alternatively, at
14## <http://www.OpenLDAP.org/license.html>.
15
16LIBRARY = libldap.la
17
18PROGRAMS = apitest dntest ftest ltest urltest testavl
19
20SRCS	= bind.c open.c result.c error.c compare.c search.c \
21	controls.c messages.c references.c extended.c cyrus.c \
22	modify.c add.c modrdn.c delete.c abandon.c \
23	sasl.c sbind.c unbind.c cancel.c  \
24	filter.c free.c sort.c passwd.c whoami.c vc.c \
25	getdn.c getentry.c getattr.c getvalues.c addentry.c \
26	request.c os-ip.c url.c pagectrl.c sortctrl.c vlvctrl.c \
27	init.c options.c print.c string.c util-int.c schema.c \
28	charray.c os-local.c dnssrv.c utf-8.c utf-8-conv.c \
29	tls2.c tls_o.c tls_g.c \
30	turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c \
31	assertion.c deref.c ldifutil.c ldif.c fetch.c lbase64.c \
32	msctrl.c psearchctrl.c threads.c rdwr.c tpool.c rq.c \
33	thr_posix.c thr_thr.c thr_nt.c thr_pth.c thr_debug.c \
34	account_usability.c avl.c tavl.c testavl.c
35
36OBJS	= bind.lo open.lo result.lo error.lo compare.lo search.lo \
37	controls.lo messages.lo references.lo extended.lo cyrus.lo \
38	modify.lo add.lo modrdn.lo delete.lo abandon.lo \
39	sasl.lo sbind.lo unbind.lo cancel.lo \
40	filter.lo free.lo sort.lo passwd.lo whoami.lo vc.lo \
41	getdn.lo getentry.lo getattr.lo getvalues.lo addentry.lo \
42	request.lo os-ip.lo url.lo pagectrl.lo sortctrl.lo vlvctrl.lo \
43	init.lo options.lo print.lo string.lo util-int.lo schema.lo \
44	charray.lo os-local.lo dnssrv.lo utf-8.lo utf-8-conv.lo \
45	tls2.lo tls_o.lo tls_g.lo \
46	turn.lo ppolicy.lo dds.lo txn.lo ldap_sync.lo stctrl.lo \
47	assertion.lo deref.lo ldifutil.lo ldif.lo fetch.lo lbase64.lo \
48	msctrl.lo psearchctrl.lo threads.lo rdwr.lo tpool.lo rq.lo \
49	thr_posix.lo thr_thr.lo thr_nt.lo thr_pth.lo thr_debug.lo \
50	account_usability.lo avl.lo tavl.lo
51
52LDAP_INCDIR= ../../include
53LDAP_LIBDIR= ../../libraries
54
55LIB_DEFS = -DLDAP_LIBRARY
56
57XLIBS = $(LIBRARY) $(LDAP_LIBLBER_LA) $(LDAP_LIBLUTIL_A)
58XXLIBS = $(SECURITY_LIBS) $(LUTIL_LIBS)
59NT_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
60UNIX_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS) $(LTHREAD_LIBS)
61ifneq (,$(OL_VERSIONED_SYMBOLS))
62	SYMBOL_VERSION_FLAGS=$(OL_VERSIONED_SYMBOLS)$(LDAP_LIBDIR)/libldap/libldap.vers
63endif
64
65apitest:	$(XLIBS) apitest.o
66	$(LTLINK) -o $@ apitest.o $(LIBS)
67dntest:	$(XLIBS) dntest.o
68	$(LTLINK) -o $@ dntest.o $(LIBS)
69ftest:	$(XLIBS) ftest.o
70	$(LTLINK) -o $@ ftest.o $(LIBS)
71ltest:	$(XLIBS) test.o
72	$(LTLINK) -o $@ test.o $(LIBS)
73testavl: $(XLIBS) testavl.o
74	$(LTLINK) -o $@ testavl.o $(LIBS)
75testtavl: $(XLIBS) testtavl.o
76	$(LTLINK) -o $@ testtavl.o $(LIBS)
77urltest: $(XLIBS) urltest.o
78	$(LTLINK) -o $@ urltest.o $(LIBS)
79
80
81CFFILES=ldap.conf
82
83install-local: $(CFFILES) FORCE
84	-$(MKDIR) $(DESTDIR)$(libdir)
85	$(LTINSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(DESTDIR)$(libdir)
86	$(LTFINISH) $(DESTDIR)$(libdir)
87	-$(MKDIR) $(DESTDIR)$(sysconfdir)
88	@for i in $(CFFILES); do \
89		$(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/$$i $(DESTDIR)$(sysconfdir)/$$i.sample; \
90	done
91
92