]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/tray-monitor/Makefile.in
Fix possible seg fault if SQL error.
[bacula/bacula] / bacula / src / tray-monitor / 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/tray-monitor
16
17 DEBUG=@DEBUG@
18
19 first_rule: all
20 dummy:
21
22 #
23 MONITORSRCS = tray-monitor.c tray_conf.c authenticate.c
24 MONITOROBJS = tray-monitor.o tray_conf.o authenticate.o
25
26 # these are the objects that are changed by the .configure process
27 EXTRAOBJS = @OBJLIST@
28
29 MONITOR_CPPFLAGS=@TRAY_MONITOR_CPPFLAGS@
30 MONITOR_LDFLAGS=@TRAY_MONITOR_LDFLAGS@ @X_LIBS@ -lX11
31
32 .SUFFIXES:      .c .o
33 .PHONY:
34 .DONTCARE:
35
36 # inference rules
37 .c.o:
38         @echo "Compiling $<"
39         $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(MONITOR_CPPFLAGS) \
40  -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
41 #-------------------------------------------------------------------------
42 all: Makefile bacula-tray-monitor
43         @echo "==== Make of bacula-tray-monitor is good ===="
44         @echo " "
45
46 bacula-tray-monitor: $(MONITOROBJS) ../lib/libbac.a
47         $(CXX) $(LDFLAGS) $(MONITOR_LDFLAGS) -L../lib -L../cats -o $@ \
48  $(MONITOROBJS) $(DLIB) -lbac -lm $(LIBS) $(OPENSSL_LIBS)
49
50
51 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
52         cd $(topdir) \
53           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
54
55 clean:
56         @$(RMF) bacula-tray-monitor core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
57
58 realclean: clean
59         @$(RMF) tags tray-monitor.conf
60
61 distclean: realclean
62         if test $(srcdir) = .; then $(MAKE) realclean; fi
63         (cd $(srcdir); $(RMF) Makefile)
64
65 devclean: realclean
66         if test $(srcdir) = .; then $(MAKE) realclean; fi
67         (cd $(srcdir); $(RMF) Makefile)
68
69 install: all
70         $(INSTALL_PROGRAM) bacula-tray-monitor $(DESTDIR)$(sbindir)/bacula-tray-monitor
71         @srcconf=tray-monitor.conf; \
72         if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
73            destconf=$$srcconf.new; \
74            echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
75         else \
76            destconf=$$srcconf; \
77         fi; \
78         echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
79         ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
80
81 uninstall:
82         (cd $(DESTDIR)$(sbindir); $(RMF) bacula-tray-monitor)
83         (cd $(DESTDIR)$(sysconfdir); $(RMF) tray-monitor.conf)
84
85
86
87 # Semi-automatic generation of dependencies:
88 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
89 # and it also includes system headers.
90 # `semi'-automatic since dependencies are generated at distribution time.
91
92 depend:
93         @$(MV) Makefile Makefile.bak
94         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
95         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
96         @$(CXX) -S -M $(CPPFLAGS) $(MONITOR_CPPFLAGS) -I$(srcdir) -I$(basedir) *.c >> Makefile
97         @if test -f Makefile ; then \
98             $(RMF) Makefile.bak; \
99         else \
100            $(MV) Makefile.bak Makefile; \
101            echo -e "Something went wrong\n\a"; \
102         fi
103
104 # -----------------------------------------------------------------------
105 # DO NOT DELETE: nice dependency list follows