2 # Simple Makefile for building test FD plugins for Bacula
8 # No optimization for now for easy debugging
17 $(LIBTOOL_COMPILE) $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) -I${SRCDIR} -I${FDDIR} -DTEST_PROGRAM -c $<
19 all: bpipe-fd.la test-plugin-fd.la delta-test-fd.la
21 example-plugin-fd.lo: example-plugin-fd.c ${FDDIR}/fd_plugins.h
22 $(LIBTOOL_COMPILE) $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) $(CFLAGS) -I../.. -I${FDDIR} -c example-plugin-fd.c
24 example-plugin-fd.la: Makefile example-plugin-fd$(DEFAULT_OBJECT_TYPE)
25 $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -shared example-plugin-fd.lo -o $@ -rpath $(plugindir) -module -export-dynamic -avoid-version
27 bpipe-fd.lo: bpipe-fd.c ${FDDIR}/fd_plugins.h
28 $(LIBTOOL_COMPILE) $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) $(CFLAGS) -I../.. -I${FDDIR} -c bpipe-fd.c
30 bpipe-fd.la: Makefile bpipe-fd$(DEFAULT_OBJECT_TYPE)
31 $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -shared bpipe-fd.lo -o $@ -rpath $(plugindir) -module -export-dynamic -avoid-version
33 delta-test-fd.lo: delta-test-fd.c ${FDDIR}/fd_plugins.h fd_common.h
34 $(LIBTOOL_COMPILE) $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) $(CFLAGS) -I../.. -I${FDDIR} -c delta-test-fd.c
36 delta-test-fd.la: Makefile delta-test-fd$(DEFAULT_OBJECT_TYPE)
37 $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -shared delta-test-fd.lo -o $@ -rpath $(plugindir) -module -export-dynamic -avoid-version
39 test-plugin-fd.lo: test-plugin-fd.c ${FDDIR}/fd_plugins.h
40 $(LIBTOOL_COMPILE) $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) $(CFLAGS) -I../.. -I${FDDIR} -c test-plugin-fd.c
42 test-plugin-fd.la: Makefile test-plugin-fd$(DEFAULT_OBJECT_TYPE)
43 $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -shared test-plugin-fd.lo -o $@ -rpath $(plugindir) -module -export-dynamic -avoid-version
46 $(MKDIR) $(DESTDIR)$(plugindir)
47 $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bpipe-fd.la $(DESTDIR)$(plugindir)
48 $(RMF) $(DESTDIR)$(plugindir)/bpipe-fd.la
50 install-test-plugin: all
51 $(MKDIR) $(DESTDIR)$(plugindir)
52 $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) test-plugin-fd.la $(DESTDIR)$(plugindir)
53 $(RMF) $(DESTDIR)$(plugindir)/test-plugin-fd.la
54 $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) delta-test-fd.la $(DESTDIR)$(plugindir)
55 $(RMF) $(DESTDIR)$(plugindir)/delta-test-fd.la
58 @find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF)
60 @$(RMF) -r .libs _libs
63 @rm -f main *.so *.o 1 2 3
69 $(LIBTOOL_UNINSTALL) $(RMF) $(DESTDIR)$(plugindir)/bpipe-fd.so
71 uninstall: @LIBTOOL_UNINSTALL_TARGET@