]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/Makefile.in
First cut 1.27 see kes23Oct02
[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 # bacula-sd
21 SVRSRCS = stored.c acquire.c append.c askdir.c authenticate.c \
22           block.c dev.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 \
27           block.o dev.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
31
32 # btape
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
39
40 # bls
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
44
45 # bextract
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
49
50 # bscan
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
54
55
56 # bpool is deprecated
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 
61
62
63
64
65
66 # these are the objects that are changed by the .configure process
67 EXTRAOBJS = @OBJLIST@
68
69 FDLIBS=@FDLIBS@
70
71
72 .SUFFIXES:      .c .o
73 .PHONY:
74 .DONTCARE:
75
76 # inference rules
77 .c.o:
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 ===="
82         @echo " "
83
84 bacula-sd: $(SVROBJS) ../lib/libbac.a
85         $(CXX) $(LDFLAGS) -L../lib -o $@ $(SVROBJS) $(FDLIBS) -lbac -lm $(LIBS) $(DLIB)
86
87 #bpool:  $(POOLOBJS) ../lib/libbac.a ../cats/libsql.a
88 #        $(CXX) $(LDFLAGS) -L../lib -L../cats  -o $@ $(POOLOBJS) -lsql $(LIBS) $(DLIB) -lbac -lm
89
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
92
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
95
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
98
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
101
102
103
104
105 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
106         cd $(topdir) \
107           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
108
109 install: all
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"; \
119         else \
120            destconf=$$srcconf; \
121         fi; \
122         echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
123         ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
124
125 uninstall:
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)
131
132
133 clean:
134         @$(RMF) bacula-sd stored bls bextract bpool btape shmfree core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
135         @$(RMF) bscan
136
137 realclean: clean
138         @$(RMF) tags bacula-sd.conf
139
140 distclean: realclean
141         if test $(srcdir) = .; then $(MAKE) realclean; fi
142         (cd $(srcdir); $(RMF) Makefile)
143
144
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.
149
150 depend:
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; \
157         else \
158            $(MV) Makefile.bak Makefile; \
159            echo -e "Something went wrong with make depend\n\a"; \
160         fi
161
162 # -----------------------------------------------------------------------
163 # DO NOT DELETE: nice dependency list follows