]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/plugins/fd/Makefile
kes Implement build and install of bpipe-fd.so plugin.
[bacula/bacula] / bacula / src / plugins / fd / Makefile
1 #
2 # Simple Makefile for building test FD plugins for Bacula
3 #
4 # Version $Id: Makefile.in 7638 2008-09-25 14:04:17Z kerns $
5 #
6 #
7 # This file is pulled in by all the Unix Bacula Makefiles
8 #   so it has all the "common" definitions
9 #
10
11 DATE="26 September 2008"
12 LSMDATE=26Sep08
13 VERSION=2.5.5
14 VERNAME=bacula-$(VERSION)#
15 MAINT=Kern Sibbald#
16 MAINTEMAIL=<kern@sibbald.com>#
17 WEBMAINT=#
18 WEBMAINTEMAIL=#
19 WEBPAGE=#
20 FTPSITENAME=#
21 FTPSITEDIR=#
22 #-------------------------------------------------------------------------
23
24 SHELL = /bin/sh
25
26 # Installation target directories & other installation stuff
27 prefix = 
28 exec_prefix = 
29 binprefix =
30 manprefix =
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
37 manext = 8
38
39 NO_ECHO = @
40
41 # Tools & program stuff
42 CC = gcc
43 CPP = gcc -E
44 CXX = /usr/bin/g++
45 MV = /bin/mv
46 RM = /bin/rm
47 RMF = /bin/rm -f
48 CP = /bin/cp
49 SED = /bin/sed
50 AWK = /usr/bin/mawk
51 ECHO = /bin/echo
52 CMP = /usr/bin/cmp
53 TBL = /usr/bin/tbl
54 AR = /usr/bin/ar
55 RANLIB = ranlib
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
63
64 # Flags & libs
65 CFLAGS = -g -O2 -Wall -fno-strict-aliasing -fno-exceptions -fno-rtti 
66
67 CPPFLAGS =  -fno-strict-aliasing -fno-exceptions -fno-rtti 
68 LDFLAGS = 
69 TTOOL_LDFLAGS = 
70 #DEFS = -DHAVE_CONFIG_H 
71 LIBS = -lpthread -ldl 
72 WRAPLIBS = -lwrap
73 DINCLUDE = 
74 DLIB = 
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
79 BDB_CPPFLAGS = 
80 BDB_LIBS = 
81
82
83 # Windows (cygwin) flags 
84 WCFLAGS = 
85 WLDFLAGS = 
86
87 # X Include directory
88 #XINC =  @XPM_CFLAGS@
89
90 # extra libraries needed by X on some systems, X library location
91 #XLIB =  @XPM_LIBS@ -lX11 
92
93 # End of common section of the Makefile
94 #-------------------------------------------------------------------------
95
96
97 # No optimization for now for easy debugging
98
99 FDDIR=../../filed
100 SRCDIR=../..
101 LIBDIR=../../lib
102
103 .SUFFIXES:    .c .o
104 .c.o:
105         $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) -I${SRCDIR} -I${FDDIR} -DTEST_PROGRAM -c $<
106
107 all: bpipe-fd.so
108
109 test: main example-plugin-fd.so
110
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 
113
114 main: fd_plugins.o
115         $(CXX) $(LDFLAGS) -L${LIBDIR} fd_plugins.o -o main -lbac -lpthread -lssl -l crypto -ldl
116
117 example-plugin-fd.o: example-plugin-fd.c ${FDDIR}/fd_plugins.h
118         $(CXX) -fPIC -I../.. -I${FDDIR} -c example-plugin-fd.c
119
120 example-plugin-fd.so: example-plugin-fd.o 
121         $(CXX) $(LDFLAGS) -shared example-plugin-fd.o -o example-plugin-fd.so
122
123 bpipe-fd.o: bpipe-fd.c ${FDDIR}/fd_plugins.h
124         $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) -fPIC -I../.. -I${FDDIR} -c bpipe-fd.c
125
126 bpipe-fd.so: bpipe-fd.o 
127         $(CXX) $(LDFLAGS) -shared bpipe-fd.o -o bpipe-fd.so
128
129 install: all
130         $(INSTALL_PROGRAM) bpipe-fd.so $(DESTDIR)$(plugindir)/bpipe-fd.so
131
132 clean:
133         rm -f main *.so *.o 1 2 3
134
135 distclean: clean
136         rm -f Makefile
137
138 uninstall:
139         $(RMF) $(DESTDIR)$(plugindir)/bpipe-fd.so
140
141 depend: