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