]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/filed/Makefile.in
Restore win32 dir from Branch-5.2 and update it
[bacula/bacula] / bacula / src / filed / Makefile.in
1 #
2 # Bacula Makefile for the File daemon
3 #
4 # Copyright (C) 2000-2016 Kern Sibbald
5 # License: BSD 2-Clause; see file LICENSE-FOSS
6 #
7 @MCOMMON@
8
9 srcdir =        .
10 VPATH =         .
11 .PATH:          .
12
13 fd_group=@fd_group@
14
15 # one up
16 basedir = ..
17 # top dir
18 topdir = ../..
19 # this dir relative to top dir
20 thisdir = src/filed
21
22 DEBUG=@DEBUG@
23
24 GETTEXT_LIBS = @LIBINTL@
25
26 AFS_CFLAGS = @AFS_CFLAGS@
27 AFS_LIBS = @AFS_LIBS@
28
29 first_rule: all
30 dummy:
31
32 #
33 SVRSRCS = filed.c authenticate.c backup.c crypto.c \
34           win_efs.c estimate.c \
35           fd_plugins.c accurate.c \
36           filed_conf.c heartbeat.c hello.c job.c fd_snapshot.c \
37           restore.c status.c verify.c verify_vol.c \
38           bacl.c bacl_linux.c bacl_osx.c bacl_solaris.c bacl_freebsd.c \
39           bxattr.c bxattr_linux.c bxattr_osx.c bxattr_solaris.c bxattr_freebsd.c
40 SVROBJS = $(SVRSRCS:.c=.o)
41
42 JSONOBJS = bfdjson.o filed_conf.o
43
44 # these are the objects that are changed by the .configure process
45 EXTRAOBJS = @OBJLIST@
46
47 CAP_LIBS = @CAP_LIBS@
48 FDLIBS = @FDLIBS@                 # extra libs for File daemon
49 ZLIBS = @ZLIBS@
50 LZO_LIBS = @LZO_LIBS@
51 LZO_INC= @LZO_INC@
52
53 # extra items for linking on Win32
54 WIN32OBJS = win32/winmain.o win32/winlib.a win32/winres.res
55 win32 = $(WIN32OBJS) -luser32 -lgdi32
56
57 WIN32LIBS = $(@WIN32@)
58
59 .SUFFIXES:      .c .o
60 .PHONY:
61 .DONTCARE:
62
63 # inference rules
64 .c.o:
65         @echo "Compiling $<"
66         $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(LZO_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
67 #-------------------------------------------------------------------------
68 all: Makefile @WIN32@ bacula-fd @STATIC_FD@ bfdjson
69         @echo "==== Make of filed is good ===="
70         @echo " "
71
72 bacl.o: bacl.c
73         @echo "Compiling $<"
74         $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(LZO_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $(AFS_CFLAGS) $<
75
76 win32/winlib.a:
77         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
78            (cd win32; $(GMAKE) DESTDIR=$(DESTDIR)); \
79         fi
80         @rm -f bacula-fd.exe
81
82 win32/winmain.o:
83         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
84            (cd win32; $(GMAKE) DESTDIR=$(DESTDIR)); \
85         fi
86         @rm -f bacula-fd.exe
87
88 win32/winres.res:
89         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
90            (cd win32; $(GMAKE) DESTDIR=$(DESTDIR)); \
91         fi
92         @rm -f bacula-fd.exe
93
94 # win32 libraries if needed
95 win32:  $(WIN32OBJS)
96         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
97            (cd win32; $(GMAKE) DESTDIR=$(DESTDIR)); \
98         fi
99         @rm -f bacula-fd.exe
100
101 bacula-fd:  Makefile $(SVROBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) @WIN32@
102         @echo "Linking $@ ..."
103         $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(SVROBJS) \
104           $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
105           $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
106
107 bfdjson:  Makefile $(JSONOBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) @WIN32@
108         @echo "Linking $@ ..."
109         $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(JSONOBJS) \
110           $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
111           $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
112
113 static-bacula-fd: Makefile $(SVROBJS) ../findlib/libbacfind.a ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) @WIN32@
114         $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../findlib -o $@ $(SVROBJS) \
115            $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
116            $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
117         strip $@
118
119 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
120         cd $(topdir) \
121           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
122
123 libtool-clean:
124         @$(RMF) -r .libs _libs
125
126 clean:  libtool-clean
127         @$(RMF) bacula-fd filed core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
128         @$(RMF) static-bacula-fd
129         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
130            (cd win32; $(GMAKE) clean); \
131         fi
132
133 realclean: clean
134         @$(RMF) tags bacula-fd.conf
135
136 distclean: realclean
137         if test $(srcdir) = .; then $(MAKE) realclean; fi
138         (cd $(srcdir); $(RMF) Makefile)
139         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
140            (cd win32; $(GMAKE) distclean); \
141         fi
142
143 devclean: realclean
144         if test $(srcdir) = .; then $(MAKE) realclean; fi
145         (cd $(srcdir); $(RMF) Makefile)
146         @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
147            (cd win32; $(GMAKE) devclean); \
148         fi
149
150 install: all
151         $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bacula-fd $(DESTDIR)$(sbindir)/bacula-fd
152         $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bfdjson $(DESTDIR)$(sbindir)/bfdjson
153         @srcconf=bacula-fd.conf; \
154         if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
155            destconf=$$srcconf.new; \
156            echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
157         else \
158            destconf=$$srcconf; \
159         fi; \
160         echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
161         ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
162         @if test "x${fd_group}" != "x" -a "x${DESTDIR}" = "x" ; then \
163            chgrp -f ${fd_group} ${DESTDIR}${sysconfdir}/$$destconf ; \
164         fi
165         @if test -f static-bacula-fd; then \
166            $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) static-bacula-fd $(DESTDIR)$(sbindir)/static-bacula-fd; \
167         fi
168
169 uninstall:
170         (cd $(DESTDIR)$(sbindir); $(RMF) bacula-fd bfdjson)
171         (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-fd.conf)
172         (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-fd.conf.new)
173
174 # Semi-automatic generation of dependencies:
175 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
176 # and it also includes system headers.
177 # `semi'-automatic since dependencies are generated at distribution time.
178
179 depend:
180         @$(MV) Makefile Makefile.bak
181         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
182         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
183         @$(CXX) -S -M $(CPPFLAGS) $(XINC) $(LZO_INC) -I$(srcdir) -I$(basedir) *.c >> Makefile
184         @if test -f Makefile ; then \
185             $(RMF) Makefile.bak; \
186         else \
187            $(MV) Makefile.bak Makefile; \
188            echo " ===== Something went wrong in make depend ====="; \
189         fi
190
191 # -----------------------------------------------------------------------
192 # DO NOT DELETE: nice dependency list follows