]>
Commit | Line | Data |
---|---|---|
83c7f6a7 VS |
1 | <?xml version="1.0" ?> |
2 | <!-- $Id$ --> | |
3 | ||
4 | <!-- | |
5 | Presents for building wxWidgets applications using Autoconf or GNU toosets. | |
6 | See wx.bkl for platform-independent notes. | |
7 | ||
8 | Usage: | |
9 | Options WX_CPPFLAGS, WX_CFLAGS, WX_CXXFLAGS, WX_LIBS are defined. | |
9864ef3b | 10 | |
83c7f6a7 VS |
11 | |
12 | Format-specific notes: | |
13 | ||
14 | * autoconf: | |
15 | Beware that you have to use AM_OPTIONS_WXCONFIG and | |
16 | AM_PATH_WXCONFIG in your configure.in! | |
17 | ||
18 | --> | |
19 | ||
20 | ||
21 | <makefile> | |
22 | ||
23 | <!-- ============================================================== --> | |
24 | <!-- Autoconf --> | |
25 | <!-- ============================================================== --> | |
9864ef3b | 26 | |
83c7f6a7 VS |
27 | <if cond="FORMAT=='autoconf'"> |
28 | <!-- Autoconf backend is simplicity itself thanks to wx-config... --> | |
29 | <option name="WX_CFLAGS"/> | |
30 | <option name="WX_CXXFLAGS"/> | |
31 | <option name="WX_CPPFLAGS"/> | |
32 | <option name="WX_LIBS"/> | |
692ebda6 | 33 | <option name="WX_RESCOMP"/> |
83c7f6a7 | 34 | </if> |
9864ef3b | 35 | |
83c7f6a7 VS |
36 | <!-- ============================================================== --> |
37 | <!-- GNU makefiles for Unix --> | |
38 | <!-- ============================================================== --> | |
39 | ||
40 | <if cond="FORMAT=='gnu'"> | |
41 | <option name="WX_CONFIG"> | |
42 | <default-value>wx-config</default-value> | |
43 | <description>Location and arguments of wx-config script</description> | |
44 | </option> | |
45 | <option name="WX_CFLAGS"> | |
46 | <default-value>`$(DOLLAR)(WX_CONFIG) --cflags`</default-value> | |
47 | <description>C flags to use with wxWidgets code</description> | |
48 | </option> | |
49 | <option name="WX_CXXFLAGS"> | |
50 | <default-value>`$(DOLLAR)(WX_CONFIG) --cxxflags`</default-value> | |
51 | <description>C++ flags to use with wxWidgets code</description> | |
52 | </option> | |
53 | <option name="WX_CPPFLAGS"> | |
54 | <default-value>`$(DOLLAR)(WX_CONFIG) --cppflags`</default-value> | |
55 | <description>C preprocessor flags to use with wxWidgets code</description> | |
56 | </option> | |
57 | <option name="WX_LIBS"> | |
58 | <default-value>`$(DOLLAR)(WX_CONFIG) --libs`</default-value> | |
59 | <description>wxWidgets libraries to link against</description> | |
60 | </option> | |
692ebda6 JS |
61 | <option name="WX_RESCOMP"> |
62 | <default-value>`$(DOLLAR)(WX_CONFIG) --rescomp`</default-value> | |
63 | <description>wxWidgets resource compiler and flags</description> | |
64 | </option> | |
83c7f6a7 VS |
65 | |
66 | <!-- we need this but the trick used in default-values above | |
67 | prevents bakefile from detecting it: --> | |
68 | <set var="FORMAT_OUTPUT_VARIABLES" append="1">WX_CONFIG</set> | |
69 | </if> | |
9864ef3b | 70 | |
83c7f6a7 VS |
71 | <!-- ============================================================== --> |
72 | <!-- Common code --> | |
73 | <!-- ============================================================== --> | |
9864ef3b | 74 | |
83c7f6a7 VS |
75 | <if cond="FORMAT not in ['gnu','autoconf']"> |
76 | <error> | |
77 | Don't include presets/wx_unix.bkl directly, use presets/wx.bkl. | |
78 | </error> | |
79 | </if> | |
9864ef3b | 80 | |
692ebda6 JS |
81 | <!-- |
82 | We need to re-define the resource compiler, used by bakefile when compiling | |
83 | resources, to the resource compiler returned by 'wx-config --rescomp' since | |
84 | 'wx-config --rescomp' returns both the name of the resource compiler to use | |
85 | and the flags required for that compiler (rcflags are rccompiler-specific | |
86 | and thus it would be wrong to use them with other resource compilers). | |
87 | ||
88 | This line typically does something *only* when the Makefile.in generated | |
89 | using this bakefile, is used on Windows with MSYS (when using Cygwin, resources | |
90 | are not compiled at all). | |
91 | ||
92 | NOTE: overwriting the RESCOMP variable we modify the entire Bakefile behaviour | |
93 | for resource compilation; this could be a problem if the bakefile which | |
94 | includes this file needs the standard Bakefile resource compiler to | |
95 | build a non wx-based application. | |
96 | --> | |
97 | <set var="RESCOMP">$(WX_RESCOMP)</set> | |
98 | ||
c07e76fa | 99 | <template id="wx-lib"> |
83c7f6a7 VS |
100 | <cxxflags>$(WX_CXXFLAGS)</cxxflags> |
101 | <cflags>$(WX_CFLAGS)</cflags> | |
c07e76fa VS |
102 | </template> |
103 | ||
104 | <template id="wx" template="wx-lib"> | |
9864ef3b VZ |
105 | <!-- |
106 | Don't include the $(WX_LIBS) variable in linker options here since | |
107 | it would make impossible for the user to obtain the right library | |
108 | order when he needs to specify, *before* WX_LIBS, its own libraries | |
109 | that depend on wxWidgets libraries; to avoid this, we include | |
110 | $(WX_LIBS) as soon as we found the <wx-lib>base</wx-lib> tag which | |
111 | the user should always put *after* all other wx-dependent libraries | |
112 | --> | |
83c7f6a7 VS |
113 | </template> |
114 | ||
115 | <!-- not used together with wx-config: --> | |
9864ef3b VZ |
116 | <define-tag name="wx-lib" rules="exe,dll,module"> |
117 | <if cond="value=='base'"> | |
118 | <ldlibs>$(WX_LIBS)</ldlibs> | |
119 | </if> | |
120 | </define-tag> | |
83c7f6a7 VS |
121 | |
122 | </makefile> |