first_rule: all
dummy:
-#
-SVRSRCS = stored.c append.c askdir.c authenticate.c block.c dev.c \
+# bacula-sd
+SVRSRCS = stored.c acquire.c append.c askdir.c authenticate.c \
+ block.c dev.c \
device.c dircmd.c fd_cmds.c fdmsg.c job.c \
label.c match_bsr.c parse_bsr.c \
- read.c record.c stored_conf.c
-SVROBJS = stored.o append.o askdir.o authenticate.o block.o dev.o \
+ read.c record.c stored_conf.c mount.c
+SVROBJS = stored.o acquire.o append.o askdir.o authenticate.o \
+ block.o dev.o \
device.o dircmd.o fd_cmds.o fdmsg.o job.o \
- label.o match_bsr.o parse_bsr.o \
- read.o record.o stored_conf.o
-
-# bpool is depricated
-#POOLSRCS = bpool.c block.c dev.c device.c askdir.c label.c \
-# record.c stored_conf.c
-#POOLOBJS = bpool.o block.o dev.o device.o askdir.o label.o \
-# record.o stored_conf.o
-
-#
-TAPESRCS = btape.c block.c dev.c device.c askdir.c label.c \
- record.c stored_conf.c
-TAPEOBJS = btape.o block.o dev.o device.o askdir.o label.o \
- record.o stored_conf.o
-
-BLSOBJS = bls.o block.o device.o dev.o label.o record.o
-
+ label.o match_bsr.o mount.o parse_bsr.o \
+ read.o record.o stored_conf.o
+
+# btape
+TAPESRCS = btape.c block.c butil.c dev.c device.c label.c \
+ acquire.c mount.c record.c read_record.c \
+ stored_conf.c match_bsr.c parse_bsr.o
+TAPEOBJS = btape.o block.o butil.o dev.o device.o label.o \
+ acquire.o mount.o record.o read_record.o \
+ stored_conf.o match_bsr.o parse_bsr.o
+
+# bls
+BLSOBJS = bls.o block.o butil.o device.o dev.o label.o match_bsr.o \
+ acquire.o mount.o parse_bsr.o record.o \
+ read_record.o stored_conf.o
+
+# bextract
BEXTOBJS = bextract.o block.o device.o dev.o label.o record.o \
- match_bsr.o parse_bsr.o
+ acquire.o mount.o match_bsr.o parse_bsr.o butil.o \
+ read_record.o stored_conf.o
-SCNOBJS = bscan.o block.o device.o dev.o askdir.o label.o record.o
+# bscan
+SCNOBJS = bscan.o block.o device.o dev.o label.o \
+ acquire.o mount.o record.o match_bsr.o parse_bsr.o \
+ butil.o read_record.o stored_conf.o
+
+# bcopy
+COPYOBJS = bcopy.o block.o device.o dev.o label.o \
+ acquire.o mount.o record.o match_bsr.o parse_bsr.o \
+ butil.o read_record.o stored_conf.o
-# it was ``be kind to gmake week''. Now it's ``autoconf week''
-#OBJS = $(SRCS:S,.c,.o,)
# these are the objects that are changed by the .configure process
EXTRAOBJS = @OBJLIST@
.c.o:
$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
#-------------------------------------------------------------------------
-all: Makefile bacula-sd bls bextract bscan btape
+
+all: Makefile bacula-sd @STATIC_SD@ bls bextract bscan btape bcopy
@echo "===== Make of stored is good ===="
@echo " "
bacula-sd: $(SVROBJS) ../lib/libbac.a
$(CXX) $(LDFLAGS) -L../lib -o $@ $(SVROBJS) $(FDLIBS) -lbac -lm $(LIBS) $(DLIB)
-#bpool: $(POOLOBJS) ../lib/libbac.a ../cats/libsql.a
-# $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ $(POOLOBJS) -lsql $(LIBS) $(DLIB) -lbac -lm
+static-bacula-sd: $(SVROBJS) ../lib/libbac.a
+ $(CXX) $(LDFLAGS) -static -L../lib -o $@ $(SVROBJS) $(FDLIBS) -lbac -lm $(LIBS) $(DLIB)
+ strip $@
btape: $(TAPEOBJS) ../lib/libbac.a ../cats/libsql.a
- $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ $(TAPEOBJS) -lsql $(LIBS) $(DLIB) -lbac -lm
+ $(CXX) $(TTOOL_LDFLSGS) $(LDFLAGS) -L../lib -L../cats -o $@ $(TAPEOBJS) -lsql $(LIBS) $(DLIB) -lbac -lm
bls: ../findlib/libfind.a $(BLSOBJS) ../lib/libbac.a
- $(CXX) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BLSOBJS) $(LIBS) $(DLIB) -lbac -lfind -lm
+ $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BLSOBJS) $(LIBS) $(DLIB) -lfind -lbac -lm
bextract: ../findlib/libfind.a $(BEXTOBJS) ../lib/libbac.a
- $(CXX) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BEXTOBJS) $(LIBS) $(DLIB) $(FDLIBS) -lbac -lfind -lm
-
-bscan: ../findlib/libfind.a $(SCNOBJS) ../cats/libsql.a
- $(CXX) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SCNOBJS) -lsql $(LIBS) $(DB_LIBS) $(FDLIBS) -lbac -lfind -lm
+ $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BEXTOBJS) $(LIBS) $(DLIB) $(FDLIBS) -lfind -lbac -lm
+bscan: ../findlib/libfind.a $(SCNOBJS) ../cats/libsql.a
+ $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SCNOBJS) -lsql $(LIBS) $(DB_LIBS) $(FDLIBS) -lfind -lbac -lm
+bcopy: $(COPYOBJS) ../findlib/libfind.a ../lib/libbac.a
+ $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(COPYOBJS) $(LIBS) $(DB_LIBS) $(FDLIBS) -lfind -lbac -lm
Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
$(INSTALL_PROGRAM) bacula-sd $(DESTDIR)$(sbindir)/bacula-sd
$(INSTALL_PROGRAM) bls $(DESTDIR)$(sbindir)/bls
$(INSTALL_PROGRAM) bextract $(DESTDIR)$(sbindir)/bextract
-# $(INSTALL_PROGRAM) bpool $(DESTDIR)$(sbindir)/bpool
+# $(INSTALL_PROGRAM) bcopy $(DESTDIR)$(sbindir)/bcopy
+ $(INSTALL_PROGRAM) bscan $(DESTDIR)$(sbindir)/bscan
$(INSTALL_PROGRAM) btape $(DESTDIR)$(sbindir)/btape
@srcconf=bacula-sd.conf; \
if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
(cd $(DESTDIR)$(sbindir); $(RMF) bacula-sd)
(cd $(DESTDIR)$(sbindir); $(RMF) bls)
(cd $(DESTDIR)$(sbindir); $(RMF) bextract)
-# (cd $(DESTDIR)$(sbindir); $(RMF) bpool)
+ (cd $(DESTDIR)$(sbindir); $(RMF) bcopy)
+ (cd $(DESTDIR)$(sbindir); $(RMF) bscan)
+ (cd $(DESTDIR)$(sbindir); $(RMF) btape)
(cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-sd.conf)
clean:
@$(RMF) bacula-sd stored bls bextract bpool btape shmfree core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
- @$(RMF) bscan
+ @$(RMF) bscan bcopy static-bacula-sd
realclean: clean
@$(RMF) tags bacula-sd.conf
distclean: realclean
if test $(srcdir) = .; then $(MAKE) realclean; fi
- (cd $(srcdir); $(RMF) Makefile)
+ (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS)
# Semi-automatic generation of dependencies: