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