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