]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/dird/Makefile.in
fa96686e51e4104f6e752f4ff329954988ba63e1
[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 catreq.c dird_conf.c \
24           fd_cmds.c getmsg.c job.c \
25           mountreq.c msgchan.c newvol.c run_conf.c restore.c \
26           scheduler.c ua_cmds.c \
27           ua_dotcmds.c \
28           ua_db_query.c ua_retention.c \
29           ua_input.c ua_output.c ua_prune.c ua_run.c \
30           ua_select.c ua_server.c \
31           ua_status.c verify.c
32 SVROBJS = dird.o authenticate.o backup.o catreq.o dird_conf.o \
33           fd_cmds.o getmsg.o job.o \
34           mountreq.o msgchan.o newvol.o run_conf.o restore.o \
35           scheduler.o ua_cmds.o \
36           ua_dotcmds.o \
37           ua_db_query.o ua_retention.o \
38           ua_input.o ua_output.o ua_prune.o ua_run.o \
39           ua_select.o ua_server.o \
40           ua_status.o verify.o
41
42 # these are the objects that are changed by the .configure process
43 EXTRAOBJS = @OBJLIST@
44
45 .SUFFIXES:      .c .o
46 .PHONY:
47 .DONTCARE:
48
49 # inference rules
50 .c.o:
51         $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
52 #-------------------------------------------------------------------------
53 all: Makefile bacula-dir
54         @echo "==== Make of dird is good ===="
55         @echo " "
56
57 bacula-dir:  $(SVROBJS) ../lib/libbac.a ../cats/libsql.a
58         $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ $(SVROBJS) \
59               -lsql $(LIBS) $(DLIB) -lbac -lm
60
61 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
62         cd $(topdir) \
63           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
64
65 clean:
66         @$(RMF) dird bacula-dir core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
67
68 realclean: clean
69         @$(RMF) tags bacula-dir.conf
70
71 distclean: realclean
72         if test $(srcdir) = .; then $(MAKE) realclean; fi
73         (cd $(srcdir); $(RMF) Makefile)
74
75 install: all
76         $(INSTALL_PROGRAM) bacula-dir $(DESTDIR)$(sbindir)/bacula-dir
77         @srcconf=bacula-dir.conf; \
78         if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
79            destconf=$$srcconf.new; \
80            echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
81         else \
82            destconf=$$srcconf; \
83         fi; \
84         echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
85         ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
86         @srcconf=query.sql; \
87         if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
88            destconf=$$srcconf.new; \
89            echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
90         else \
91            destconf=$$srcconf; \
92         fi; \
93         echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
94         ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
95
96
97 uninstall:
98         (cd $(DESTDIR)$(sbindir); $(RMF) bacula-dir)
99         (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-dir.conf)
100
101
102
103 # Semi-automatic generation of dependencies:
104 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
105 # and it also includes system headers.
106 # `semi'-automatic since dependencies are generated at distribution time.
107
108 depend:
109         @$(MV) Makefile Makefile.bak
110         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
111         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
112         @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
113         @if test -f Makefile ; then \
114             $(RMF) Makefile.bak; \
115         else \
116            $(MV) Makefile.bak Makefile; \
117            echo -e "Something went wrong\n\a"; \
118         fi
119
120 # -----------------------------------------------------------------------
121 # DO NOT DELETE: nice dependency list follows