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