]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/tools/Makefile.in
This commit was manufactured by cvs2svn to create tag
[bacula/bacula] / bacula / src / tools / Makefile.in
1 #
2 # Bacula Tools Makefile
3 #
4 # Version $Id$
5 #
6 @MCOMMON@
7
8 srcdir =        .
9 VPATH =         .
10 .PATH:          .
11
12 # one up
13 basedir = ..
14 # top dir
15 topdir = ../..
16 # this dir relative to top dir
17 thisdir = src/tools
18
19 DEBUG=@DEBUG@
20
21 first_rule: all
22 dummy:
23
24 #
25
26 FINDOBJS = testfind.o
27
28 # these are the objects that are changed by the .configure process
29 EXTRAOBJS = @OBJLIST@
30
31 DIRCONFOBJS = ../dird/dird_conf.o ../dird/run_conf.o ../dird/inc_conf.o
32
33 .SUFFIXES:      .c .o
34 .PHONY:
35 .DONTCARE:
36
37 # inference rules
38 .c.o:
39         $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
40 #-------------------------------------------------------------------------
41 all: Makefile bsmtp dbcheck fstype testfind testls 
42         @echo "==== Make of tools is good ===="
43         @echo " "
44
45 bsmtp:  bsmtp.o ../lib/libbac.a        
46         $(CXX) $(LDFLAGS) -L../lib -o $@ bsmtp.o -lbac -lm $(DLIB) $(LIBS) 
47
48 dbcheck: dbcheck.o ../lib/libbac.a ../cats/libsql.a $(DIRCONFOBJS)
49         $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ dbcheck.o $(DIRCONFOBJS) -lsql -lbac -lm $(DB_LIBS) $(LIBS) 
50
51 fstype: fstype.o ../lib/libbac.a ../findlib/libfind.a
52         $(CXX) $(LDFLAGS) -L../lib -L../findlib -o $@ fstype.o -lfind -lbac -lm $(DLIB) $(LIBS) 
53
54 testfind: ../findlib/libfind.a ../lib/libbac.a $(FINDOBJS)
55         $(CXX) -g $(LDFLAGS) -L. -L../lib -L../findlib -o $@ $(FINDOBJS) \
56           $(DLIB) -lfind -lbac -lm $(LIBS) 
57
58 testls: ../findlib/libfind.a ../lib/libbac.a testls.o
59         $(CXX) -g $(LDFLAGS) -L. -L../lib -L../findlib -o $@ testls.o \
60           $(DLIB) -lfind -lbac -lm $(LIBS) 
61
62 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
63         cd $(topdir) \
64           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
65
66 clean:
67         @$(RMF) bsmtp core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
68         @$(RMF) testfind dbcheck testls fstype
69
70 realclean: clean
71         @$(RMF) tags
72
73 distclean: realclean
74         if test $(srcdir) = .; then $(MAKE) realclean; fi
75         (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS)
76
77 devclean: realclean
78         if test $(srcdir) = .; then $(MAKE) realclean; fi
79         (cd $(srcdir); $(RMF) Makefile)
80
81 # Allow non-root execution of bsmtp for non-root Directors
82 install: bsmtp
83         $(INSTALL_PROGRAM) bsmtp $(DESTDIR)$(sbindir)/bsmtp      
84         chmod 755 $(DESTDIR)$(sbindir)/bsmtp
85         $(INSTALL_PROGRAM) dbcheck $(DESTDIR)$(sbindir)/dbcheck      
86
87 uninstall:
88         (cd $(DESTDIR)$(sbindir); $(RMF) bsmtp)
89         (cd $(DESTDIR)$(sbindir); $(RMF) dbcheck)
90
91
92
93 # Semi-automatic generation of dependencies:
94 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
95 # and it also includes system headers.
96 # `semi'-automatic since dependencies are generated at distribution time.
97
98 depend:
99         @$(MV) Makefile Makefile.bak
100         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
101         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
102         @$(CXX) -S -M $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
103         @if test -f Makefile ; then \
104             $(RMF) Makefile.bak; \
105         else \
106            $(MV) Makefile.bak Makefile; \
107            echo -e "Something went wrong\n\a"; \
108         fi
109
110 # -----------------------------------------------------------------------
111 # DO NOT DELETE: nice dependency list follows