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