12 # this dir relative to top dir
17 GETTEXT_LIBS = @LIBINTL@
19 OPENSSL_LIBS = @OPENSSL_LIBS@
20 OPENSSL_INC = @OPENSSL_INC@
26 SDOBJS = stored.o ansi_label.o \
27 autochanger.o acquire.o append.o \
28 askdir.o authenticate.o \
29 block.o butil.o dev.o \
30 device.o dircmd.o dvd.o ebcdic.o fd_cmds.o job.o \
31 label.o mac.o match_bsr.o mount.o parse_bsr.o \
32 pythonsd.o read.o read_record.o record.o \
34 spool.o status.o stored_conf.o wait.o
37 TAPEOBJS = btape.o block.o butil.o dev.o device.o label.o \
38 ansi_label.o dvd.o ebcdic.o \
39 autochanger.o acquire.o mount.o record.o read_record.o \
41 stored_conf.o match_bsr.o parse_bsr.o scan.o spool.o wait.o
44 BLSOBJS = bls.o block.o butil.o device.o dev.o label.o match_bsr.o \
45 ansi_label.o dvd.o ebcdic.o \
46 autochanger.o acquire.o mount.o parse_bsr.o record.o \
47 read_record.o reserve.o scan.o stored_conf.o spool.o wait.o
50 BEXTOBJS = bextract.o block.o device.o dev.o label.o record.o \
51 ansi_label.o dvd.o ebcdic.o \
52 autochanger.o acquire.o mount.o match_bsr.o parse_bsr.o butil.o \
53 pythonsd.o read_record.o reserve.o \
54 scan.o stored_conf.o spool.o wait.o
57 SCNOBJS = bscan.o block.o device.o dev.o label.o \
58 ansi_label.o dvd.o ebcdic.o \
59 autochanger.o acquire.o mount.o record.o match_bsr.o parse_bsr.o \
60 butil.o read_record.o scan.o reserve.o stored_conf.o spool.o wait.o
63 COPYOBJS = bcopy.o block.o device.o dev.o label.o \
64 ansi_label.o dvd.o ebcdic.o \
65 autochanger.o acquire.o mount.o record.o match_bsr.o parse_bsr.o \
66 butil.o read_record.o reserve.o \
67 scan.o stored_conf.o spool.o wait.o
71 # these are the objects that are changed by the .configure process
84 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(PYTHON_INC) $(OPENSSL_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
85 #-------------------------------------------------------------------------
87 all: Makefile bacula-sd @STATIC_SD@ bls bextract bscan btape bcopy
88 @echo "===== Make of stored is good ===="
91 bacula-sd: $(SDOBJS) ../lib/libbac.a
92 @echo "Linking $@ ..."
93 $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -o $@ $(SDOBJS) $(FDLIBS) \
94 -lbac -lm $(PYTHON_LIBS) $(DLIB) $(LIBS) $(WRAPLIBS) \
95 $(GETTEXT_LIBS) $(OPENSSL_LIBS)
97 static-bacula-sd: $(SDOBJS) ../lib/libbac.a
98 $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -o $@ $(SDOBJS) $(FDLIBS) \
99 -lbac -lm $(PYTHON_LIBS) $(DLIB) $(LIBS) $(WRAPLIBS) \
100 $(GETTEXT_LIBS) $(OPENSSL_LIBS)
105 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) \
106 -I$(basedir) $(OPENSSL_INC) $(DINCLUDE) $(CFLAGS) $<
108 btape: $(TAPEOBJS) ../lib/libbac.a ../cats/libsql.a
109 $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../cats -o $@ $(TAPEOBJS) \
110 -lsql $(DLIB) -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
114 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) \
115 -I$(basedir) $(OPENSSL_INC) $(DINCLUDE) $(CFLAGS) $<
117 bls: ../findlib/libfind.a $(BLSOBJS) ../lib/libbac.a
119 $(NO_ECHO)$(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BLSOBJS) $(DLIB) -lfind \
120 -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
122 bextract.o: bextract.c
124 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) \
125 -I$(basedir) $(OPENSSL_INC) $(DINCLUDE) $(CFLAGS) $<
127 bextract: ../findlib/libfind.a $(BEXTOBJS) ../lib/libbac.a
129 $(NO_ECHO)$(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BEXTOBJS) $(DLIB) $(FDLIBS) \
130 -lfind -lbac -lm $(PYTHON_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
134 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) \
135 -I$(basedir) $(OPENSSL_INC) $(DINCLUDE) $(CFLAGS) $<
137 bscan: ../findlib/libfind.a $(SCNOBJS) ../cats/libsql.a
138 $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SCNOBJS) \
139 -lsql $(DB_LIBS) $(FDLIBS) -lfind -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
143 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) \
144 -I$(basedir) $(OPENSSL_INC) $(DINCLUDE) $(CFLAGS) $<
146 bcopy: $(COPYOBJS) ../findlib/libfind.a ../lib/libbac.a
147 $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(COPYOBJS) \
148 $(DB_LIBS) $(FDLIBS) -lfind -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
151 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
153 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
156 $(INSTALL_PROGRAM) bacula-sd $(DESTDIR)$(sbindir)/bacula-sd
157 $(INSTALL_PROGRAM) bls $(DESTDIR)$(sbindir)/bls
158 $(INSTALL_PROGRAM) bextract $(DESTDIR)$(sbindir)/bextract
159 $(INSTALL_PROGRAM) bcopy $(DESTDIR)$(sbindir)/bcopy
160 $(INSTALL_PROGRAM) bscan $(DESTDIR)$(sbindir)/bscan
161 $(INSTALL_PROGRAM) btape $(DESTDIR)$(sbindir)/btape
162 @srcconf=bacula-sd.conf; \
163 if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
164 destconf=$$srcconf.new; \
165 echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
167 destconf=$$srcconf; \
169 echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
170 ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
171 @if test -f static-bacula-sd; then \
172 $(INSTALL_PROGRAM) static-bacula-sd $(DESTDIR)$(sbindir)/static-bacula-sd; \
176 (cd $(DESTDIR)$(sbindir); $(RMF) bacula-sd)
177 (cd $(DESTDIR)$(sbindir); $(RMF) bls)
178 (cd $(DESTDIR)$(sbindir); $(RMF) bextract)
179 (cd $(DESTDIR)$(sbindir); $(RMF) bcopy)
180 (cd $(DESTDIR)$(sbindir); $(RMF) bscan)
181 (cd $(DESTDIR)$(sbindir); $(RMF) btape)
182 (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-sd.conf bacula-sd.conf.new)
186 @$(RMF) bacula-sd stored bls bextract bpool btape shmfree core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
187 @$(RMF) bscan bcopy static-bacula-sd
190 @$(RMF) tags bacula-sd.conf
193 if test $(srcdir) = .; then $(MAKE) realclean; fi
194 (cd $(srcdir); $(RMF) Makefile)
197 if test $(srcdir) = .; then $(MAKE) realclean; fi
198 (cd $(srcdir); $(RMF) Makefile)
200 # Semi-automatic generation of dependencies:
201 # Use cc -M because X11 `makedepend' doesn't work on all systems
202 # and it also includes system headers.
203 # `semi'-automatic since dependencies are generated at distribution time.
206 @$(MV) Makefile Makefile.bak
207 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
208 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
209 @$(CXX) -S -M $(CPPFLAGS) $(XINC) $(PYTHON_INC) $(OPENSSL_INC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
210 @if test -f Makefile ; then \
211 $(RMF) Makefile.bak; \
213 $(MV) Makefile.bak Makefile; \
214 echo " ======= Something went wrong with make depend. ======="; \
217 # -----------------------------------------------------------------------
218 # DO NOT DELETE: nice dependency list follows