]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/Makefile.in
Debug levels + add bsr to bls
[bacula/bacula] / bacula / src / stored / Makefile.in
1 # $Id$
2 @MCOMMON@
3
4 srcdir =        .
5 VPATH =         .
6 .PATH:          .
7
8 # one up
9 basedir = ..
10 # top dir
11 topdir = ../..
12 # this dir relative to top dir
13 thisdir = src/stored
14
15 DEBUG=@DEBUG@
16
17 first_rule: all
18 dummy:
19
20 #
21 SVRSRCS = stored.c append.c askdir.c authenticate.c block.c dev.c \
22           device.c dircmd.c fd_cmds.c fdmsg.c job.c \
23           label.c match_bsr.c parse_bsr.c \
24           read.c record.c stored_conf.c 
25 SVROBJS = stored.o append.o askdir.o authenticate.o block.o dev.o \
26           device.o dircmd.o fd_cmds.o fdmsg.o job.o \
27           label.o match_bsr.o parse_bsr.o \
28           read.o record.o stored_conf.o 
29
30 # bpool is depricated
31 #POOLSRCS = bpool.c block.c dev.c device.c askdir.c label.c \
32 #           record.c stored_conf.c 
33 #POOLOBJS = bpool.o block.o dev.o device.o askdir.o label.o \
34 #           record.o stored_conf.o 
35
36 #
37 TAPESRCS = btape.c block.c dev.c device.c askdir.c label.c \
38            record.c stored_conf.c 
39 TAPEOBJS = btape.o block.o dev.o device.o askdir.o label.o \
40            record.o stored_conf.o 
41
42 BLSOBJS = bls.o block.o device.o dev.o label.o match_bsr.o \
43           parse_bsr.o record.o
44
45 BEXTOBJS = bextract.o block.o device.o dev.o label.o record.o \
46            match_bsr.o parse_bsr.o
47
48 SCNOBJS = bscan.o block.o device.o dev.o askdir.o label.o record.o
49
50
51
52 # it was ``be kind to gmake week''.  Now it's ``autoconf week''
53 #OBJS = $(SRCS:S,.c,.o,)
54 # these are the objects that are changed by the .configure process
55 EXTRAOBJS = @OBJLIST@
56
57 FDLIBS=@FDLIBS@
58
59
60 .SUFFIXES:      .c .o
61 .PHONY:
62 .DONTCARE:
63
64 # inference rules
65 .c.o:
66         $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
67 #-------------------------------------------------------------------------
68 all: Makefile bacula-sd bls bextract bscan btape 
69         @echo "===== Make of stored is good ===="
70         @echo " "
71
72 bacula-sd: $(SVROBJS) ../lib/libbac.a
73         $(CXX) $(LDFLAGS) -L../lib -o $@ $(SVROBJS) $(FDLIBS) -lbac -lm $(LIBS) $(DLIB)
74
75 #bpool:  $(POOLOBJS) ../lib/libbac.a ../cats/libsql.a
76 #        $(CXX) $(LDFLAGS) -L../lib -L../cats  -o $@ $(POOLOBJS) -lsql $(LIBS) $(DLIB) -lbac -lm
77
78 btape:  $(TAPEOBJS) ../lib/libbac.a ../cats/libsql.a
79         $(CXX) $(LDFLAGS) -L../lib -L../cats  -o $@ $(TAPEOBJS) -lsql $(LIBS) $(DLIB) -lbac -lm
80
81 bls:    ../findlib/libfind.a $(BLSOBJS) ../lib/libbac.a
82         $(CXX) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BLSOBJS) $(LIBS) $(DLIB) -lbac -lfind -lm
83
84 bextract: ../findlib/libfind.a $(BEXTOBJS) ../lib/libbac.a
85         $(CXX) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BEXTOBJS) $(LIBS) $(DLIB) $(FDLIBS) -lbac -lfind -lm
86
87 bscan: ../findlib/libfind.a $(SCNOBJS) ../cats/libsql.a
88         $(CXX) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SCNOBJS) -lsql $(LIBS) $(DB_LIBS) $(FDLIBS) -lbac -lfind -lm
89
90
91
92
93 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
94         cd $(topdir) \
95           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
96
97 install: all
98         $(INSTALL_PROGRAM) bacula-sd $(DESTDIR)$(sbindir)/bacula-sd
99         $(INSTALL_PROGRAM) bls $(DESTDIR)$(sbindir)/bls
100         $(INSTALL_PROGRAM) bextract $(DESTDIR)$(sbindir)/bextract
101 #       $(INSTALL_PROGRAM) bpool $(DESTDIR)$(sbindir)/bpool
102         $(INSTALL_PROGRAM) btape $(DESTDIR)$(sbindir)/btape
103         @srcconf=bacula-sd.conf; \
104         if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
105            destconf=$$srcconf.new; \
106            echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
107         else \
108            destconf=$$srcconf; \
109         fi; \
110         echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
111         ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
112
113 uninstall:
114         (cd $(DESTDIR)$(sbindir); $(RMF) bacula-sd)
115         (cd $(DESTDIR)$(sbindir); $(RMF) bls)
116         (cd $(DESTDIR)$(sbindir); $(RMF) bextract)
117 #       (cd $(DESTDIR)$(sbindir); $(RMF) bpool)
118         (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-sd.conf)
119
120
121 clean:
122         @$(RMF) bacula-sd stored bls bextract bpool btape shmfree core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
123         @$(RMF) bscan
124
125 realclean: clean
126         @$(RMF) tags bacula-sd.conf
127
128 distclean: realclean
129         if test $(srcdir) = .; then $(MAKE) realclean; fi
130         (cd $(srcdir); $(RMF) Makefile)
131
132
133 # Semi-automatic generation of dependencies:
134 # Use cc -M because X11 `makedepend' doesn't work on all systems
135 # and it also includes system headers.
136 # `semi'-automatic since dependencies are generated at distribution time.
137
138 depend:
139         @$(MV) Makefile Makefile.bak
140         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
141         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
142         @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
143         @if test -f Makefile ; then \
144             $(RMF) Makefile.bak; \
145         else \
146            $(MV) Makefile.bak Makefile; \
147            echo -e "Something went wrong with make depend\n\a"; \
148         fi
149
150 # -----------------------------------------------------------------------
151 # DO NOT DELETE: nice dependency list follows