# # Simple Makefile for building test FD plugins for Bacula # # Version $Id$ # @MCOMMON@ # No optimization for now for easy debugging FDDIR=../../filed SRCDIR=../.. LIBDIR=../../lib .SUFFIXES: .c .o .lo .c.o: $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) -I${SRCDIR} -I${FDDIR} -DTEST_PROGRAM -c $< .c.lo: $(LIBTOOL_COMPILE) $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) -I${SRCDIR} -I${FDDIR} -DTEST_PROGRAM -c $< all: bpipe-fd$(DEFAULT_SHARED_OBJECT_TYPE) test: main example-plugin-fd.so fd_plugins.o: ${FDDIR}/fd_plugins.h ${FDDIR}/fd_plugins.c $(CXX) -I${SRCDIR} -I${FDDIR} -DTEST_PROGRAM -c ${FDDIR}/fd_plugins.c main: fd_plugins.o $(CXX) $(LDFLAGS) -L${LIBDIR} fd_plugins.o -o main -lbac -lpthread -lssl -l crypto -ldl example-plugin-fd.o: example-plugin-fd.c ${FDDIR}/fd_plugins.h $(CXX) -fPIC -I../.. -I${FDDIR} -c example-plugin-fd.c example-plugin-fd.so: example-plugin-fd.o $(CXX) $(LDFLAGS) -shared example-plugin-fd.o -o example-plugin-fd.so bpipe-fd.o: bpipe-fd.c ${FDDIR}/fd_plugins.h $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) -fPIC -I../.. -I${FDDIR} -c bpipe-fd.c bpipe-fd.lo: bpipe-fd.c ${FDDIR}/fd_plugins.h $(LIBTOOL_COMPILE) $(CXX) $(DEFS) $(DEBUG) $(CFLAGS) -I../.. -I${FDDIR} -c bpipe-fd.c bpipe-fd.la: bpipe-fd$(DEFAULT_OBJECT_TYPE) $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -shared bpipe-fd.lo -o $@ -rpath $(plugindir) -module -export-dynamic -avoid-version bpipe-fd.so: bpipe-fd.o $(CXX) $(LDFLAGS) -shared bpipe-fd.o -o $@ install: all $(MKDIR) $(DESTDIR)$(plugindir) $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bpipe-fd$(DEFAULT_SHARED_OBJECT_TYPE) $(DESTDIR)$(plugindir) $(RMF) $(DESTDIR)$(plugindir)/bpipe-fd.la libtool-clean: find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF) $(RMF) *.la $(RMF) -r .libs _libs clean: @LIBTOOL_CLEAN_TARGET@ rm -f main *.so *.o 1 2 3 distclean: clean rm -f Makefile uninstall: $(RMF) $(DESTDIR)$(plugindir)/bpipe-fd.so depend: