]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/wx-console/Makefile.in
install and uninstall targets added.
[bacula/bacula] / bacula / src / wx-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/wx-console
16
17 DEBUG=@DEBUG@
18
19 first_rule: all
20 dummy:
21
22 #
23 CONSSRCS = main.cpp console_thread.cpp authenticate.c console_conf.c wxbrestorepanel.cpp \
24              wxbmainframe.cpp wxbtableparser.cpp wxbtreectrl.cpp wxblistctrl.cpp wxbutils.cpp
25 CONSOBJS = main.o console_thread.o authenticate.o console_conf.o wxbrestorepanel.o \
26              wxbmainframe.o wxbtableparser.o wxbtreectrl.o wxblistctrl.o wxbutils.o
27
28 win32 = wx-console_private.res
29
30 WIN32RES = $(@WIN32@)
31
32 # these are the objects that are changed by the .configure process
33 EXTRAOBJS = @OBJLIST@
34
35 # wx-config generated by configure
36 CONS_CPPFLAGS=@WXCONS_CPPFLAGS@
37 CONS_LDFLAGS=@WXCONS_LDFLAGS@
38
39 .SUFFIXES:     .cpp .c .o
40 .PHONY:
41 .DONTCARE:
42
43 # inference rules
44 .c.o:
45         $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_CPPFLAGS) $(CONS_INC) -I$(srcdir) \
46            -I$(basedir) $(DINCLUDE) $(WCFLAGS) $(CFLAGS) $<
47
48 .cpp.o:
49         $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_CPPFLAGS) $(CONS_INC) -I$(srcdir) \
50            -I$(basedir) $(DINCLUDE) $(WCFLAGS) $(CFLAGS) $<
51
52
53 #-------------------------------------------------------------------------
54 all: Makefile wx-console
55         @echo "==== Make of wx-console is good ===="
56         @echo " "
57
58
59 wx-console: $(CONSOBJS) @WIN32@ ../lib/libbac.a
60         $(CXX) $(CONSOBJS) $(WIN32RES) -o $@ $(LIBS) -L../lib $(CONS_LDFLAGS) -lbac
61
62 win32: wx-console_private.res
63         
64
65 wx-console_private.res: wx-console_private.rc 
66         windres.exe -i wx-console_private.rc -I rc -o wx-console_private.res -O coff 
67
68 clean:
69         @$(RMF) $(CONSOBJS) wx-console $(WIN32RES)
70
71 distclean: clean
72         $(RMF) Makefile
73         $(RMF) -r CVS
74
75 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
76         cd $(topdir) \
77           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
78
79 install: all
80         $(INSTALL_PROGRAM) wx-console $(DESTDIR)$(sbindir)/wx-console
81         @srcconf=wx-console.conf; \
82         if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
83            destconf=$$srcconf.new; \
84            echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
85         else \
86            destconf=$$srcconf; \
87         fi; \
88         echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
89         ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
90
91 uninstall:
92         (cd $(DESTDIR)$(sbindir); $(RMF) wx-console)
93         (cd $(DESTDIR)$(sysconfdir); $(RMF) wx-console.conf wx-console.conf.new)
94
95 # Semi-automatic generation of dependencies:
96 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
97 # and it also includes system headers.
98 # `semi'-automatic since dependencies are generated at distribution time.
99
100 depend:
101         @$(MV) Makefile Makefile.bak
102         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
103         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
104         @$(CC) -S -M $(CPPFLAGS) $(CONS_CPPFLAGS) -I$(srcdir) -I$(basedir) $(CONSSRCS) >> Makefile
105         @if test -f Makefile ; then \
106             $(RMF) Makefile.bak; \
107         else \
108            $(MV) Makefile.bak Makefile; \
109            echo -e "Something went wrong\n\a"; \
110         fi
111
112 # -----------------------------------------------------------------------
113 # DO NOT DELETE: nice dependency list follows