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