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