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