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