]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/plugins/fd/Makefile.in
Apply patch from Marco van Wieringen <mvw@planets.elm.net>
[bacula/bacula] / bacula / src / plugins / fd / Makefile.in
1 #
2 # Simple Makefile for building test FD plugins for Bacula
3 #
4 # Version $Id$
5 #
6 @MCOMMON@
7
8
9 # No optimization for now for easy debugging
10
11 FDDIR=../../filed
12 SRCDIR=../..
13 LIBDIR=../../lib
14
15 .SUFFIXES:    .c .o .lo
16
17 .c.o:
18         $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) -I${SRCDIR} -I${FDDIR} -DTEST_PROGRAM -c $<
19
20 .c.lo:
21         $(LIBTOOL_COMPILE) $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) -I${SRCDIR} -I${FDDIR} -DTEST_PROGRAM -c $<
22
23 all: bpipe-fd$(DEFAULT_SHARED_OBJECT_TYPE)
24
25 test: main example-plugin-fd.so
26
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 
29
30 main: fd_plugins.o
31         $(CXX) $(LDFLAGS) -L${LIBDIR} fd_plugins.o -o main -lbac -lpthread -lssl -l crypto -ldl
32
33 example-plugin-fd.o: example-plugin-fd.c ${FDDIR}/fd_plugins.h
34         $(CXX) -fPIC -I../.. -I${FDDIR} -c example-plugin-fd.c
35
36 example-plugin-fd.so: example-plugin-fd.o 
37         $(CXX) $(LDFLAGS) -shared example-plugin-fd.o -o example-plugin-fd.so
38
39 bpipe-fd.o: bpipe-fd.c ${FDDIR}/fd_plugins.h
40         $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) -fPIC -I../.. -I${FDDIR} -c bpipe-fd.c
41
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
44
45 bpipe-fd.la: bpipe-fd$(DEFAULT_OBJECT_TYPE)
46         $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -shared bpipe-fd.lo -o $@ -rpath $(plugindir) -module -export-dynamic -avoid-version 
47
48 bpipe-fd.so: bpipe-fd.o
49         $(CXX) $(LDFLAGS) -shared bpipe-fd.o -o $@
50
51 install: all
52         $(MKDIR) $(DESTDIR)$(plugindir)
53         $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bpipe-fd$(DEFAULT_SHARED_OBJECT_TYPE) $(DESTDIR)$(plugindir)
54         $(RMF) $(DESTDIR)$(plugindir)/bpipe-fd.la
55
56 libtool-clean:
57         find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF)
58         $(RMF) *.la
59         $(RMF) -r .libs _libs
60
61 clean: @LIBTOOL_CLEAN_TARGET@
62         rm -f main *.so *.o 1 2 3
63
64 distclean: clean
65         rm -f Makefile
66
67 uninstall:
68         $(RMF) $(DESTDIR)$(plugindir)/bpipe-fd.so
69
70 depend: