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