]> git.saurik.com Git - wxWidgets.git/blob - build/bakefiles/wxpresets/presets/wx_win32.bkl
added generation of wxEVT_SCROLL_XXX (patch 1424698)
[wxWidgets.git] / build / bakefiles / wxpresets / presets / wx_win32.bkl
1 <?xml version="1.0" ?>
2 <!-- $Id$ -->
3
4 <!-- Original source: http://wiki.wxwidgets.org/wiki.pl?Bakefile -->
5 <!-- Modified by: Francesco Montorsi <frm@users.sourceforge.net> -->
6 <!-- Vaclav Slavik <vslavik@fastmail.fm> to better fit
7 into Bakefile's presets -->
8 <!-- Creation date: 6/9/2004 -->
9 <!-- Last revision: 22/1/2005 off-CVS -->
10 <!-- $Id$ -->
11
12
13 <!--
14
15 FIXME: this template has (at least) the following bugs:
16
17 * it's MSW-only, the port is assumed to be wxMSW unconditionally
18
19 * multiple wx configurations (CFG variable set when building the
20 library) are not supported
21
22 -->
23
24 <!-- makefile tag signifies the beginning of the bakefile -->
25 <makefile>
26
27 <requires version="0.1.5"/>
28
29 <!-- OPTIONS -->
30 <!-- -->
31 <!-- These are essentially the configurations you -->
32 <!-- want in bakefile. -->
33 <!-- -->
34 <!-- In MSVC these are the different build -->
35 <!-- configurations you can have (in the build menu), -->
36 <!-- and in autoconf is enabled with enable-xxx=xx. -->
37 <!-- For other compilers a separate configuration -->
38 <!-- file is created (such as config.gcc on gcc) -->
39 <!-- which has several options a user can modify. -->
40 <!-- -->
41 <!-- Note that the above only happens if an option -->
42 <!-- is not constant, i.e. if it cannot be determined -->
43 <!-- by bakefile itself. -->
44
45 <!-- this is a temporary variable until there is non general -->
46 <!-- function in bakefiles for returning native markup for -->
47 <!-- reading envrionment variables -->
48 <set var="ENV_VAR">
49 <if cond="FORMAT=='watcom'">%</if>
50 <if cond="FORMAT!='watcom'"></if>
51 </set>
52
53
54 <!-- Presets for limited dmars make.exe format: -->
55 <if cond="FORMAT=='dmars'">
56 <set var="WX_UNICODE">0</set>
57 <set var="WX_DEBUG">1</set>
58 <set var="WX_SHARED">0</set>
59 </if>
60
61
62 <!-- The directory where wxWidgets is installed: -->
63 <if cond="not isdefined('WX_DIR')">
64 <set var="WX_DIR_DEFAULT" overwrite="0">$(DOLLAR)($(ENV_VAR)WXWIN)</set>
65 <option name="WX_DIR" category="path">
66 <default-value>$(WX_DIR_DEFAULT)</default-value>
67 <description>
68 The directory where wxWidgets library is installed
69 </description>
70 </option>
71 </if>
72
73 <!-- This is a standard option that determines -->
74 <!-- whether the user wants to build this library as -->
75 <!-- a dll or as a static library. -->
76 <if cond="not isdefined('WX_SHARED')">
77 <set var="WX_SHARED_DEFAULT" overwrite="0">0</set>
78 <option name="WX_SHARED">
79 <values>0,1</values>
80 <values-description>,DLL</values-description>
81 <default-value>$(WX_SHARED_DEFAULT)</default-value>
82 <description>
83 Use DLL build of wx library to use?
84 </description>
85 </option>
86 </if>
87
88 <!-- Configuration for building the bakefile with -->
89 <!-- unicode strings or not (unicode or ansi). -->
90 <if cond="not isdefined('WX_UNICODE')">
91 <set var="WX_UNICODE_DEFAULT" overwrite="0">0</set>
92 <option name="WX_UNICODE">
93 <values>0,1</values>
94 <values-description>,Unicode</values-description>
95 <default-value>$(WX_UNICODE_DEFAULT)</default-value>
96 <description>
97 Compile Unicode build of wxWidgets?
98 </description>
99 </option>
100 </if>
101
102 <if cond="not isdefined('WX_DEBUG')">
103 <set var="WX_DEBUG_DEFAULT" overwrite="0">1</set>
104 <option name="WX_DEBUG">
105 <values>0,1</values>
106 <values-description>Release,Debug</values-description>
107 <default-value>$(WX_DEBUG_DEFAULT)</default-value>
108 <description>
109 Use debug build of wxWidgets (define __WXDEBUG__)?
110 </description>
111 </option>
112 </if>
113
114 <if cond="not isdefined('WX_VERSION')">
115 <set var="WX_VERSION_DEFAULT" overwrite="0">27</set>
116 <option name="WX_VERSION">
117 <default-value>$(WX_VERSION_DEFAULT)</default-value>
118 <description>
119 Version of the wx library to build against.
120 </description>
121 </option>
122 </if>
123
124 <!-- HELPER VARIABLES -->
125 <!-- -->
126
127
128 <!-- The unicode define we want. By default bakefile -->
129 <!-- makes variables an empty string, so if unicode -->
130 <!-- is not defined $(UNICODE_DEFINE) would expand -->
131 <!-- to nothing (literally). -->
132 <set var="WXUNICODE_DEFINE">
133 <if cond="WX_UNICODE=='1'">_UNICODE</if>
134 </set>
135
136 <!-- The debug define we need with win32 compilers -->
137 <!-- (on Linux, the wx-config program is used). -->
138 <set var="WXDEBUG_DEFINE">
139 <if cond="WX_DEBUG=='1'">__WXDEBUG__</if>
140 </set>
141
142 <!-- These are handy ways of dealing with the -->
143 <!-- extensions in the library names of the -->
144 <!-- wxWindows library. -->
145 <set var="WXLIBPOSTFIX">
146 <if cond="WX_DEBUG=='1' and WX_UNICODE=='1'">ud</if>
147 <if cond="WX_DEBUG=='1' and WX_UNICODE=='0'">d</if>
148 <if cond="WX_DEBUG=='0' and WX_UNICODE=='1'">u</if>
149 </set>
150 <set var="WX3RDPARTYLIBPOSTFIX">
151 <if cond="WX_DEBUG=='1'">d</if>
152 </set>
153
154 <set var="WXCPU">
155 <if cond="FORMAT=='msevc4prj'">_$(CPU)</if>
156 </set>
157
158 <set var="WXLIBPATH">
159 <if cond="WX_SHARED=='0'">$(DIRSEP)lib$(DIRSEP)$(COMPILER)$(WXCPU)_lib</if>
160 <if cond="WX_SHARED=='1'">$(DIRSEP)lib$(DIRSEP)$(COMPILER)$(WXCPU)_dll</if>
161 </set>
162
163 <set var="WXPORT">
164 <if cond="FORMAT=='msevc4prj'">wince</if>
165 <if cond="FORMAT!='msevc4prj'">msw</if>
166 </set>
167 <set var="WXLIBINCLUDE">$(WXLIBPATH)$(DIRSEP)$(WXPORT)$(WXLIBPOSTFIX)</set>
168
169
170 <!-- WX TEMPLATE -->
171 <!-- -->
172 <!-- -->
173 <!-- While not required, templates make your -->
174 <!-- bakefiles much more readable. Templates, in -->
175 <!-- essence, are abstract classes like c++. -->
176 <!-- -->
177 <!-- Your build targets "inherit" the template, -->
178 <!-- along with the info associated with the template -->
179
180 <!-- -->
181 <!-- wxWidgets LIBRARY/APP TEMPLATE -->
182 <!-- -->
183 <!-- The "base class" of all our build targets -->
184 <!-- This links with the appropriate native -->
185 <!-- libraries required by the platform, the libraries -->
186 <!-- we want for our stuff, and the wxWindows libs. -->
187
188
189
190 <!-- this tag is used to include wx libraries: -->
191 <define-tag name="wx-lib" rules="exe,dll,module">
192 <if cond="value=='base'">
193 <sys-lib>wxbase$(WX_VERSION)$(WXLIBPOSTFIX)</sys-lib>
194 </if>
195 <if cond="value in ['net','xml', 'odbc']">
196 <sys-lib>wxbase$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)</sys-lib>
197 </if>
198 <if cond="value not in ['base','net', 'odbc', 'xml']">
199 <sys-lib>wx$(WXPORT)$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)</sys-lib>
200 </if>
201 </define-tag>
202
203 <!-- just a placeholder to mark the place where <wx-lib> will be placed,
204 thanks to the order precedence declaration below it: -->
205 <define-tag name="__wx-libs-point" rules="exe,dll,module"/>
206 <tag-info name="wx-lib"
207 position="before:__wx-libs-point"/>
208 <tag-info name="__wx-syslibs"
209 position="after:__wx-libs-point"/>
210
211
212 <!-- template for static wx libraries: -->
213 <template id="wx-lib">
214 <!-- MISCELLANEOUS -->
215 <if cond="FORMAT=='mingw'">
216 <define>HAVE_W32API_H</define>
217 <ldflags>-mthreads</ldflags>
218 </if>
219
220 <define>$(WXUNICODE_DEFINE)</define>
221 <define>$(WXDEBUG_DEFINE)</define>
222 <define>__WXMSW__</define>
223
224 <include>$(WX_DIR)$(WXLIBINCLUDE)</include>
225 <include>$(WX_DIR)/include</include>
226 </template>
227
228
229 <!-- this ugly tag contains all sys-lib tags used by "wx" template,
230 in order to make sure they are not reorder when wx-lib is moved
231 after __wx-libs-point: -->
232 <define-tag name="__wx-syslibs" rules="exe,dll,module">
233 <!-- wx 3rd party libs, always use them: -->
234 <sys-lib cond="FORMAT!='msevc4prj'">wxtiff$(WX3RDPARTYLIBPOSTFIX)</sys-lib>
235 <sys-lib>wxjpeg$(WX3RDPARTYLIBPOSTFIX)</sys-lib>
236 <sys-lib>wxpng$(WX3RDPARTYLIBPOSTFIX)</sys-lib>
237 <sys-lib>wxzlib$(WX3RDPARTYLIBPOSTFIX)</sys-lib>
238 <!-- For regex we won't use the WX3RDPARTYLIBPOSTIX postfix:
239 unliked tiff, jpeg, png, zlib, expat, when building
240 in Unicode mode, the "u" suffix is appended to regex -->
241 <sys-lib cond="FORMAT!='msevc4prj'">wxregex$(WXLIBPOSTFIX)</sys-lib>
242 <sys-lib>wxexpat$(WX3RDPARTYLIBPOSTFIX)</sys-lib>
243
244 <!-- link-in system libs that wx depends on: -->
245 <!-- If on borland, we don't need to do much -->
246 <if cond="FORMAT=='borland'">
247 <sys-lib>ole2w32</sys-lib>
248 <sys-lib>odbc32</sys-lib>
249 </if>
250
251 <!-- Non-borland, on the other hand... -->
252 <if cond="FORMAT not in ['borland','msevc4prj']">
253 <sys-lib>kernel32</sys-lib>
254 <sys-lib>user32</sys-lib>
255 <sys-lib>gdi32</sys-lib>
256 <sys-lib>comdlg32</sys-lib>
257 <sys-lib>winspool</sys-lib>
258 <sys-lib>winmm</sys-lib>
259 <sys-lib>shell32</sys-lib>
260 <sys-lib>comctl32</sys-lib>
261 <sys-lib>ole32</sys-lib>
262 <sys-lib>oleaut32</sys-lib>
263 <sys-lib>uuid</sys-lib>
264 <sys-lib>rpcrt4</sys-lib>
265 <sys-lib>advapi32</sys-lib>
266 <sys-lib>wsock32</sys-lib>
267 <sys-lib>odbc32</sys-lib>
268 </if>
269
270 <!-- Libs common to both borland and MSVC -->
271 <if cond="FORMAT=='msvc' or FORMAT=='msvc6prj' or FORMAT=='borland'">
272 <sys-lib>oleacc</sys-lib>
273 </if>
274 </define-tag>
275
276 <!-- template for wx executables/dlls: -->
277 <template id="wx" template="wx-lib">
278 <lib-path>$(WX_DIR)$(WXLIBPATH)</lib-path>
279
280 <!-- wx libs must come before 3rd party and sys libs, this is
281 the place where the hack explained above is carried on: -->
282 <__wx-libs-point/>
283 <__wx-syslibs/>
284 </template>
285
286 </makefile>