]> git.saurik.com Git - wxWidgets.git/blame - build/bakefiles/wxpresets/presets/wx_unix.bkl
added support for AUI library
[wxWidgets.git] / build / bakefiles / wxpresets / presets / wx_unix.bkl
CommitLineData
83c7f6a7
VS
1<?xml version="1.0" ?>
2<!-- $Id$ -->
3
4<!--
5Presents for building wxWidgets applications using Autoconf or GNU toosets.
6See wx.bkl for platform-independent notes.
7
8Usage:
9 Options WX_CPPFLAGS, WX_CFLAGS, WX_CXXFLAGS, WX_LIBS are defined.
9864ef3b 10
83c7f6a7
VS
11
12Format-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'">
369e0d05 41 <set var="WX_CONFIG_DEFAULT" overwrite="0">wx-config</set>
83c7f6a7 42 <option name="WX_CONFIG">
369e0d05 43 <default-value>$(WX_CONFIG_DEFAULT)</default-value>
83c7f6a7
VS
44 <description>Location and arguments of wx-config script</description>
45 </option>
46 <option name="WX_CFLAGS">
47 <default-value>`$(DOLLAR)(WX_CONFIG) --cflags`</default-value>
48 <description>C flags to use with wxWidgets code</description>
49 </option>
50 <option name="WX_CXXFLAGS">
51 <default-value>`$(DOLLAR)(WX_CONFIG) --cxxflags`</default-value>
52 <description>C++ flags to use with wxWidgets code</description>
53 </option>
54 <option name="WX_CPPFLAGS">
55 <default-value>`$(DOLLAR)(WX_CONFIG) --cppflags`</default-value>
56 <description>C preprocessor flags to use with wxWidgets code</description>
57 </option>
692ebda6
JS
58 <option name="WX_RESCOMP">
59 <default-value>`$(DOLLAR)(WX_CONFIG) --rescomp`</default-value>
60 <description>wxWidgets resource compiler and flags</description>
61 </option>
83c7f6a7
VS
62
63 <!-- we need this but the trick used in default-values above
64 prevents bakefile from detecting it: -->
65 <set var="FORMAT_OUTPUT_VARIABLES" append="1">WX_CONFIG</set>
66 </if>
9864ef3b 67
83c7f6a7
VS
68 <!-- ============================================================== -->
69 <!-- Common code -->
70 <!-- ============================================================== -->
9864ef3b 71
83c7f6a7
VS
72 <if cond="FORMAT not in ['gnu','autoconf']">
73 <error>
74 Don't include presets/wx_unix.bkl directly, use presets/wx.bkl.
75 </error>
76 </if>
9864ef3b 77
692ebda6 78 <!--
67533115
VZ
79 We need to re-define the WINDRES resource compiler name to the resource compiler
80 returned by 'wx-config - -rescomp' since this option returns both the name of the
81 resource compiler to use (windres) and the flags required for that compiler.
692ebda6
JS
82
83 This line typically does something *only* when the Makefile.in generated
84 using this bakefile, is used on Windows with MSYS (when using Cygwin, resources
85 are not compiled at all).
67533115
VZ
86 Without this line, in fact, when compiling with MSYS on Windows, the - -include-dir
87 option which tells windres to look in wxWidgets\include folder would be missing and
88 then windres would fail to find the wxMSW resources.
89
90 NOTE: overwriting the WINDRES variable we add wxWidgets resource flags to
91 all targets which include this bakefile; this could be useless to those
92 targets which are not wx-based eventually present in that bakefile but
93 in any case it shouldn't do any harm.
692ebda6 94 -->
67533115 95 <set var="WINDRES">$(WX_RESCOMP)</set>
692ebda6 96
c07e76fa 97 <template id="wx-lib">
83c7f6a7
VS
98 <cxxflags>$(WX_CXXFLAGS)</cxxflags>
99 <cflags>$(WX_CFLAGS)</cflags>
c07e76fa
VS
100 </template>
101
102 <template id="wx" template="wx-lib">
9864ef3b
VZ
103 <!--
104 Don't include the $(WX_LIBS) variable in linker options here since
105 it would make impossible for the user to obtain the right library
106 order when he needs to specify, *before* WX_LIBS, its own libraries
107 that depend on wxWidgets libraries; to avoid this, we include
108 $(WX_LIBS) as soon as we found the <wx-lib>base</wx-lib> tag which
109 the user should always put *after* all other wx-dependent libraries
110 -->
83c7f6a7
VS
111 </template>
112
c81032a7
VZ
113 <!-- VERY IMPORTANT: <wx-lib>base</wx-lib> must be the last wx-lib tag
114 in all your bakefiles !!
115 -->
9864ef3b 116 <define-tag name="wx-lib" rules="exe,dll,module">
c81032a7
VZ
117 <if cond="FORMAT=='autoconf' and value=='base'">
118 <!-- all wx-dependent libraries should have been already listed
119 thus we can now add WX_LIBS to the linker line -->
9864ef3b
VZ
120 <ldlibs>$(WX_LIBS)</ldlibs>
121 </if>
c81032a7
VZ
122 <if cond="FORMAT=='gnu' and value=='base'">
123 <!-- all wx libraries should have been already specified, thus
124 $(__liblist) should contain the full list... -->
125 <set var="__liblist" append="1">base</set>
126 <ldlibs>`$(WX_CONFIG) --libs $(','.join(__liblist.split()))`</ldlibs>
127 </if>
128 <if cond="FORMAT=='gnu' and value!='base'">
129 <set var="__liblist" append="1">$(value)</set>
130 </if>
131 <if cond="value not in ALLLIB_LIST.split()">
132 <error>Unknown wxWidgets library given in the wx-lib tag</error>
133 </if>
9864ef3b 134 </define-tag>
83c7f6a7
VS
135
136</makefile>