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