]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/filed/Makefile.in
Added preliminary AFS acl support. The code may need some testing on a real AFS enabl...
[bacula/bacula] / bacula / src / filed / Makefile.in
1 #
2 # Bacula Makefile for the File daemon
3 #
4 #  Version $Id$
5 #
6
7 @MCOMMON@
8
9 srcdir =        .
10 VPATH =         .
11 .PATH:          .
12
13 # one up
14 basedir = ..
15 # top dir
16 topdir = ../..
17 # this dir relative to top dir
18 thisdir = src/filed
19
20 DEBUG=@DEBUG@
21
22 GETTEXT_LIBS = @LIBINTL@
23
24 PYTHON_LIBS = @PYTHON_LIBS@
25 PYTHON_INC = @PYTHON_INCDIR@
26 AFS_CFLAGS = @AFS_CFLAGS@
27 AFS_LIBS = @AFS_LIBS@
28
29 first_rule: all
30 dummy:
31
32 #
33 SVRSRCS = filed.c authenticate.c acl.c backup.c estimate.c \
34           fd_plugins.c accurate.c \
35           filed_conf.c heartbeat.c job.c pythonfd.c \
36           restore.c status.c verify.c verify_vol.c xattr.c
37 SVROBJS = $(SVRSRCS:.c=.o)
38
39 # these are the objects that are changed by the .configure process
40 EXTRAOBJS = @OBJLIST@
41
42 CAP_LIBS = @CAP_LIBS@
43 FDLIBS = @FDLIBS@                 # extra libs for File daemon
44 ZLIBS = @ZLIBS@
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) $(AFS_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) -lbacfind -lbacpy -lbaccfg -lbac -lm $(PYTHON_LIBS) $(LIBS) \
98           $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_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) -lbacfind -lbacpy -lbaccfg -lbac -lm $(PYTHON_LIBS) $(LIBS) \
103            $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_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 -f static-bacula-fd; then \
149            $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) static-bacula-fd $(DESTDIR)$(sbindir)/static-bacula-fd; \
150         fi
151
152
153
154 uninstall:
155         (cd $(DESTDIR)$(sbindir); $(RMF) bacula-fd)
156         (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-fd.conf)
157         (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-fd.conf.new)
158
159
160
161 # Semi-automatic generation of dependencies:
162 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
163 # and it also includes system headers.
164 # `semi'-automatic since dependencies are generated at distribution time.
165
166 depend:
167         @$(MV) Makefile Makefile.bak
168         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
169         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
170         @$(CXX) -S -M $(CPPFLAGS) $(XINC) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
171         @if test -f Makefile ; then \
172             $(RMF) Makefile.bak; \
173         else \
174            $(MV) Makefile.bak Makefile; \
175            echo " ===== Something went wrong in make depend ====="; \
176         fi
177
178 # -----------------------------------------------------------------------
179 # DO NOT DELETE: nice dependency list follows