12 # this dir relative to top dir
21 SVRSRCS = stored.c acquire.c append.c askdir.c authenticate.c \
23 device.c dircmd.c fd_cmds.c fdmsg.c job.c \
24 label.c match_bsr.c parse_bsr.c \
25 read.c record.c stored_conf.c mount.c
26 SVROBJS = stored.o acquire.o append.o askdir.o authenticate.o \
28 device.o dircmd.o fd_cmds.o fdmsg.o job.o \
29 label.o match_bsr.o mount.o parse_bsr.o \
30 read.o record.o stored_conf.o
33 TAPESRCS = btape.c block.c butil.c dev.c device.c label.c \
34 acquire.c mount.c record.c read_record.c \
35 stored_conf.c match_bsr.c parse_bsr.o
36 TAPEOBJS = btape.o block.o butil.o dev.o device.o label.o \
37 acquire.o mount.o record.o read_record.o \
38 stored_conf.o match_bsr.o parse_bsr.o
41 BLSOBJS = bls.o block.o butil.o device.o dev.o label.o match_bsr.o \
42 acquire.o mount.o parse_bsr.o record.o \
43 read_record.o stored_conf.o
46 BEXTOBJS = bextract.o block.o device.o dev.o label.o record.o \
47 acquire.o mount.o match_bsr.o parse_bsr.o butil.o \
48 read_record.o stored_conf.o
51 SCNOBJS = bscan.o block.o device.o dev.o label.o \
52 acquire.o mount.o record.o match_bsr.o parse_bsr.o \
53 butil.o read_record.o stored_conf.o
57 #POOLSRCS = bpool.c block.c dev.c device.c askdir.c label.c \
58 # record.c stored_conf.c
59 #POOLOBJS = bpool.o block.o dev.o device.o askdir.o label.o \
60 # record.o stored_conf.o
66 # these are the objects that are changed by the .configure process
78 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
79 #-------------------------------------------------------------------------
80 all: Makefile bacula-sd bls bextract bscan btape
81 @echo "===== Make of stored is good ===="
84 bacula-sd: $(SVROBJS) ../lib/libbac.a
85 $(CXX) $(LDFLAGS) -L../lib -o $@ $(SVROBJS) $(FDLIBS) -lbac -lm $(LIBS) $(DLIB)
87 #bpool: $(POOLOBJS) ../lib/libbac.a ../cats/libsql.a
88 # $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ $(POOLOBJS) -lsql $(LIBS) $(DLIB) -lbac -lm
90 btape: $(TAPEOBJS) ../lib/libbac.a ../cats/libsql.a
91 $(CXX) $(TTOOL_LDFLSGS) $(LDFLAGS) -L../lib -L../cats -o $@ $(TAPEOBJS) -lsql $(LIBS) $(DLIB) -lbac -lm
93 bls: ../findlib/libfind.a $(BLSOBJS) ../lib/libbac.a
94 $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BLSOBJS) $(LIBS) $(DLIB) -lfind -lbac -lm
96 bextract: ../findlib/libfind.a $(BEXTOBJS) ../lib/libbac.a
97 $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BEXTOBJS) $(LIBS) $(DLIB) $(FDLIBS) -lfind -lbac -lm
99 bscan: ../findlib/libfind.a $(SCNOBJS) ../cats/libsql.a
100 $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SCNOBJS) -lsql $(LIBS) $(DB_LIBS) $(FDLIBS) -lfind -lbac -lm
105 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
107 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
110 $(INSTALL_PROGRAM) bacula-sd $(DESTDIR)$(sbindir)/bacula-sd
111 $(INSTALL_PROGRAM) bls $(DESTDIR)$(sbindir)/bls
112 $(INSTALL_PROGRAM) bextract $(DESTDIR)$(sbindir)/bextract
113 # $(INSTALL_PROGRAM) bpool $(DESTDIR)$(sbindir)/bpool
114 $(INSTALL_PROGRAM) btape $(DESTDIR)$(sbindir)/btape
115 @srcconf=bacula-sd.conf; \
116 if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
117 destconf=$$srcconf.new; \
118 echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
120 destconf=$$srcconf; \
122 echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
123 ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
126 (cd $(DESTDIR)$(sbindir); $(RMF) bacula-sd)
127 (cd $(DESTDIR)$(sbindir); $(RMF) bls)
128 (cd $(DESTDIR)$(sbindir); $(RMF) bextract)
129 # (cd $(DESTDIR)$(sbindir); $(RMF) bpool)
130 (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-sd.conf)
134 @$(RMF) bacula-sd stored bls bextract bpool btape shmfree core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
138 @$(RMF) tags bacula-sd.conf
141 if test $(srcdir) = .; then $(MAKE) realclean; fi
142 (cd $(srcdir); $(RMF) Makefile)
145 # Semi-automatic generation of dependencies:
146 # Use cc -M because X11 `makedepend' doesn't work on all systems
147 # and it also includes system headers.
148 # `semi'-automatic since dependencies are generated at distribution time.
151 @$(MV) Makefile Makefile.bak
152 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
153 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
154 @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
155 @if test -f Makefile ; then \
156 $(RMF) Makefile.bak; \
158 $(MV) Makefile.bak Makefile; \
159 echo -e "Something went wrong with make depend\n\a"; \
162 # -----------------------------------------------------------------------
163 # DO NOT DELETE: nice dependency list follows