]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/dird/Makefile.in
256737228ce3340d9ccf766e8b591a4f6fc30ea6
[bacula/bacula] / bacula / src / dird / Makefile.in
1 #
2 #  Bacula Director Makefile
3 #
4 # Copyright (C) 2000-2015 Kern Sibbald
5 # License: BSD 2-Clause; see file LICENSE-FOSS
6 #
7 @MCOMMON@
8
9 srcdir =        .
10 VPATH =         .
11 .PATH:          .
12
13 dir_group=@dir_group@
14
15 # one up
16 basedir = @BUILD_DIR@/src
17 # top dir
18 topdir = @BUILD_DIR@
19 # this dir relative to top dir
20 thisdir = src/dird
21
22 DEBUG=@DEBUG@
23
24 GETTEXT_LIBS = @LIBINTL@
25 CAP_LIBS = @CAP_LIBS@
26 DB_LIBS=@DB_LIBS@
27
28 first_rule: all
29 dummy:
30
31 #
32 SVRSRCS = dird.c admin.c authenticate.c \
33           autoprune.c backup.c bsr.c \
34           catreq.c dir_plugins.c dird_conf.c expand.c \
35           fd_cmds.c getmsg.c inc_conf.c job.c \
36           jobq.c mac.c mac_sql.c \
37           mountreq.c msgchan.c next_vol.c newvol.c \
38           recycle.c restore.c run_conf.c \
39           scheduler.c \
40           ua_acl.c ua_cmds.c ua_dotcmds.c \
41           ua_query.c \
42           ua_input.c ua_label.c ua_output.c ua_prune.c \
43           ua_purge.c ua_restore.c ua_run.c \
44           ua_select.c ua_server.c snapshot.c \
45           ua_status.c ua_tree.c ua_update.c vbackup.c verify.c
46 SVROBJS = $(SVRSRCS:.c=.o)
47
48 # these are the objects that are changed by the .configure process
49 EXTRAOBJS = @OBJLIST@
50
51 .SUFFIXES:      .c .o
52 .PHONY:
53 .DONTCARE:
54
55 # inference rules
56 .c.o:
57         @echo "Compiling $<"
58         $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
59 #-------------------------------------------------------------------------
60 all: Makefile bacula-dir @STATIC_DIR@
61         @echo "==== Make of dird is good ===="
62         @echo " "
63
64 bacula-dir: Makefile $(SVROBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) \
65             ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) \
66             ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
67         @echo "Linking $@ ..."
68         $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
69               -lbacfind -lbacsql -lbaccats -lbaccfg -lbac -lm $(DLIB) $(DB_LIBS) $(LIBS) \
70               $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
71
72 static-bacula-dir:  Makefile $(SVROBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) \
73                    ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) \
74                    ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
75         $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
76               -lbacfind -lbacsql -lbaccats -lbaccfg -lbac -lm $(DLIB) $(DB_LIBS) $(LIBS) \
77               $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
78         strip $@
79
80 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
81         cd $(topdir) \
82           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
83
84 libtool-clean:
85         @$(RMF) -r .libs _libs
86
87 clean:  libtool-clean
88         @$(RMF) dird bacula-dir core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
89         @$(RMF) static-bacula-dir
90
91 realclean: clean
92         @$(RMF) tags bacula-dir.conf
93
94 distclean: realclean
95         if test $(srcdir) = .; then $(MAKE) realclean; fi
96         (cd $(srcdir); $(RMF) Makefile)
97
98 devclean: realclean
99         if test $(srcdir) = .; then $(MAKE) realclean; fi
100         (cd $(srcdir); $(RMF) Makefile)
101
102 install: all
103         $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bacula-dir $(DESTDIR)$(sbindir)/bacula-dir
104         @srcconf=bacula-dir.conf; \
105            if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
106               destconf=$$srcconf.new; \
107               echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
108            else \
109               destconf=$$srcconf; \
110            fi; \
111            echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
112            ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
113            @if test "x${dir_group}" != "x"; then \
114               chgrp -f ${dir_group} ${DESTDIR}${sysconfdir}/$$destconf ; \
115            fi
116         @if  test -f ${DESTDIR}${scriptdir}/query.sql; then \
117            echo "  ==> Saving existing query.sql to query.sql.old"; \
118            $(MV) -f ${DESTDIR}${scriptdir}/query.sql ${DESTDIR}${scriptdir}/query.sql.old; \
119         fi
120         ${INSTALL_DATA} query.sql ${DESTDIR}${scriptdir}/query.sql
121         @if test -f static-bacula-dir; then \
122            $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) static-bacula-dir $(DESTDIR)$(sbindir)/static-bacula-dir; \
123         fi
124
125
126 uninstall:
127         (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-dir.conf bacula-dir.conf.new)
128         (cd $(DESTDIR)$(scriptdir); $(RMF) query.sql)
129
130
131
132 # Semi-automatic generation of dependencies:
133 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
134 # and it also includes system headers.
135 # `semi'-automatic since dependencies are generated at distribution time.
136
137 depend:
138         @$(MV) Makefile Makefile.bak
139         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
140         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
141         @$(CXX) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) *.c >> Makefile
142         @if test -f Makefile ; then \
143             $(RMF) Makefile.bak; \
144         else \
145            $(MV) Makefile.bak Makefile; \
146            echo " ===== Something went wrong in make depend ====="; \
147         fi
148
149 # -----------------------------------------------------------------------
150 # DO NOT DELETE: nice dependency list follows