]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/filed/Makefile.in
Add copyright to Makefiles
[bacula/bacula] / bacula / src / filed / Makefile.in
1 #
2 # Bacula Makefile for the File daemon
3 #
4 #
5 # Author: Kern Sibbald
6 # License: LGPLv3
7 #
8 @MCOMMON@
9
10 srcdir =        .
11 VPATH =         .
12 .PATH:          .
13
14 fd_group=@fd_group@
15
16 # one up
17 basedir = ..
18 # top dir
19 topdir = ../..
20 # this dir relative to top dir
21 thisdir = src/filed
22
23 DEBUG=@DEBUG@
24
25 GETTEXT_LIBS = @LIBINTL@
26
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 \
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 LZO_LIBS = @LZO_LIBS@
47 LZO_INC= @LZO_INC@
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) $(LZO_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
57 #-------------------------------------------------------------------------
58 all: Makefile bacula-fd @STATIC_FD@
59         @echo "==== Make of filed is good ===="
60         @echo " "
61
62 acl.o: acl.c
63         @echo "Compiling $<"
64         $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(LZO_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $(AFS_CFLAGS) $<
65
66 win32/winlib.a:
67         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
68            (cd win32; $(GMAKE) DESTDIR=$(DESTDIR)); \
69         fi
70         @rm -f bacula-fd.exe
71
72 win32/winmain.o:
73         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
74            (cd win32; $(GMAKE) DESTDIR=$(DESTDIR)); \
75         fi
76         @rm -f bacula-fd.exe
77
78 win32/winres.res:
79         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
80            (cd win32; $(GMAKE) DESTDIR=$(DESTDIR)); \
81         fi
82         @rm -f bacula-fd.exe
83
84 # win32 libraries if needed
85 win32:  $(WIN32OBJS)
86         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
87            (cd win32; $(GMAKE) DESTDIR=$(DESTDIR)); \
88         fi
89         @rm -f bacula-fd.exe
90
91 bacula-fd:  Makefile $(SVROBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
92         @echo "Linking $@ ..."
93         $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(SVROBJS) \
94           $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
95           $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
96
97 static-bacula-fd: Makefile $(SVROBJS) ../findlib/libbacfind.a ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
98         $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../findlib -o $@ $(SVROBJS) \
99            $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
100            $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
101         strip $@
102
103 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
104         cd $(topdir) \
105           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
106
107 libtool-clean:
108         @$(RMF) -r .libs _libs
109
110 clean:  libtool-clean
111         @$(RMF) bacula-fd filed core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
112         @$(RMF) static-bacula-fd
113         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
114            (cd win32; $(GMAKE) clean); \
115         fi
116
117 realclean: clean
118         @$(RMF) tags bacula-fd.conf
119
120 distclean: realclean
121         if test $(srcdir) = .; then $(MAKE) realclean; fi
122         (cd $(srcdir); $(RMF) Makefile)
123         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
124            (cd win32; $(GMAKE) distclean); \
125         fi
126
127 devclean: realclean
128         if test $(srcdir) = .; then $(MAKE) realclean; fi
129         (cd $(srcdir); $(RMF) Makefile)
130         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
131            (cd win32; $(GMAKE) devclean); \
132         fi
133
134 install: all
135         $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bacula-fd $(DESTDIR)$(sbindir)/bacula-fd 
136         @srcconf=bacula-fd.conf; \
137         if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
138            destconf=$$srcconf.new; \
139            echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
140         else \
141            destconf=$$srcconf; \
142         fi; \
143         echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
144         ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
145         @if test "x${fd_group}" != "x"; then \
146            chgrp -f ${fd_group} ${DESTDIR}${sysconfdir}/$$destconf ; \
147         fi
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 uninstall:
153         (cd $(DESTDIR)$(sbindir); $(RMF) bacula-fd)
154         (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-fd.conf)
155         (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-fd.conf.new)
156
157 # Semi-automatic generation of dependencies:
158 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
159 # and it also includes system headers.
160 # `semi'-automatic since dependencies are generated at distribution time.
161
162 depend:
163         @$(MV) Makefile Makefile.bak
164         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
165         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
166         @$(CXX) -S -M $(CPPFLAGS) $(XINC) $(LZO_INC) -I$(srcdir) -I$(basedir) *.c >> Makefile
167         @if test -f Makefile ; then \
168             $(RMF) Makefile.bak; \
169         else \
170            $(MV) Makefile.bak Makefile; \
171            echo " ===== Something went wrong in make depend ====="; \
172         fi
173
174 # -----------------------------------------------------------------------
175 # DO NOT DELETE: nice dependency list follows