Debian Codegraph @

src/plugins/dir/ldap/Makefile

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 #
2 # Simple Makefile for building test FD plugins for Bacula
3 #
4 # Copyright (C) 2000-2015 by Kern Sibbald
5 # License: BSD 2-Clause; see file LICENSE-FOSS
6 #
7 #
8
9 include ../Makefile.inc
10
11 LDAPSRC = ldap-dir.c
12 LDAPTESTSRC = ldaptest.c
13 LDAPOBJ = $(LDAPSRC:.c=.lo)
14 LDAPTESTOBJ = $(LDAPTESTSRC:.c=.lo)
15
16 # ldap-dir.la ldaptest
17 all: $(BPAM_LDAP_TARGET)
18
19 .c.lo:
20 @echo "Compiling $< ..."
21 $(NO_ECHO)$(LIBTOOL_COMPILE) $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) -I${SRCDIR} -I${DIRDIR} -I${DIRPLUGDIR} $(LDAP_INC) -c $<
22
23 %.lo: %.c %.h Makefile
24 @echo "Compiling $< ..."
25 $(NO_ECHO)$(LIBTOOL_COMPILE) $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) $(CFLAGS) -I${SRCDIR} -I${DIRDIR} -I${DIRPLUGDIR} $(LDAP_INC) -c $(@:.lo=.c)
26
27 ldap-dir.la: Makefile $(LDAPOBJ) $(COMMONOBJ) $(DIRPLUGDIR)/dirpluglib.lo
28 @echo "Linking $(@:.la=.so) ..."
29 $(NO_ECHO)$(LIBTOOL_LINK) --silent $(CXX) $(LDFLAGS) $(LDAP_LDFLAGS) $(LDAP_LIBS) -shared $^ -o $@ -rpath $(plugindir) -module -export-dynamic -avoid-version
30
31 $(DIRPLUGDIR)/dirpluglib.lo:
32 $(MAKE) -C $(DIRPLUGDIR) dirpluglib.lo
33
34 ldaptest: $(LDAPTESTOBJ) Makefile
35 @echo "Building ldaptest ..."
36 $(NO_ECHO)$(LIBTOOL_LINK) --silent $(CXX) $(LDFLAGS) $(LDAP_LDFLAGS) $(LDAP_LIBS) ldaptest.lo -o $@
37
38 install: $(BPAM_LDAP_TARGET_INSTALL)
39
40 install-ldap: ldap-dir.la
41 @echo "Installing plugin $(^:.la=.so) ..."
42 $(NO_ECHO)$(MKDIR) $(DESTDIR)$(plugindir)
43 $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) ldap-dir.la $(DESTDIR)$(plugindir)
44 $(NO_ECHO)$(RMF) $(DESTDIR)$(plugindir)/ldap-dir.la
45
46 install-ldaptest: ldaptest
47 @echo "Installing $< ..."
48 $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) $< $(DESTDIR)$(sbindir)
49
50 $(LIBTOOL_CLEAN_TARGET):
51 $(NO_ECHO)find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF)
52 $(NO_ECHO)$(RMF) *.la
53 $(NO_ECHO)$(RMF) -r .libs _libs
54
55 clean: $(LIBTOOL_CLEAN_TARGET)
56 $(NO_ECHO)rm -f main ldaptest *.so *.o
57
58 distclean: clean
59 $(NO_ECHO)rm -f Makefile *.la *.lo
60 $(NO_ECHO)rm -rf .libs
61
62 $(LIBTOOL_UNINSTALL_TARGET):
63 $(LIBTOOL_UNINSTALL) $(RMF) $(DESTDIR)$(plugindir)/ldap-dir.so
64 $(LIBTOOL_UNINSTALL) $(RMF) $(DESTDIR)$(plugindir)/msad-fd.so
65
66 uninstall: $(LIBTOOL_UNINSTALL_TARGET)
67
68 depend: