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