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