]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/console/Makefile.in
This commit was manufactured by cvs2svn to create tag
[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 @CONS_SRC@ 
24 CONSOBJS = console.o console_conf.o authenticate.o @CONS_OBJ@
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 bconsole @STATIC_CONS@
42         @echo "==== Make of console is good ===="
43         @echo " "
44
45
46 bconsole: $(CONSOBJS) ../lib/libbac.a
47         $(CXX) $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
48               $(DLIB) $(CONS_LIBS) -lbac -lm $(LIBS) 
49
50 static-bconsole: $(CONSOBJS) ../lib/libbac.a
51         $(CXX) -static $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
52               $(DLIB) $(CONS_LIBS) -lbac -lm $(LIBS) 
53         strip $@
54
55
56 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
57         cd $(topdir) \
58           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
59
60 clean:
61         @$(RMF) console bconsole core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
62         @$(RMF) static-console static-bconsole gmon.out
63
64 realclean: clean
65         @$(RMF) tags console.conf bconsole.conf
66
67 distclean: realclean
68         if test $(srcdir) = .; then $(MAKE) realclean; fi
69         (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS)
70
71 devclean: realclean
72         if test $(srcdir) = .; then $(MAKE) realclean; fi
73         (cd $(srcdir); $(RMF) Makefile)
74
75 install: all
76         @if test -f ${DESTDIR}${sbindir}/console; then \
77            echo " "; \
78            echo "Warning!!!  ${DESTDIR}${sbindir}console found."; \
79            echo " console has been renamed bconsole, so console"; \
80            echo " is no longer used, and you might want to delete it."; \
81            echo " "; \
82         fi
83         $(INSTALL_PROGRAM) bconsole $(DESTDIR)$(sbindir)/bconsole
84         @srcconf=bconsole.conf; \
85         if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
86            destconf=$$srcconf.new; \
87            echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
88         else \
89            destconf=$$srcconf; \
90            if  test -f ${DESTDIR}${sysconfdir}/console.conf; then \
91               echo "Existing console.conf moved to bconsole.conf"; \
92               @$(MV) ${DESTDIR}${sysconfdir}/console.conf ${DESTDIR}${sysconfdir}/bconsole.conf; \
93               destconf=$$srcconf.new; \
94            fi; \
95         fi; \
96         echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
97         ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
98         if test -f static-bconsole; then \
99            $(INSTALL_PROGRAM) static-bconsole $(DESTDIR)$(sbindir)/static-bconsole; \
100         fi
101
102 uninstall:
103         (cd $(DESTDIR)$(sbindir); $(RMF) bconsole static-bconsole)
104         (cd $(DESTDIR)$(sysconfdir); $(RMF) console.conf bconsole.conf bconsole.conf.new)
105
106
107
108 # Semi-automatic generation of dependencies:
109 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
110 # and it also includes system headers.
111 # `semi'-automatic since dependencies are generated at distribution time.
112
113 depend:
114         @$(MV) Makefile Makefile.bak
115         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
116         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
117         @$(CC) -S -M $(CPPFLAGS) $(CONS_INC) -I$(srcdir) -I$(basedir) *.c >> Makefile
118         @if test -f Makefile ; then \
119             $(RMF) Makefile.bak; \
120         else \
121            $(MV) Makefile.bak Makefile; \
122            echo -e "Something went wrong\n\a"; \
123         fi
124
125 # -----------------------------------------------------------------------
126 # DO NOT DELETE: nice dependency list follows