]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/wx-console/Makefile.in
Make name more discriptive
[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              wxbconfigpanel.cpp wxbconfigfileeditor.cpp wxbhistorytextctrl.cpp
26 CONSOBJS = main.o console_thread.o authenticate.o console_conf.o wxbrestorepanel.o \
27              wxbmainframe.o wxbtableparser.o wxbtreectrl.o wxblistctrl.o wxbutils.o \
28              wxbconfigpanel.o wxbconfigfileeditor.o wxbhistorytextctrl.o
29
30 win32 = bwx-console_private.res
31
32 WIN32RES = $(@WIN32@)
33
34 macosx = bwx-console.app
35
36 MACOSXAPP = $(@MACOSX@)
37
38 # these are the objects that are changed by the .configure process
39 EXTRAOBJS = @OBJLIST@
40
41 macosx_cppflags = -DHAVE_MACOSX -DNO_GCC_PRAGMA
42
43 _cppflags = 
44
45 # wx-config generated by configure
46 CONS_CPPFLAGS=-DHAVE_WXCONSOLE @WXCONS_CPPFLAGS@ $(@MACOSX@_cppflags)
47 CONS_LDFLAGS=@WXCONS_LDFLAGS@
48 OPENSSL_INC = @OPENSSL_INC@
49 OPENSSL_LIBS = @OPENSSL_LIBS@
50
51
52 .SUFFIXES:     .cpp .c .o
53 .PHONY:
54 .DONTCARE:
55
56 # inference rules
57 .c.o:
58         @echo "Compiling $<"
59         $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_CPPFLAGS) $(CONS_INC) \
60  $(OPENSSL_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(WCFLAGS) $(CFLAGS) $<
61
62 .cpp.o:
63         @echo "Compiling $<"
64         $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(CONS_CPPFLAGS) $(CONS_INC) \
65  $(OPENSSL_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(WCFLAGS) $(CFLAGS) $<
66
67
68 #-------------------------------------------------------------------------
69 all: Makefile bwx-console $(MACOSXAPP)
70         @echo "==== Make of wx-console is good ===="
71         @echo " "
72
73 # Mac OS X application bundle
74 # See http://216.239.59.104/search?q=cache:a61SGKgoHSQJ:wiki.wxwidgets.org/wiki.pl%3FWxMac_Issues+wxmac+%22application+bundle%22&hl=fr
75
76 bwx-console.app: bwx-console
77         -mkdir bwx-console.app    
78         -mkdir bwx-console.app/Contents
79         -mkdir bwx-console.app/Contents/MacOS
80         -mkdir bwx-console.app/Contents/Resources
81         -mkdir bwx-console.app/Contents/Resources/English.lproj
82         echo -n 'APPL????' > bwx-console.app/Contents/PkgInfo
83         mv bwx-console bwx-console.app/Contents/MacOS/bwx-console
84         cp bwx-console.conf /Library/Preferences/org.bacula.wxconsole.conf
85
86 bwx-console: $(CONSOBJS) @WIN32@ ../lib/libbac.a
87         $(CXX) $(CONSOBJS) $(WIN32RES) -o $@ $(LIBS) -L../lib $(CONS_LDFLAGS) \
88  -lbac $(OPENSSL_LIBS)
89
90 win32: bwx-console_private.res
91         
92
93 bwx-console_private.res: bwx-console_private.rc 
94         windres.exe -i bwx-console_private.rc -I rc -o bwx-console_private.res -O coff 
95
96 clean:
97         @$(RMF) $(CONSOBJS) bwx-console $(WIN32RES)
98
99 distclean: clean
100         $(RMF) Makefile
101
102 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
103         cd $(topdir) \
104           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
105
106 install: all
107         @if test -f ${DESTDIR}${sbindir}/wx-console; then \
108            echo " "; \
109            echo "Warning!!!  ${DESTDIR}${sbindir}wx-console found."; \
110            echo " wx-console has been renamed bwx-console, so wx-console"; \
111            echo " is no longer used, and you might want to delete it."; \
112            echo " "; \
113         fi
114         $(INSTALL_PROGRAM) bwx-console $(DESTDIR)$(sbindir)/bwx-console
115         @srcconf=bwx-console.conf; \
116         if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
117            destconf=$$srcconf.new; \
118            echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
119         else \
120            destconf=$$srcconf; \
121         fi; \
122         echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
123         ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
124
125 uninstall:
126         (cd $(DESTDIR)$(sbindir); $(RMF) bwx-console)
127         (cd $(DESTDIR)$(sysconfdir); $(RMF) bwx-console.conf bwx-console.conf.new)
128
129 # Semi-automatic generation of dependencies:
130 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
131 # and it also includes system headers.
132 # `semi'-automatic since dependencies are generated at distribution time.
133
134 depend:
135         @$(MV) Makefile Makefile.bak
136         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
137         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
138         @$(CXX) -S -M $(CPPFLAGS) $(CONS_CPPFLAGS) -I$(srcdir) -I$(basedir) $(CONSSRCS) >> Makefile
139         @if test -f Makefile ; then \
140             $(RMF) Makefile.bak; \
141         else \
142            $(MV) Makefile.bak Makefile; \
143            echo " ===== Something went wrong in make depend ====="; \
144         fi
145
146 # -----------------------------------------------------------------------
147 # DO NOT DELETE: nice dependency list follows