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