12 # this dir relative to top dir
21 SVRSRCS = stored.c autochanger.c acquire.c append.c \
22 askdir.c authenticate.c \
23 block.c butil.c dev.c \
24 device.c dircmd.c fd_cmds.c job.c \
25 label.c match_bsr.c mount.c parse_bsr.c \
26 read.c read_record.c record.c \
27 spool.c status.c stored_conf.c
28 SVROBJS = stored.o autochanger.o acquire.o append.o \
29 askdir.o authenticate.o \
30 block.o butil.o dev.o \
31 device.o dircmd.o fd_cmds.o job.o \
32 label.o match_bsr.o mount.o parse_bsr.o \
33 read.o read_record.o record.o \
34 spool.o status.o stored_conf.o
37 TAPESRCS = btape.c block.c butil.c dev.c device.c label.c \
38 acquire.c mount.c record.c read_record.c \
39 stored_conf.c match_bsr.c parse_bsr.c spool.c
40 TAPEOBJS = btape.o block.o butil.o dev.o device.o label.o \
41 autochanger.o acquire.o mount.o record.o read_record.o \
42 stored_conf.o match_bsr.o parse_bsr.o spool.o
45 BLSOBJS = bls.o block.o butil.o device.o dev.o label.o match_bsr.o \
46 autochanger.o acquire.o mount.o parse_bsr.o record.o \
47 read_record.o stored_conf.o spool.o
50 BEXTOBJS = bextract.o block.o device.o dev.o label.o record.o \
51 autochanger.o acquire.o mount.o match_bsr.o parse_bsr.o butil.o \
52 read_record.o stored_conf.o spool.o
55 SCNOBJS = bscan.o block.o device.o dev.o label.o \
56 autochanger.o acquire.o mount.o record.o match_bsr.o parse_bsr.o \
57 butil.o read_record.o stored_conf.o spool.o
60 COPYOBJS = bcopy.o block.o device.o dev.o label.o \
61 autochanger.o acquire.o mount.o record.o match_bsr.o parse_bsr.o \
62 butil.o read_record.o stored_conf.o spool.o
66 # these are the objects that are changed by the .configure process
78 $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
79 #-------------------------------------------------------------------------
81 all: Makefile bacula-sd @STATIC_SD@ bls bextract bscan btape bcopy
82 @echo "===== Make of stored is good ===="
85 bacula-sd: $(SVROBJS) ../lib/libbac.a
86 $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -o $@ $(SVROBJS) $(FDLIBS) -lbac -lm $(LIBS) $(DLIB)
88 static-bacula-sd: $(SVROBJS) ../lib/libbac.a
89 $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -o $@ $(SVROBJS) $(FDLIBS) -lbac -lm $(LIBS) $(DLIB)
93 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
95 btape: $(TAPEOBJS) ../lib/libbac.a ../cats/libsql.a
96 $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../cats -o $@ $(TAPEOBJS) -lsql $(LIBS) $(DLIB) -lbac -lm
99 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
101 bls: ../findlib/libfind.a $(BLSOBJS) ../lib/libbac.a
102 $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BLSOBJS) $(LIBS) $(DLIB) -lfind -lbac -lm
104 bextract.o: bextract.c
105 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
107 bextract: ../findlib/libfind.a $(BEXTOBJS) ../lib/libbac.a
108 $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BEXTOBJS) $(LIBS) $(DLIB) $(FDLIBS) -lfind -lbac -lm
111 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
113 bscan: ../findlib/libfind.a $(SCNOBJS) ../cats/libsql.a
114 $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SCNOBJS) -lsql $(LIBS) $(DB_LIBS) $(FDLIBS) -lfind -lbac -lm
117 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
119 bcopy: $(COPYOBJS) ../findlib/libfind.a ../lib/libbac.a
120 $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(COPYOBJS) $(LIBS) $(DB_LIBS) $(FDLIBS) -lfind -lbac -lm
123 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
125 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
128 $(INSTALL_PROGRAM) bacula-sd $(DESTDIR)$(sbindir)/bacula-sd
129 $(INSTALL_PROGRAM) bls $(DESTDIR)$(sbindir)/bls
130 $(INSTALL_PROGRAM) bextract $(DESTDIR)$(sbindir)/bextract
131 $(INSTALL_PROGRAM) bcopy $(DESTDIR)$(sbindir)/bcopy
132 $(INSTALL_PROGRAM) bscan $(DESTDIR)$(sbindir)/bscan
133 $(INSTALL_PROGRAM) btape $(DESTDIR)$(sbindir)/btape
134 @srcconf=bacula-sd.conf; \
135 if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
136 destconf=$$srcconf.new; \
137 echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
139 destconf=$$srcconf; \
141 echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
142 ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
143 @if test -f static-bacula-sd; then \
144 $(INSTALL_PROGRAM) static-bacula-sd $(DESTDIR)$(sbindir)/static-bacula-sd; \
148 (cd $(DESTDIR)$(sbindir); $(RMF) bacula-sd)
149 (cd $(DESTDIR)$(sbindir); $(RMF) bls)
150 (cd $(DESTDIR)$(sbindir); $(RMF) bextract)
151 (cd $(DESTDIR)$(sbindir); $(RMF) bcopy)
152 (cd $(DESTDIR)$(sbindir); $(RMF) bscan)
153 (cd $(DESTDIR)$(sbindir); $(RMF) btape)
154 (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-sd.conf bacula-sd.conf.new)
158 @$(RMF) bacula-sd stored bls bextract bpool btape shmfree core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
159 @$(RMF) bscan bcopy static-bacula-sd
162 @$(RMF) tags bacula-sd.conf
165 if test $(srcdir) = .; then $(MAKE) realclean; fi
166 (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS)
169 if test $(srcdir) = .; then $(MAKE) realclean; fi
170 (cd $(srcdir); $(RMF) Makefile)
172 # Semi-automatic generation of dependencies:
173 # Use cc -M because X11 `makedepend' doesn't work on all systems
174 # and it also includes system headers.
175 # `semi'-automatic since dependencies are generated at distribution time.
178 @$(MV) Makefile Makefile.bak
179 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
180 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
181 @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
182 @if test -f Makefile ; then \
183 $(RMF) Makefile.bak; \
185 $(MV) Makefile.bak Makefile; \
186 echo -e "Something went wrong with make depend\n\a"; \
189 # -----------------------------------------------------------------------
190 # DO NOT DELETE: nice dependency list follows