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