]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/filed/Makefile.in
Backport from Bacula Enterprise
[bacula/bacula] / bacula / src / filed / Makefile.in
1 #
2 # Bacula Makefile for the File daemon
3 #
4 # Copyright (C) 2000-2015 Kern Sibbald
5 # License: BSD 2-Clause; see file LICENSE-FOSS
6 #
7 @MCOMMON@
8
9 srcdir =        .
10 VPATH =         .
11 .PATH:          .
12
13 fd_group=@fd_group@
14
15 # one up
16 basedir = ..
17 # top dir
18 topdir = ../..
19 # this dir relative to top dir
20 thisdir = src/filed
21
22 DEBUG=@DEBUG@
23
24 GETTEXT_LIBS = @LIBINTL@
25
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 crypto.c \
34           estimate.c \
35           fd_plugins.c accurate.c \
36           filed_conf.c heartbeat.c hello.c job.c fd_snapshot.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 bacula-fd:  Makefile $(SVROBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
67         @echo "Linking $@ ..."
68         $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(SVROBJS) \
69           $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
70           $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
71
72 static-bacula-fd: Makefile $(SVROBJS) ../findlib/libbacfind.a ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
73         $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../findlib -o $@ $(SVROBJS) \
74            $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
75            $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
76         strip $@
77
78 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
79         cd $(topdir) \
80           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
81
82 libtool-clean:
83         @$(RMF) -r .libs _libs
84
85 clean:  libtool-clean
86         @$(RMF) bacula-fd filed core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
87         @$(RMF) static-bacula-fd
88
89 realclean: clean
90         @$(RMF) tags bacula-fd.conf
91
92 distclean: realclean
93         if test $(srcdir) = .; then $(MAKE) realclean; fi
94         (cd $(srcdir); $(RMF) Makefile)
95
96 devclean: realclean
97         if test $(srcdir) = .; then $(MAKE) realclean; fi
98         (cd $(srcdir); $(RMF) Makefile)
99
100 install: all
101         $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bacula-fd $(DESTDIR)$(sbindir)/bacula-fd
102         @srcconf=bacula-fd.conf; \
103         if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
104            destconf=$$srcconf.new; \
105            echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
106         else \
107            destconf=$$srcconf; \
108         fi; \
109         echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
110         ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
111         @if test "x${fd_group}" != "x"; then \
112            chgrp -f ${fd_group} ${DESTDIR}${sysconfdir}/$$destconf ; \
113         fi
114         @if test -f static-bacula-fd; then \
115            $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) static-bacula-fd $(DESTDIR)$(sbindir)/static-bacula-fd; \
116         fi
117
118 uninstall:
119         (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-fd.conf)
120         (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-fd.conf.new)
121
122 # Semi-automatic generation of dependencies:
123 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
124 # and it also includes system headers.
125 # `semi'-automatic since dependencies are generated at distribution time.
126
127 depend:
128         @$(MV) Makefile Makefile.bak
129         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
130         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
131         @$(CXX) -S -M $(CPPFLAGS) $(XINC) $(LZO_INC) -I$(srcdir) -I$(basedir) *.c >> Makefile
132         @if test -f Makefile ; then \
133             $(RMF) Makefile.bak; \
134         else \
135            $(MV) Makefile.bak Makefile; \
136            echo " ===== Something went wrong in make depend ====="; \
137         fi
138
139 # -----------------------------------------------------------------------
140 # DO NOT DELETE: nice dependency list follows