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