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