]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/filed/Makefile.in
Fix plugin bug with multiple simultaneous jobs
[bacula/bacula] / bacula / src / filed / Makefile.in
1 #
2 # Bacula Makefile for the File daemon
3 #
4 #
5
6 @MCOMMON@
7
8 srcdir =        .
9 VPATH =         .
10 .PATH:          .
11
12 fd_group=@fd_group@
13
14 # one up
15 basedir = ..
16 # top dir
17 topdir = ../..
18 # this dir relative to top dir
19 thisdir = src/filed
20
21 DEBUG=@DEBUG@
22
23 GETTEXT_LIBS = @LIBINTL@
24
25 PYTHON_LIBS = @PYTHON_LIBS@
26 PYTHON_INC = @PYTHON_INCDIR@
27
28 first_rule: all
29 dummy:
30
31 #
32 SVRSRCS = filed.c authenticate.c acl.c backup.c estimate.c \
33           fd_plugins.c accurate.c \
34           filed_conf.c heartbeat.c job.c pythonfd.c \
35           restore.c status.c verify.c verify_vol.c xattr.c
36 SVROBJS = $(SVRSRCS:.c=.o)
37
38 # these are the objects that are changed by the .configure process
39 EXTRAOBJS = @OBJLIST@
40
41 CAP_LIBS = @CAP_LIBS@
42 FDLIBS = @FDLIBS@                 # extra libs for File daemon
43 ZLIBS = @ZLIBS@
44 LZOLIBS = @LZOLIBS@
45
46 # extra items for linking on Win32
47 WIN32OBJS = win32/winmain.o win32/winlib.a win32/winres.res
48 win32 = $(WIN32OBJS) -luser32 -lgdi32
49
50 WIN32LIBS = $(@WIN32@)
51
52 .SUFFIXES:      .c .o
53 .PHONY:
54 .DONTCARE:
55
56 # inference rules
57 .c.o:
58         @echo "Compiling $<"
59         $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
60 #-------------------------------------------------------------------------
61 all: Makefile @WIN32@ bacula-fd @STATIC_FD@
62         @echo "==== Make of filed is good ===="
63         @echo " "
64
65 acl.o: acl.c
66         @echo "Compiling $<"
67         $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
68
69 win32/winlib.a:
70         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
71            (cd win32; $(GMAKE) DESTDIR=$(DESTDIR)); \
72         fi
73         @rm -f bacula-fd.exe
74
75 win32/winmain.o:
76         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
77            (cd win32; $(GMAKE) DESTDIR=$(DESTDIR)); \
78         fi
79         @rm -f bacula-fd.exe
80
81 win32/winres.res:
82         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
83            (cd win32; $(GMAKE) DESTDIR=$(DESTDIR)); \
84         fi
85         @rm -f bacula-fd.exe
86
87 # win32 libraries if needed
88 win32:  $(WIN32OBJS)
89         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
90            (cd win32; $(GMAKE) DESTDIR=$(DESTDIR)); \
91         fi
92         @rm -f bacula-fd.exe
93
94 bacula-fd:  Makefile $(SVROBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbacpy$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) @WIN32@
95         @echo "Linking $@ ..."
96         $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(SVROBJS) \
97           $(WIN32LIBS) $(FDLIBS) $(ZLIBS) $(LZOLIBS) -lbacfind -lbacpy -lbaccfg -lbac -lm $(PYTHON_LIBS) $(LIBS) \
98           $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
99
100 static-bacula-fd: Makefile $(SVROBJS) ../findlib/libbacfind.a ../lib/libbacpy$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) @WIN32@
101         $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../findlib -o $@ $(SVROBJS) \
102            $(WIN32LIBS) $(FDLIBS) $(ZLIBS) $(LZOLIBS) -lbacfind -lbacpy -lbaccfg -lbac -lm $(PYTHON_LIBS) $(LIBS) \
103            $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
104         strip $@
105
106 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
107         cd $(topdir) \
108           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
109
110 libtool-clean:
111         @$(RMF) -r .libs _libs
112
113 clean:  libtool-clean
114         @$(RMF) bacula-fd filed core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
115         @$(RMF) static-bacula-fd
116         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
117            (cd win32; $(GMAKE) clean); \
118         fi
119
120 realclean: clean
121         @$(RMF) tags bacula-fd.conf
122
123 distclean: realclean
124         if test $(srcdir) = .; then $(MAKE) realclean; fi
125         (cd $(srcdir); $(RMF) Makefile)
126         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
127            (cd win32; $(GMAKE) distclean); \
128         fi
129
130 devclean: realclean
131         if test $(srcdir) = .; then $(MAKE) realclean; fi
132         (cd $(srcdir); $(RMF) Makefile)
133         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
134            (cd win32; $(GMAKE) devclean); \
135         fi
136
137 install: all
138         $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bacula-fd $(DESTDIR)$(sbindir)/bacula-fd 
139         @srcconf=bacula-fd.conf; \
140         if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
141            destconf=$$srcconf.new; \
142            echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
143         else \
144            destconf=$$srcconf; \
145         fi; \
146         echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
147         ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
148         @if test "x${fd_group}" != "x"; then \
149            chgrp -f ${fd_group} ${DESTDIR}${sysconfdir}/$$destconf ; \
150         fi
151         @if test -f static-bacula-fd; then \
152            $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) static-bacula-fd $(DESTDIR)$(sbindir)/static-bacula-fd; \
153         fi
154
155
156
157 uninstall:
158         (cd $(DESTDIR)$(sbindir); $(RMF) bacula-fd)
159         (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-fd.conf)
160         (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-fd.conf.new)
161
162
163
164 # Semi-automatic generation of dependencies:
165 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
166 # and it also includes system headers.
167 # `semi'-automatic since dependencies are generated at distribution time.
168
169 depend:
170         @$(MV) Makefile Makefile.bak
171         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
172         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
173         @$(CXX) -S -M $(CPPFLAGS) $(XINC) $(PYTHON_INC) -I$(srcdir) -I$(basedir) *.c >> Makefile
174         @if test -f Makefile ; then \
175             $(RMF) Makefile.bak; \
176         else \
177            $(MV) Makefile.bak Makefile; \
178            echo " ===== Something went wrong in make depend ====="; \
179         fi
180
181 # -----------------------------------------------------------------------
182 # DO NOT DELETE: nice dependency list follows