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