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