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