2 # Simple Makefile for building test FD plugins for Bacula
9 # No optimization for now for easy debugging
18 $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) -I${SRCDIR} -I${FDDIR} -DTEST_PROGRAM -c $<
21 $(LIBTOOL_COMPILE) $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) -I${SRCDIR} -I${FDDIR} -DTEST_PROGRAM -c $<
23 all: bpipe-fd$(DEFAULT_SHARED_OBJECT_TYPE)
25 test: main example-plugin-fd.so
27 fd_plugins.o: ${FDDIR}/fd_plugins.h ${FDDIR}/fd_plugins.c
28 $(CXX) -I${SRCDIR} -I${FDDIR} -DTEST_PROGRAM -c ${FDDIR}/fd_plugins.c
31 $(CXX) $(LDFLAGS) -L${LIBDIR} fd_plugins.o -o main -lbac -lpthread -lssl -l crypto -ldl
33 example-plugin-fd.o: example-plugin-fd.c ${FDDIR}/fd_plugins.h
34 $(CXX) -fPIC -I../.. -I${FDDIR} -c example-plugin-fd.c
36 example-plugin-fd.so: example-plugin-fd.o
37 $(CXX) $(LDFLAGS) -shared example-plugin-fd.o -o example-plugin-fd.so
39 bpipe-fd.o: bpipe-fd.c ${FDDIR}/fd_plugins.h
40 $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) -fPIC -I../.. -I${FDDIR} -c bpipe-fd.c
42 bpipe-fd.lo: bpipe-fd.c ${FDDIR}/fd_plugins.h
43 $(LIBTOOL_COMPILE) $(CXX) $(DEFS) $(DEBUG) $(CFLAGS) -I../.. -I${FDDIR} -c bpipe-fd.c
45 bpipe-fd.la: Makefile bpipe-fd$(DEFAULT_OBJECT_TYPE)
46 $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -shared bpipe-fd.lo -o $@ -rpath $(plugindir) -module -export-dynamic -avoid-version
48 bpipe-fd.so: bpipe-fd.o
49 $(CXX) $(LDFLAGS) -shared bpipe-fd.o -o $@
52 $(MKDIR) $(DESTDIR)$(plugindir)
53 $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bpipe-fd$(DEFAULT_SHARED_OBJECT_TYPE) $(DESTDIR)$(plugindir)
54 $(RMF) $(DESTDIR)$(plugindir)/bpipe-fd.la
57 find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF)
61 clean: @LIBTOOL_CLEAN_TARGET@
62 rm -f main *.so *.o 1 2 3
68 $(RMF) $(DESTDIR)$(plugindir)/bpipe-fd.so