]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/console/Makefile.in
5f0f1438bcfc9c0c6ef0f5b775659897a5a49da7
[bacula/bacula] / bacula / src / console / Makefile.in
1 #
2 #  Version $Id$
3 #
4 @MCOMMON@
5
6 srcdir =        .
7 VPATH =         .
8 .PATH:          .
9
10 # one up
11 basedir = ..
12 # top dir
13 topdir = ../..
14 # this dir relative to top dir
15 thisdir = src/console
16
17 DEBUG=@DEBUG@
18
19 first_rule: all
20 dummy:
21
22 #
23 CONSSRCS = console.c console_conf.c authenticate.c
24 CONSOBJS = console.o console_conf.o authenticate.o
25
26 # these are the objects that are changed by the .configure process
27 EXTRAOBJS = @OBJLIST@
28
29 CONS_INC=@CONS_INC@
30 CONS_LIBS=@CONS_LIBS@
31 CONS_LDFLAGS=@CONS_LDFLAGS@
32
33 .SUFFIXES:      .c .o
34 .PHONY:
35 .DONTCARE:
36
37 # inference rules
38 .c.o:
39         $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
40 #-------------------------------------------------------------------------
41 all: Makefile console
42         @echo "==== Make of console is good ===="
43         @echo " "
44
45
46 console: $(CONSOBJS) ../lib/libbac.a ../cats/libsql.a
47         $(CXX) $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
48               $(LIBS) $(DLIB) $(CONS_LIBS) -lbac -lsql -lm
49
50 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
51         cd $(topdir) \
52           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
53
54 clean:
55         $(RMF) console core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
56
57 realclean: clean
58         $(RMF) tags console.conf
59
60 distclean: realclean
61         if test $(srcdir) = .; then $(MAKE) realclean; fi
62         (cd $(srcdir); $(RMF) Makefile)
63
64 install: all
65         $(INSTALL_SCRIPT) console $(DESTDIR)$(sbindir)/console
66         @srcconf=console.conf; \
67         if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
68            destconf=$$srcconf.new; \
69            echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
70         else \
71            destconf=$$srcconf; \
72         fi; \
73         echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
74         ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
75
76 uninstall:
77         (cd $(DESTDIR)$(sbindir); $(RMF) console)
78         (cd $(DESTDIR)$(sysconfdir); $(RMF) console.conf
79
80
81
82 # Semi-automatic generation of dependencies:
83 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
84 # and it also includes system headers.
85 # `semi'-automatic since dependencies are generated at distribution time.
86
87 depend:
88         @$(MV) Makefile Makefile.bak
89         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
90         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
91         @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
92         @if test -f Makefile ; then \
93             $(RMF) Makefile.bak; \
94         else \
95            $(MV) Makefile.bak Makefile; \
96            echo -e "Something went wrong\n\a"; \
97         fi
98
99 # -----------------------------------------------------------------------
100 # DO NOT DELETE: nice dependency list follows