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