]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/dird/Makefile.in
c4c47df9657ad401a470997540e5c937edb633ca
[bacula/bacula] / bacula / src / dird / Makefile.in
1 #
2 #  Bacula Director Makefile
3 #
4 #  
5 @MCOMMON@
6
7 srcdir =        .
8 VPATH =         .
9 .PATH:          .
10
11 dir_group=@dir_group@
12
13 # one up
14 basedir = ..
15 # top dir
16 topdir = ../..
17 # this dir relative to top dir
18 thisdir = src/dird
19
20 DEBUG=@DEBUG@
21
22 GETTEXT_LIBS = @LIBINTL@
23 CAP_LIBS = @CAP_LIBS@
24
25 DB_LIBS=@DB_LIBS@
26
27 first_rule: all
28 dummy:
29
30 #
31 SVRSRCS = dird.c admin.c authenticate.c \
32           autoprune.c backup.c bsr.c \
33           catreq.c dir_plugins.c dird_conf.c expand.c \
34           fd_cmds.c getmsg.c inc_conf.c job.c \
35           jobq.c mac.c mac_sql.c \
36           mountreq.c msgchan.c next_vol.c newvol.c \
37           recycle.c restore.c run_conf.c \
38           scheduler.c \
39           ua_acl.c ua_cmds.c ua_dotcmds.c \
40           ua_query.c \
41           ua_input.c ua_label.c ua_output.c ua_prune.c \
42           ua_purge.c ua_restore.c ua_run.c \
43           ua_select.c ua_server.c \
44           ua_status.c ua_tree.c ua_update.c vbackup.c verify.c
45 SVROBJS = $(SVRSRCS:.c=.o)
46
47 # these are the objects that are changed by the .configure process
48 EXTRAOBJS = @OBJLIST@
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) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
58 #-------------------------------------------------------------------------
59 all: Makefile bacula-dir @STATIC_DIR@
60         @echo "==== Make of dird is good ===="
61         @echo " "
62
63 bacula-dir: Makefile $(SVROBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) \
64             ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) \
65             ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
66         @echo "Linking $@ ..."
67         $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
68               -lbacfind -lbacsql -lbaccats -lbaccfg -lbac -lm $(DLIB) $(DB_LIBS) $(LIBS) \
69               $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
70
71 static-bacula-dir:  Makefile $(SVROBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) \
72                    ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) \
73                    ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
74         $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
75               -lbacfind -lbacsql -lbaccats -lbaccfg -lbac -lm $(DLIB) $(DB_LIBS) $(LIBS) \
76               $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
77         strip $@
78
79 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
80         cd $(topdir) \
81           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
82
83 libtool-clean:
84         @$(RMF) -r .libs _libs
85
86 clean:  libtool-clean
87         @$(RMF) dird bacula-dir core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
88         @$(RMF) static-bacula-dir
89
90 realclean: clean
91         @$(RMF) tags bacula-dir.conf
92
93 distclean: realclean
94         if test $(srcdir) = .; then $(MAKE) realclean; fi
95         (cd $(srcdir); $(RMF) Makefile)
96
97 devclean: realclean
98         if test $(srcdir) = .; then $(MAKE) realclean; fi
99         (cd $(srcdir); $(RMF) Makefile)
100
101 install: all
102         $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bacula-dir $(DESTDIR)$(sbindir)/bacula-dir
103         @srcconf=bacula-dir.conf; \
104            if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
105               destconf=$$srcconf.new; \
106               echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
107            else \
108               destconf=$$srcconf; \
109            fi; \
110            echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
111            ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
112            @if test "x${dir_group}" != "x"; then \
113               chgrp -f ${dir_group} ${DESTDIR}${sysconfdir}/$$destconf ; \
114            fi
115         @if  test -f ${DESTDIR}${scriptdir}/query.sql; then \
116            echo "  ==> Saving existing query.sql to query.sql.old"; \
117            $(MV) -f ${DESTDIR}${scriptdir}/query.sql ${DESTDIR}${scriptdir}/query.sql.old; \
118         fi 
119         ${INSTALL_DATA} query.sql ${DESTDIR}${scriptdir}/query.sql
120         @if test -f static-bacula-dir; then \
121            $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) static-bacula-dir $(DESTDIR)$(sbindir)/static-bacula-dir; \
122         fi
123
124
125 uninstall:
126         (cd $(DESTDIR)$(sbindir); $(RMF) bacula-dir
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