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