]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/dird/Makefile.in
add Prune command -- not yet tested
[bacula/bacula] / bacula / src / dird / Makefile.in
1 #
2 #  Bacula Director Makefile
3 #  
4 @MCOMMON@
5
6 srcdir =        .
7 VPATH =         .
8 .PATH:          .
9
10 # one up
11 basedir = ..
12 # top dir
13 topdir = ../..
14 # this dir relative to top dir
15 thisdir = src/dird
16
17 DEBUG=@DEBUG@
18
19 first_rule: all
20 dummy:
21
22 #
23 SVRSRCS = dird.c authenticate.c backup.c \
24           catreq.c dird_conf.c \
25           fd_cmds.c getmsg.c job.c \
26           mountreq.c msgchan.c newvol.c \
27           run_conf.c restore.c \
28           scheduler.c ua_cmds.c \
29           ua_dotcmds.c \
30           ua_db_query.c ua_retention.c \
31           ua_input.c ua_output.c ua_prune.c \
32           ua_purge.c ua_run.c \
33           ua_select.c ua_server.c \
34           ua_status.c verify.c
35 SVROBJS = dird.o authenticate.o backup.o \
36           catreq.o dird_conf.o \
37           fd_cmds.o getmsg.o job.o \
38           mountreq.o msgchan.o newvol.o \
39           run_conf.o restore.o \
40           scheduler.o ua_cmds.o \
41           ua_dotcmds.o \
42           ua_db_query.o ua_retention.o \
43           ua_input.o ua_output.o ua_prune.o \
44           ua_purge.o ua_run.o \
45           ua_select.o ua_server.o \
46           ua_status.o verify.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         $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
58 #-------------------------------------------------------------------------
59 all: Makefile bacula-dir
60         @echo "==== Make of dird is good ===="
61         @echo " "
62
63 bacula-dir:  $(SVROBJS) ../lib/libbac.a ../cats/libsql.a
64         $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ $(SVROBJS) \
65               -lsql $(LIBS) $(DLIB) -lbac -lm
66
67 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
68         cd $(topdir) \
69           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
70
71 clean:
72         @$(RMF) dird bacula-dir core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
73
74 realclean: clean
75         @$(RMF) tags bacula-dir.conf
76
77 distclean: realclean
78         if test $(srcdir) = .; then $(MAKE) realclean; fi
79         (cd $(srcdir); $(RMF) Makefile)
80
81 install: all
82         $(INSTALL_PROGRAM) bacula-dir $(DESTDIR)$(sbindir)/bacula-dir
83         @srcconf=bacula-dir.conf; \
84         if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
85            destconf=$$srcconf.new; \
86            echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
87         else \
88            destconf=$$srcconf; \
89         fi; \
90         echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
91         ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
92         @srcconf=query.sql; \
93         if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
94            destconf=$$srcconf.new; \
95            echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
96         else \
97            destconf=$$srcconf; \
98         fi; \
99         echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
100         ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
101
102
103 uninstall:
104         (cd $(DESTDIR)$(sbindir); $(RMF) bacula-dir)
105         (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-dir.conf)
106
107
108
109 # Semi-automatic generation of dependencies:
110 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
111 # and it also includes system headers.
112 # `semi'-automatic since dependencies are generated at distribution time.
113
114 depend:
115         @$(MV) Makefile Makefile.bak
116         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
117         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
118         @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
119         @if test -f Makefile ; then \
120             $(RMF) Makefile.bak; \
121         else \
122            $(MV) Makefile.bak Makefile; \
123            echo -e "Something went wrong\n\a"; \
124         fi
125
126 # -----------------------------------------------------------------------
127 # DO NOT DELETE: nice dependency list follows