2 # Simple Makefile for building test FD plugins for Bacula
4 # Version $Id: Makefile.in 7638 2008-09-25 14:04:17Z kerns $
7 # This file is pulled in by all the Unix Bacula Makefiles
8 # so it has all the "common" definitions
11 DATE="26 September 2008"
14 VERNAME=bacula-$(VERSION)#
16 MAINTEMAIL=<kern@sibbald.com>#
22 #-------------------------------------------------------------------------
26 # Installation target directories & other installation stuff
31 datarootdir = ${prefix}/share
32 sbindir = /home/kern/bacula/bin
33 sysconfdir = /home/kern/bacula/bin
34 plugindir = /home/kern/bacula/bin
35 scriptdir = /home/kern/bacula/bin
36 mandir = /home/kern/bacula/bin
41 # Tools & program stuff
56 MKDIR = /home/kern/bacula/k/autoconf/mkinstalldirs
57 INSTALL = /usr/bin/install -c
58 # add the -s to the following in PRODUCTION mode
59 INSTALL_PROGRAM = /usr/bin/install -c -m 0754
60 INSTALL_DATA = /usr/bin/install -c -m 644
61 INSTALL_SCRIPT = /usr/bin/install -c -m 0754
62 INSTALL_CONFIG = /usr/bin/install -c -m 640
65 CFLAGS = -g -O2 -Wall -fno-strict-aliasing -fno-exceptions -fno-rtti
67 CPPFLAGS = -fno-strict-aliasing -fno-exceptions -fno-rtti
70 #DEFS = -DHAVE_CONFIG_H
75 DB_LIBS = -L/home/kern/bacula/depkgs/sqlite3 -lsqlite3
76 PYTHON_LIBS = -L/usr/lib/python2.5/config -lpython2.5 -lutil -lrt
77 PYTHON_INC = -I/usr/include/python2.5
78 OPENSSL_LIBS = -lssl -lcrypto
83 # Windows (cygwin) flags
90 # extra libraries needed by X on some systems, X library location
91 #XLIB = @XPM_LIBS@ -lX11
93 # End of common section of the Makefile
94 #-------------------------------------------------------------------------
97 # No optimization for now for easy debugging
105 $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) -I${SRCDIR} -I${FDDIR} -DTEST_PROGRAM -c $<
109 test: main example-plugin-fd.so
111 fd_plugins.o: ${FDDIR}/fd_plugins.h ${FDDIR}/fd_plugins.c
112 $(CXX) -I${SRCDIR} -I${FDDIR} -DTEST_PROGRAM -c ${FDDIR}/fd_plugins.c
115 $(CXX) $(LDFLAGS) -L${LIBDIR} fd_plugins.o -o main -lbac -lpthread -lssl -l crypto -ldl
117 example-plugin-fd.o: example-plugin-fd.c ${FDDIR}/fd_plugins.h
118 $(CXX) -fPIC -I../.. -I${FDDIR} -c example-plugin-fd.c
120 example-plugin-fd.so: example-plugin-fd.o
121 $(CXX) $(LDFLAGS) -shared example-plugin-fd.o -o example-plugin-fd.so
123 bpipe-fd.o: bpipe-fd.c ${FDDIR}/fd_plugins.h
124 $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) -fPIC -I../.. -I${FDDIR} -c bpipe-fd.c
126 bpipe-fd.so: bpipe-fd.o
127 $(CXX) $(LDFLAGS) -shared bpipe-fd.o -o bpipe-fd.so
130 $(INSTALL_PROGRAM) bpipe-fd.so $(DESTDIR)$(plugindir)/bpipe-fd.so
133 rm -f main *.so *.o 1 2 3
139 $(RMF) $(DESTDIR)$(plugindir)/bpipe-fd.so