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