]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/tools/Makefile.in
Home page change. Tweak to Win32 Backup API
[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 smtp dbcheck testfind testls
40         @echo "==== Make of tools is good ===="
41         @echo " "
42
43 smtp:   smtp.o ../lib/libbac.a        
44         $(CXX) $(LDFLAGS) -L../lib -o $@ smtp.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  
58
59 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
60         cd $(topdir) \
61           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
62
63 clean:
64         @$(RMF) smtp core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
65         @$(RMF) testfind dbcheck testls
66
67 realclean: clean
68         @$(RMF) tags
69
70 distclean: realclean
71         if test $(srcdir) = .; then $(MAKE) realclean; fi
72         (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS)
73
74 install: smtp
75         $(INSTALL_PROGRAM) smtp $(DESTDIR)$(sbindir)/smtp      
76         $(INSTALL_PROGRAM) dbcheck $(DESTDIR)$(sbindir)/dbcheck      
77
78 uninstall:
79         (cd $(DESTDIR)$(sbindir); $(RMF) smtp)
80
81
82
83 # Semi-automatic generation of dependencies:
84 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
85 # and it also includes system headers.
86 # `semi'-automatic since dependencies are generated at distribution time.
87
88 depend:
89         @$(MV) Makefile Makefile.bak
90         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
91         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
92         @$(CC) -S -M $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
93         @if test -f Makefile ; then \
94             $(RMF) Makefile.bak; \
95         else \
96            $(MV) Makefile.bak Makefile; \
97            echo -e "Something went wrong\n\a"; \
98         fi
99
100 # -----------------------------------------------------------------------
101 # DO NOT DELETE: nice dependency list follows