]> git.saurik.com Git - wxWidgets.git/blame - build/bakefiles/common.bkl
Fix wxHash{Set,Map} compilation with g++ 4.7 in C++11 mode.
[wxWidgets.git] / build / bakefiles / common.bkl
CommitLineData
ddf98968 1<?xml version="1.0" ?>
481290e2
VS
2<!-- $Id$ -->
3
ddf98968 4<makefile>
b6dc1b90 5
00100882 6 <requires version="0.2.7"/>
e2c10c59 7
ddf98968
VS
8 <!-- bakefile modules we need: -->
9 <using module="datafiles"/>
10
11 <!-- load python module with wxwindows helpers: -->
12 <using module="wxwin"/>
13
c8c1b0bf
DE
14 <!-- DFE: Add a platform meaning regular MacOS (not OS X) -->
15 <!-- FIXME: This will be handled in Bakefile but for now I wanted to
e2c10c59
WS
16 get my changes to the wx bakefiles in the tree but invisible to
17 windows toolkits and their config.xxx settings -->
18 <if cond="FORMAT=='autoconf'">
19 <option name="PLATFORM_MACOS"/>
20 </if>
21 <if cond="FORMAT!='autoconf'">
22 <set var="PLATFORM_MACOS">0</set>
23 </if>
c8c1b0bf 24
ddf98968 25 <include file="config.bkl"/>
c79241a2
VS
26
27 <include file="plugins_deps.bkl"/>
e2c10c59 28
bdc408c4 29
05a0bcde
VS
30 <!-- wxWidgets version numbers logic: -->
31 <include file="version.bkl"/>
e2c10c59
WS
32
33
ddf98968
VS
34 <!-- ================================================================== -->
35 <!-- Names of libraries and DLLs: -->
36 <!-- ================================================================== -->
37
38 <set var="PORTNAME">
39 <if cond="USE_GUI=='0'">base</if>
40 <if cond="USE_GUI=='1'">$(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)</if>
41 </set>
e2c10c59 42
64a2a46f
VS
43 <set var="WXBASEPORT">
44 <if cond="TOOLKIT=='MAC'">_carbon</if>
45 </set>
ddf98968
VS
46
47 <set var="COMPILERORGCC">
48 <if cond="isdefined('COMPILER')">$(COMPILER)</if>
49 <if cond="not isdefined('COMPILER')">gcc</if>
50 </set>
51 <set var="WXCOMPILER">
52 <if cond="PLATFORM_WIN32=='1'">_$(COMPILERORGCC)</if>
53 </set>
4fc5f509
VS
54
55 <set var="VENDORTAG">
cff5df9f
VS
56 <if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='1'"></if>
57 <if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='0'">_$(VENDOR)</if>
4fc5f509
VS
58 </set>
59
c6684d42 60 <!-- debug suffix used for Windows libraries which use debug CRT -->
ddf98968 61 <set var="WXDEBUGFLAG">
c6684d42
VZ
62 <if cond="BUILD=='debug' and DEBUG_RUNTIME_LIBS=='default'">d</if>
63 <if cond="DEBUG_RUNTIME_LIBS=='1'">d</if>
ddf98968
VS
64 </set>
65 <set var="WXUNICODEFLAG">
af594eca
VS
66 <!-- WinCE is Unicode-only platform: -->
67 <if cond="UNICODE=='1' and FORMAT!='msevc4prj'">u</if>
ddf98968 68 </set>
c6684d42
VZ
69 <set var="WX_U_D_SUFFIX">
70 $(WXUNICODEFLAG)$(WXDEBUGFLAG)
71 </set>
ddf98968 72 <set var="WXNAMESUFFIX">
c6684d42 73 $(WX_U_D_SUFFIX)$(WX_LIB_FLAVOUR)
ddf98968 74 </set>
e2c10c59 75
ddf98968
VS
76 <set var="WXUNIVNAME">
77 <if cond="WXUNIV=='1'">univ</if>
78 </set>
79 <set var="WXUNIV_DEFINE">
80 <if cond="WXUNIV=='1'">__WXUNIVERSAL__</if>
81 </set>
82
cdc0282e 83 <if cond="FORMAT=='autoconf'">
64a2a46f 84 <set var="WXNAMEPREFIX">wx_base$(WXBASEPORT)</set>
cdc0282e 85 <set var="WXNAMEPREFIXGUI">wx_$(PORTNAME)$(WXUNIVNAME)</set>
a1bf307a 86 <set var="WXVERSIONTAG">-$(WX_RELEASE)</set>
cdc0282e
VS
87 </if>
88 <if cond="FORMAT!='autoconf'">
64a2a46f 89 <set var="WXNAMEPREFIX">
a1bf307a 90 wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)
64a2a46f
VS
91 </set>
92 <set var="WXNAMEPREFIXGUI">
a1bf307a 93 wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)</set>
cdc0282e
VS
94 <set var="WXVERSIONTAG"></set>
95 </if>
4fc5f509 96 <set var="WXDLLNAMEPREFIX">
64a2a46f 97 <if cond="PLATFORM_WIN32=='1'">
bdc408c4 98 wxbase$(WXBASEPORT)$(WXWIN32DLLVERSION)
64a2a46f 99 </if>
4fc5f509
VS
100 <if cond="PLATFORM_WIN32=='0'">$(WXNAMEPREFIX)</if>
101 </set>
102 <set var="WXDLLNAMEPREFIXGUI">
103 <if cond="PLATFORM_WIN32=='1'">
bdc408c4 104 wx$(PORTNAME)$(WXUNIVNAME)$(WXWIN32DLLVERSION)
4fc5f509
VS
105 </if>
106 <if cond="PLATFORM_WIN32=='0'">$(WXNAMEPREFIXGUI)</if>
107 </set>
108 <set var="WXDLLVERSIONTAG">
109 <if cond="PLATFORM_WIN32=='1'"></if>
110 <if cond="PLATFORM_WIN32=='0'">$(WXVERSIONTAG)</if>
111 </set>
ddf98968 112
e2c10c59 113
ddf98968
VS
114 <!-- =============================================================== -->
115 <!-- Names of component libraries: -->
116 <!-- =============================================================== -->
117
e86e1522
VS
118 <set var="WXLIB_BASE">
119 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('base')))</if>
120 </set>
7c4728f6
VS
121 <set var="WXLIB_NET">
122 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('net')))</if>
123 </set>
61639efb
VZ
124 <set var="WXLIB_QA">
125 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('qa')))</if>
126 </set>
ddf98968
VS
127 <set var="WXLIB_CORE">
128 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))</if>
129 </set>
13cb46e0
VS
130 <set var="WXLIB_ADV">
131 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('adv')))</if>
132 </set>
2ae3b602 133 <set var="WXLIB_MEDIA">
03575f9b 134 <if cond="MONOLITHIC=='0' and USE_MEDIA=='1'">$(mk.evalExpr(wxwin.mkLibName('media')))</if>
2ae3b602 135 </set>
fab9850d 136 <set var="WXLIB_HTML">
e86e1522 137 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('html')))</if>
fab9850d 138 </set>
a69544bf
VS
139 <set var="WXLIB_XML">
140 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xml')))</if>
141 </set>
a62d8849
WS
142 <set var="WXLIB_XRC">
143 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xrc')))</if>
144 </set>
50acee04
JS
145 <set var="WXLIB_AUI">
146 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('aui')))</if>
147 </set>
3c3ead1d
PC
148 <set var="WXLIB_RIBBON">
149 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('ribbon')))</if>
150 </set>
1c4293cb
VZ
151 <set var="WXLIB_PROPGRID">
152 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('propgrid')))</if>
153 </set>
3b2cb431
JS
154 <set var="WXLIB_RICHTEXT">
155 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('richtext')))</if>
156 </set>
54429bb3
RD
157 <set var="WXLIB_STC">
158 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('stc')))</if>
159 </set>
467d261e 160 <set var="WXLIB_WEBVIEW">
ea10101a 161 <if cond="MONOLITHIC=='0' and USE_WEBVIEW=='1'">$(mk.evalExpr(wxwin.mkLibName('webview')))</if>
cfcf1d6e 162 </set>
ddf98968
VS
163 <set var="WXLIB_MONO">
164 <if cond="MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))</if>
165 </set>
e2c10c59
WS
166
167
ddf98968 168 <!-- =============================================================== -->
cff5df9f 169 <!-- Where to store built libraries and objects: -->
ddf98968 170 <!-- =============================================================== -->
e2c10c59 171
af594eca
VS
172 <set var="DIR_SUFFIX_CPU">
173 <if cond="FORMAT=='msevc4prj'">_$(CPU)</if>
b974b0da 174 <if cond="TARGET_CPU=='amd64'">_amd64</if>
e40b74ba 175 <if cond="TARGET_CPU=='AMD64'">_amd64</if>
b974b0da 176 <if cond="TARGET_CPU=='ia64'">_ia64</if>
e40b74ba 177 <if cond="TARGET_CPU=='IA64'">_ia64</if>
af594eca 178 </set>
cff5df9f
VS
179
180 <if cond="FORMAT!='autoconf'">
181 <set var="WXDLLFLAG">
182 <if cond="SHARED=='1'">dll</if>
183 </set>
184 <set var="CFG_NAME_PART">
c6684d42 185 $(PORTNAME)$(WXUNIVNAME)$(WX_U_D_SUFFIX)$(WXDLLFLAG)$(CFG)
cff5df9f 186 </set>
dad909f7 187
4c51a665 188 <!-- NB: this is make_var so that it can be overridden on command line
dad909f7
VS
189 like this: nmake -f makefile.vc COMPILER_PREFIX=vc6 -->
190 <set var="COMPILER_PREFIX" make_var="1">$(COMPILER)</set>
191
328f5196 192 <set var="OBJS" make_var="1">
dad909f7 193 $(COMPILER_PREFIX)_$(CFG_NAME_PART)$(DIR_SUFFIX_CPU)
328f5196
VS
194 </set>
195
cff5df9f
VS
196 <set var="BUILDDIR">$(OBJS)</set>
197 </if>
e2c10c59 198
46da6d06 199 <set var="LIBTYPE_SUFFIX" make_var="1">
52abdc83
WS
200 <if cond="FORMAT!='autoconf' and SHARED=='0' and PLATFORM_WIN32=='1'">lib</if>
201 <if cond="FORMAT!='autoconf' and SHARED=='1' and PLATFORM_WIN32=='1'">dll</if>
202 <if cond="FORMAT=='watcom' and SHARED=='0' and PLATFORM_WIN32=='0'">$(TOOLKIT_LOWERCASE)_lib</if>
203 <if cond="FORMAT=='watcom' and SHARED=='1' and PLATFORM_WIN32=='0'">$(TOOLKIT_LOWERCASE)_dll</if>
46da6d06
WS
204 </set>
205
390c0cfb 206 <set var="LIBDIRNAME" make_var="1">
6589dc98 207 <if cond="FORMAT=='autoconf'">$(wx_top_builddir)/lib</if>
46da6d06 208 <if cond="FORMAT!='autoconf'">
dad909f7 209 $(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER_PREFIX)$(DIR_SUFFIX_CPU)_$(LIBTYPE_SUFFIX)$(CFG)
cff5df9f 210 </if>
ddf98968 211 </set>
e2c10c59 212
ee929bcf
VS
213 <if cond="FORMAT!='autoconf'">
214 <set var="SETUPHDIR" make_var="1">
c6684d42 215 $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WX_U_D_SUFFIX)
ee929bcf
VS
216 </set>
217 </if>
cff5df9f 218
e2c10c59
WS
219
220
4843dc4c
VS
221 <!-- =============================================================== -->
222 <!-- Templates for libs: -->
223 <!-- =============================================================== -->
cdc0282e 224
4f6e1dac
VS
225 <set var="DEBUGINFO">
226 <if cond="BUILD=='debug' and DEBUG_INFO=='default'">on</if>
227 <if cond="DEBUG_INFO=='1'">on</if>
228 <if cond="BUILD=='release' and DEBUG_INFO=='default'">off</if>
229 <if cond="DEBUG_INFO=='0'">off</if>
230 </set>
231 <set var="DEBUGRUNTIME">
51c4bf88
VS
232 <if cond="DEBUG_RUNTIME_LIBS=='default' and BUILD=='debug'">on</if>
233 <if cond="DEBUG_RUNTIME_LIBS=='default' and BUILD=='release'">off</if>
4f6e1dac
VS
234 <if cond="DEBUG_RUNTIME_LIBS=='0'">off</if>
235 <if cond="DEBUG_RUNTIME_LIBS=='1'">on</if>
cdc0282e
VS
236 </set>
237 <set var="OPTIMIZEFLAG">
546a7e42
VS
238 <if cond="BUILD=='debug'">off</if>
239 <if cond="BUILD=='release'">speed</if>
cdc0282e 240 </set>
9833a21a
VS
241 <set var="EXCEPTIONSFLAG">
242 <if cond="USE_EXCEPTIONS=='1'">on</if>
243 <if cond="USE_EXCEPTIONS=='0'">off</if>
244 </set>
c2efd890
VZ
245 <set var="RTTIFLAG">
246 <if cond="USE_RTTI=='1'">on</if>
247 <if cond="USE_RTTI=='0'">off</if>
248 </set>
d1e5aa07
VS
249 <set var="THREADSFLAG">
250 <if cond="USE_THREADS=='1'">multi</if>
251 <if cond="USE_THREADS=='0'">single</if>
252 </set>
15b44c69 253
b7e4c668 254 <set var="RTTI_DEFINE">
7121be53 255 <if cond="USE_RTTI=='0'">wxNO_RTTI</if>
b7e4c668
VZ
256 </set>
257 <set var="EXCEPTIONS_DEFINE">
7121be53 258 <if cond="USE_EXCEPTIONS=='0'">wxNO_EXCEPTIONS</if>
b7e4c668
VZ
259 </set>
260 <set var="THREAD_DEFINE">
7121be53 261 <if cond="USE_THREADS=='0'">wxNO_THREADS</if>
b7e4c668
VZ
262 </set>
263
15b44c69 264 <set var="DEBUG_DEFINE">
c6684d42 265 <if cond="DEBUG_FLAG=='0'">wxDEBUG_LEVEL=0</if>
15b44c69 266 </set>
c59422a4
VS
267 <set var="NDEBUG_DEFINE">
268 <if cond="FORMAT!='autoconf' and DEBUG_RUNTIME_LIBS=='default' and BUILD=='release'">NDEBUG</if>
269 <if cond="FORMAT!='autoconf' and DEBUG_RUNTIME_LIBS=='0'">NDEBUG</if>
270 </set>
271
4435bd42
MB
272 <!-- does not cover all cases, but better than nothing -->
273 <set var="NO_VC_CRTDBG">
274 <if cond="FORMAT=='msvc' and BUILD=='debug' and DEBUG_RUNTIME_LIBS=='0'">__NO_VC_CRTDBG__</if>
275 <if cond="FORMAT=='msvc' and BUILD=='release' and DEBUG_FLAG=='1'">__NO_VC_CRTDBG__</if>
276 </set>
15b44c69 277 <set var="UNICODE_DEFINE">
ed4ccecd 278 <if cond="FORMAT!='autoconf' and UNICODE=='1'">_UNICODE</if>
9c7ad546 279 <if cond="FORMAT!='autoconf' and UNICODE=='0'">wxUSE_UNICODE=0</if>
15b44c69 280 </set>
22df8343 281 <set var="MSLU_DEFINE">
a649ec01 282 <if cond="FORMAT!='autoconf' and MSLU=='1'">wxUSE_UNICODE_MSLU=1</if>
22df8343 283 </set>
e2c10c59 284
5fae0f97
WS
285 <!-- fill for the specific case of the format/compiler -->
286 <set var="WIN32_WINNT">
287 <if cond="FORMAT=='dmars' or FORMAT=='dmars_smake'">_WIN32_WINNT=0x0400</if>
288 </set>
289
416f5bc8
VS
290 <set var="UNICOWS_LIB">
291 <if cond="MSLU=='1'">unicows</if>
292 </set>
f82b7036
KO
293 <set var="CAIRO_LIB">
294 <if cond="USE_CAIRO=='1'">cairo</if>
295 </set>
296 <set var="CAIRO_LIBDIR">
297 <if cond="USE_CAIRO=='1'">$(DOLLAR)(CAIRO_ROOT)/lib</if>
298 </set>
299 <set var="CAIRO_INCLUDEDIR">
300 <if cond="USE_CAIRO=='1'">$(DOLLAR)(CAIRO_ROOT)/include/cairo</if>
301 </set>
2713e629 302
e40b74ba 303 <set var="LINK_TARGET_CPU">
94b6ce7f
VZ
304 <if cond="TARGET_CPU=='amd64'">/MACHINE:X64</if>
305 <if cond="TARGET_CPU=='AMD64'">/MACHINE:X64</if>
b974b0da 306 <if cond="TARGET_CPU=='ia64'">/MACHINE:IA64</if>
e40b74ba
MW
307 <if cond="TARGET_CPU=='IA64'">/MACHINE:IA64</if>
308 </set>
e40b74ba 309
149cc218 310 <template id="common_settings">
4f6e1dac
VS
311 <debug-info>$(DEBUGINFO)</debug-info>
312 <debug-runtime-libs>$(DEBUGRUNTIME)</debug-runtime-libs>
5e3746dc 313 <optimize>$(OPTIMIZEFLAG)</optimize>
d1e5aa07 314 <threading>$(THREADSFLAG)</threading>
4b44ea2b 315 <runtime-libs>$(RUNTIME_LIBS)</runtime-libs>
c2efd890 316 <cxx-rtti>$(RTTIFLAG)</cxx-rtti>
9833a21a 317 <cxx-exceptions>$(EXCEPTIONSFLAG)</cxx-exceptions>
5e3746dc
VS
318 <if cond="FORMAT!='autoconf'">
319 <cppflags>$(EXTRACFLAGS)</cppflags>
320 </if>
4707c7c3 321 <!-- Suppress deprecation warnings for standard library calls -->
49a63afb 322 <if cond="FORMAT in ['msvc','msvs2005prj','msvs2008prj']">
4707c7c3
VZ
323 <define>_CRT_SECURE_NO_DEPRECATE=1</define>
324 <define>_CRT_NON_CONFORMING_SWPRINTFS=1</define>
325 <define>_SCL_SECURE_NO_WARNINGS=1</define>
326 </if>
327
4435bd42 328 <define>$(NO_VC_CRTDBG)</define>
5fae0f97 329 <define>$(WIN32_WINNT)</define>
e40b74ba
MW
330 <if cond="FORMAT=='msvc'">
331 <ldflags>$(LINK_TARGET_CPU)</ldflags>
e40b74ba 332 </if>
92d594fc 333 <include cond="FORMAT=='msevc4prj'">$(TOP_SRCDIR)build/wince/missing</include>
5e3746dc 334 </template>
e2c10c59 335
4843dc4c 336 <template id="anylib">
4843dc4c
VS
337 <dirname>$(LIBDIRNAME)</dirname>
338 <install-to>$(LIBDIR)</install-to>
339 </template>
340
149cc218 341 <template id="3rdparty_lib" template="common_settings,anylib">
a1bf307a 342 <if cond="FORMAT=='autoconf'">
c6684d42 343 <libname>$(id)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)</libname>
a1bf307a
RL
344 </if>
345 <if cond="FORMAT!='autoconf'">
9c2d002b 346 <libname>$(id)$(WXDEBUGFLAG)$(HOST_SUFFIX)</libname>
a1bf307a 347 </if>
52a5a009
VS
348 <!--
349 we want to install 3rd party libs system-wide only with static
77ffb593 350 version of wxWidgets; otherwise they are embedded in shared libs:
52a5a009
VS
351 -->
352 <install-if>SHARED=='0'</install-if>
af594eca 353 <pic>$(substituteFromDict(SHARED, {'0':'off', '1':'on'}))</pic>
9dab58b1
VZ
354
355 <!--
356 we don't want to have asserts in the 3rd party libraries code,
357 neither we nor wx users are interested in debugging them anyhow
358 -->
359 <define>NDEBUG</define>
41c89b91
VZ
360
361 <if cond="IS_MSVC">
362 <!--
363 we're not interested in deprecation warnings about the use of
364 standard C functions in the 3rd party libraries (these warnings
365 are only given by VC8+ but it's simpler to just always define
366 this symbol which disables them, even for previous VC versions)
367 -->
368 <define>_CRT_SECURE_NO_WARNINGS</define>
369 </if>
82cb0280 370 </template>
e2c10c59
WS
371
372
cb9548d9 373 <!-- deal with the need to copy setup.h here: -->
82cb0280 374
cb9548d9 375 <define-tag name="msvc-headers" rules="dll,lib">
af594eca 376 <if cond="IS_MSVC_PRJ">
79a2ea34
VS
377 <msvc-project-files>
378 $(addPrefixToList('include\\', wxwin.headersOnly(value)))
379 </msvc-project-files>
cb9548d9
VS
380 </if>
381 </define-tag>
382
c7f476c9 383 <set var="msvc_copy_setup_h_script">
cc118a9b
VS
384 <if cond="IS_MSVC_PRJ=='1' and FORMAT not in ['msvc6prj','msevc4prj']">
385Creating $(SETUPHDIR)\wx\setup.h
386InputPath=..\..\include\wx\%s
387
388"$(SETUPHDIR)\wx\setup.h" :
389$(TAB)copy "$(DOLLAR)(InputPath)" $(SETUPHDIR)\wx\setup.h
390 </if>
391 <if cond="IS_MSVC_PRJ=='1' and FORMAT in ['msvc6prj','msevc4prj']">
cb9548d9 392Creating $(SETUPHDIR)\wx\setup.h
9c26fe83 393InputPath=..\..\include\wx\%s
cb9548d9
VS
394
395"$(SETUPHDIR)\wx\setup.h" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)"
396$(TAB)copy "$(DOLLAR)(InputPath)" $(SETUPHDIR)\wx\setup.h
c7f476c9
MW
397 </if>
398 </set>
399
400 <define-tag name="msvc-headers-setup-h" rules="dll,lib">
401 <if cond="IS_MSVC_PRJ">
402 <msvc-headers>
403 $(addPrefixToList('wx/', value))
404 </msvc-headers>
405 <set var="_custom_build_files" append="1">
406 $(nativePaths(addPrefixToList('include/wx/', value)))
cb9548d9
VS
407 </set>
408 </if>
409 </define-tag>
410
c7f476c9
MW
411 <define-tag name="msvc-copy-setup-h" rules="dll,lib">
412 <if cond="IS_MSVC_PRJ">
413 <if cond="FORMAT=='msevc4prj'">
414 <msvc-headers-setup-h>
415 msw/wince/setup.h
416 </msvc-headers-setup-h>
417 <set var="_custom_build_include_wx_msw_wince_setup_h">
418 $(msvc_copy_setup_h_script % 'msw\wince\setup.h')
419 </set>
420 </if>
421 <if cond="FORMAT!='msevc4prj'">
422 <msvc-headers-setup-h>
423 msw/setup.h
424 univ/setup.h
425 </msvc-headers-setup-h>
426 <set var="_custom_build_include_wx_msw_setup_h">
427 <if cond="WXUNIV=='0'">
428 $(msvc_copy_setup_h_script % 'msw\setup.h')
429 </if>
430 </set>
431 <set var="_custom_build_include_wx_univ_setup_h">
432 <if cond="WXUNIV=='1'">
433 $(msvc_copy_setup_h_script % 'univ\setup.h')
434 </if>
435 </set>
436 </if>
437 </if>
438 </define-tag>
439
c8d58531
MW
440 <define-tag name="msvc-create-rcdefs-h" rules="dll,lib">
441 <if cond="IS_MSVC_PRJ">
442 <msvc-headers-setup-h>
443 msw/genrcdefs.h
444 </msvc-headers-setup-h>
92641c0d 445 <!-- FIXME: we need another way to get the compiler name -->
c8d58531
MW
446 <set var="VC_COMPILER">
447 <if cond="FORMAT=='msevc4prj'">$(_COMPILER)</if>
448 <if cond="FORMAT!='msevc4prj'">cl</if>
449 </set>
450 <set var="_custom_build_include_wx_msw_genrcdefs_h">
451Creating $(SETUPHDIR)\wx\msw\rcdefs.h
9c26fe83 452InputPath=..\..\include\wx\msw\genrcdefs.h
c8d58531 453
81073d92 454"$(SETUPHDIR)\wx\msw\rcdefs.h" : "$(DOLLAR)(SOURCE)" "$(SETUPHDIR)\wx\msw"
c8d58531
MW
455$(TAB)$(VC_COMPILER) /EP /nologo "$(DOLLAR)(InputPath)" > "$(SETUPHDIR)\wx\msw\rcdefs.h"
456 </set>
457 </if>
458 </define-tag>
459
cb9548d9
VS
460 <template id="msvc_setup_h">
461 <msvc-copy-setup-h/>
c8d58531 462 <msvc-create-rcdefs-h/>
cb9548d9 463 </template>
ddf98968
VS
464
465 <!-- =============================================================== -->
466 <!-- 3rd party libs: -->
467 <!-- =============================================================== -->
e2c10c59 468
ddf98968
VS
469 <!-- 3rd party libraries: -->
470 <include file="regex.bkl"/>
471 <include file="zlib.bkl"/>
472 <include file="png.bkl"/>
473 <include file="jpeg.bkl"/>
474 <include file="tiff.bkl"/>
a69544bf 475 <include file="expat.bkl"/>
54429bb3 476 <include file="scintilla.bkl"/>
ddf98968 477
e2c10c59 478
ddf98968 479 <!-- =============================================================== -->
77ffb593 480 <!-- Templates for wxWidgets libs: -->
ddf98968 481 <!-- =============================================================== -->
cdc0282e 482
2cc75628
VS
483 <!-- NB: in monolithic build, even wxBase-only must be linked against
484 GUI extralibs, otherwise there would be unresolved references.
485 The variables below are defined so that all libs are used
486 in monolithic build, but not in multilib one. -->
487 <set var="EXTRALIBS_FOR_BASE">
51ec29ea 488 <if cond="MONOLITHIC=='1'">$(EXTRALIBS) $(EXTRALIBS_XML) $(EXTRALIBS_GUI)</if>
2cc75628
VS
489 <if cond="MONOLITHIC=='0'">$(EXTRALIBS)</if>
490 </set>
491 <set var="EXTRALIBS_FOR_GUI">
492 <if cond="MONOLITHIC=='1'"></if>
493 <if cond="MONOLITHIC=='0'">$(EXTRALIBS_GUI)</if>
494 </set>
495
149cc218 496 <template id="wx" template="common_settings">
ddf98968
VS
497 <set var="wxid">$(wxwin.mk_wxid(id))</set>
498 <define>__WX$(TOOLKIT)__</define>
499 <define>$(WXUNIV_DEFINE)</define>
15b44c69 500 <define>$(DEBUG_DEFINE)</define>
c59422a4 501 <define>$(NDEBUG_DEFINE)</define>
b7e4c668
VZ
502 <define>$(EXCEPTIONS_DEFINE)</define>
503 <define>$(RTTI_DEFINE)</define>
504 <define>$(THREAD_DEFINE)</define>
15b44c69 505 <define>$(UNICODE_DEFINE)</define>
22df8343 506 <define>$(MSLU_DEFINE)</define>
c8d58531 507 <include cond="FORMAT!='autoconf'">$(SETUPHDIR)</include>
85ebb95c 508 <include cond="FORMAT!='autoconf'">$(TOP_SRCDIR)include</include>
f82b7036 509 <include cond="FORMAT!='autoconf'">$(CAIRO_INCLUDEDIR)</include>
e2c10c59 510 <lib-path>$(LIBDIRNAME)</lib-path>
b1b592ad 511
432afc17 512 <warnings>max</warnings>
b1b592ad 513 <cxxflags cond="FORMAT=='autoconf'">$(CXXWARNINGS)</cxxflags>
a0177486
WS
514 <cppflags-watcom>
515 -wcd=549 <!-- 'sizeof' operand contains compiler generated information -->
516 -wcd=656 <!-- define this function inside its class definition (may improve code quality) -->
517 -wcd=657 <!-- define this function inside its class definition (could have improved code quality) -->
518 -wcd=667 <!-- 'va_start' macro will not work without an argument before '...' -->
519 </cppflags-watcom>
329a2be8 520 <cxxflags-mingw>
f8fbc92b 521 -Wno-ctor-dtor-privacy <!-- only defines a private destructor and has no friends -->
329a2be8 522 </cxxflags-mingw>
ddf98968
VS
523 </template>
524
c74dc163 525 <!-- for both GUI and wxBase libs/samples: -->
e83a52a2 526 <template id="wx_append_base_nomono">
ddf98968 527 <!-- link against builtin 3rd party libs, if needed: -->
ddf98968 528 <sys-lib>$(LIB_ZLIB)</sys-lib>
ddf98968 529 <sys-lib>$(LIB_REGEX)</sys-lib>
a69544bf 530 <sys-lib>$(LIB_EXPAT)</sys-lib>
e2c10c59 531
2cc75628 532 <ldlibs>$(EXTRALIBS_FOR_BASE)</ldlibs>
15b44c69 533
52abdc83
WS
534 <!-- system libraries on os2: -->
535 <if cond="FORMAT!='autoconf' and PLATFORM_OS2=='1'">
536 <if cond="FORMAT=='watcom'">
537 <sys-lib>upm32</sys-lib>
538 </if>
539 </if>
540
15b44c69 541 <!-- system libraries on windows: -->
52abdc83 542 <if cond="FORMAT!='autoconf' and PLATFORM_WIN32=='1'">
416f5bc8 543 <sys-lib>$(UNICOWS_LIB)</sys-lib>
f82b7036
KO
544 <sys-lib>$(CAIRO_LIB)</sys-lib>
545 <lib-path>$(CAIRO_LIBDIR)</lib-path>
328f5196 546 <if cond="FORMAT=='borland'">
cb8bbc13
VS
547 <sys-lib>ole2w32</sys-lib>
548 </if>
f9c4805a
VS
549 <if cond="FORMAT=='msevc4prj'">
550 <sys-lib>ole32</sys-lib>
551 <sys-lib>oleaut32</sys-lib>
552 <sys-lib>uuid</sys-lib>
553 <sys-lib>commctrl</sys-lib>
f9c4805a
VS
554 <sys-lib>winsock</sys-lib>
555 <sys-lib>wininet</sys-lib>
556 </if>
557 <if cond="FORMAT!='borland' and FORMAT!='msevc4prj'">
cb8bbc13
VS
558 <sys-lib>kernel32</sys-lib>
559 <sys-lib>user32</sys-lib>
560 <sys-lib>gdi32</sys-lib>
561 <sys-lib>comdlg32</sys-lib>
562 <sys-lib>winspool</sys-lib>
563 <sys-lib>winmm</sys-lib>
564 <sys-lib>shell32</sys-lib>
cb8bbc13 565 <sys-lib>comctl32</sys-lib>
cb8bbc13
VS
566 <sys-lib>ole32</sys-lib>
567 <sys-lib>oleaut32</sys-lib>
568 <sys-lib>uuid</sys-lib>
569 <sys-lib>rpcrt4</sys-lib>
570 <sys-lib>advapi32</sys-lib>
571 <sys-lib>wsock32</sys-lib>
b44f5137
VZ
572 <!-- this one is only used if wxUSE_URL_NATIVE==1 but we don't
573 know if it is here so just add it unconditionally -->
574 <sys-lib>wininet</sys-lib>
15b44c69 575 </if>
1b48afd2 576 <if cond="FORMAT=='borland'">
3682ea7d
VS
577 <sys-lib>oleacc</sys-lib>
578 </if>
57670219 579 </if>
ddf98968
VS
580 </template>
581
82ca3afe 582
c74dc163 583 <!-- for GUI libs/samples: -->
0019dee6
VS
584 <template id="wx_append_nomono" template_append="wx_append_base_nomono">
585 <sys-lib>$(LIB_TIFF)</sys-lib>
586 <sys-lib>$(LIB_JPEG)</sys-lib>
587 <sys-lib>$(LIB_PNG)</sys-lib>
2cc75628 588 <ldlibs>$(EXTRALIBS_FOR_GUI)</ldlibs>
c74dc163
VS
589 </template>
590
57c74474
VZ
591 <set var="LIB_PNG_IF_MONO">
592 <if cond="MONOLITHIC=='1'">$(LIB_PNG)</if>
593 </set>
e83a52a2
VS
594
595 <template id="wx_append_base" template_append="wx_append_base_nomono">
57c74474
VZ
596 <!-- Always link against the full wx library in monolithic build and
597 also against the PNG one as core code references it for Tango
598 icons and so it is pulled in even by the console programs. -->
e83a52a2 599 <sys-lib>$(WXLIB_MONO)</sys-lib>
57c74474 600 <sys-lib>$(LIB_PNG_IF_MONO)</sys-lib>
e83a52a2
VS
601 </template>
602 <template id="wx_append" template_append="wx_append_nomono">
603 <!-- Always link against the wxWin library in monolithic build: -->
604 <sys-lib>$(WXLIB_MONO)</sys-lib>
605 </template>
e2c10c59 606
e83a52a2 607
0469579d 608 <set var="WX_DISABLE_PRECOMP_HEADERS" overwrite="0">0</set>
e2c10c59 609
4843dc4c 610 <template id="wx_lib_b" template="wx,anylib">
ddf98968 611 <set var="WXLIBNAME">$(wxwin.mkLibName(wxid))</set>
ddf98968 612 <libname>$(WXLIBNAME)</libname>
cb8bbc13 613
5d88a6b5
VZ
614 <define>WXBUILDING</define>
615
0469579d 616 <if cond="WX_DISABLE_PRECOMP_HEADERS=='0'">
0e1f8ea4 617 <if cond="FORMAT!='autoconf' and TOOLKIT in ['MSW','PM','WINCE']">
66b9f7f7 618 <sources>$(WXTOPDIR)src/common/dummy.cpp</sources>
0469579d 619 <precomp-headers-gen>
66b9f7f7 620 $(WXTOPDIR)src/common/dummy.cpp
0469579d
VS
621 </precomp-headers-gen>
622 </if>
a420c7ed 623 <precomp-headers-location>$(WXTOPDIR)include</precomp-headers-location>
0469579d
VS
624 <precomp-headers-header>wx/wxprec.h</precomp-headers-header>
625 <precomp-headers>on</precomp-headers>
626 <precomp-headers-file>wxprec_$(id)</precomp-headers-file>
3fe70739 627 <precomp-headers-exclude>
3fe70739 628 src/common/extended.c
3fe70739 629 </precomp-headers-exclude>
cb8bbc13 630 </if>
e2c10c59 631
3a811096 632 <if cond="IS_MSVC_PRJ=='1' and BUILDING_LIB=='1'">
82ca3afe
VS
633 <msvc-file-group>Common Sources:src/common/*</msvc-file-group>
634 <msvc-file-group>MSW Sources:src/msw/*</msvc-file-group>
635 <msvc-file-group>Generic Sources:src/generic/*</msvc-file-group>
636 <msvc-file-group>wxUniv Sources:src/univ/*</msvc-file-group>
637 <msvc-file-group>wxHTML Sources:src/html/*</msvc-file-group>
638 <msvc-file-group>Setup Headers:*/setup.h</msvc-file-group>
82ca3afe
VS
639 <msvc-file-group>MSW Headers:*wx/msw/*.h</msvc-file-group>
640 <msvc-file-group>Generic Headers:*wx/generic/*.h</msvc-file-group>
641 <msvc-file-group>wxUniv Headers:*wx/univ/*.h</msvc-file-group>
642 <msvc-file-group>wxHTML Headers:*wx/html/*.h</msvc-file-group>
cbba971f 643 <msvc-file-group>Common Headers:*wx/*.h</msvc-file-group>
82ca3afe 644 </if>
ddf98968 645 </template>
cb8bbc13 646
c8d58531
MW
647 <if cond="FORMAT=='autoconf'">
648 <set var="RCDEFDIR">
649 <if cond="TOOLKIT=='MSW'">
650 $(LIBDIRNAME)/wx/include/$(TOOLCHAIN_FULLNAME)
651 </if>
652 </set>
653 </if>
654
fab9850d 655 <template id="wx_dll_b" template="wx_lib_b">
ddf98968
VS
656 <set var="WXDLLNAME">$(wxwin.mkDllName(wxid))</set>
657 <dllname>$(WXDLLNAME)</dllname>
658 <version>$(WX_VERSION)</version>
659 <so_version>$(WXSOVERSION)</so_version>
7121be53 660
31da10de
VS
661 <!-- FIXME: until libtool scheme is implemented in bakefile -->
662 <ldflags cond="FORMAT=='autoconf'">$(WXMACVERSION_CMD)</ldflags>
d181c36e
VS
663
664 <!-- version info resources: -->
79a2ea34
VS
665 <res-define>WXDLLNAME=$(WXDLLNAME)</res-define>
666 <if cond="FORMAT=='autoconf'">
667 <res-include>$(RCDEFDIR)</res-include>
668 <res-include>$(TOP_SRCDIR)include</res-include>
19beefa6 669 <postlink-command>$(DYLIB_RPATH_POSTLINK)</postlink-command>
260c165f 670 </if>
102d46f3 671 <win32-res>$(WXTOPDIR)src/msw/version.rc</win32-res>
19beefa6 672
ddf98968 673 </template>
c0608865 674
0bcf9597 675 <template id="wx_3rdparty_dependencies_gui" cond="USE_GUI=='1'">
3fe70739
VS
676 <depends>wxtiff</depends>
677 <depends>wxjpeg</depends>
678 <depends>wxpng</depends>
303a585d 679 <depends>wxscintilla</depends>
0bcf9597
WS
680 </template>
681
682 <template id="wx_3rdparty_dependencies"
683 template="wx_3rdparty_dependencies_gui">
390c0cfb 684 <depends>wxexpat</depends>
c74dc163
VS
685 <depends>wxzlib</depends>
686 <depends>wxregex</depends>
687 </template>
ee929bcf 688
0bcf9597 689 <template id="wx_3rdparty_includes_gui" cond="USE_GUI=='1'">
3442c078 690 <include>$(INC_TIFF_BUILD)</include>
ee929bcf
VS
691 <include>$(INC_TIFF)</include>
692 <include>$(INC_JPEG)</include>
693 <include>$(INC_PNG)</include>
0bcf9597
WS
694 </template>
695
696 <template id="wx_3rdparty_includes"
697 template="wx_3rdparty_includes_gui">
ee929bcf 698 <include>$(INC_ZLIB)</include>
ee929bcf
VS
699 <include>$(INC_REGEX)</include>
700 <include>$(INC_EXPAT)</include>
701 </template>
e2c10c59 702
9698d244
VS
703 <template id="wx_lib"
704 template="wx_lib_b,wx_3rdparty_includes,msvc_setup_h"/>
705 <template id="wx_base_lib"
706 template="wx_lib_b,wx_3rdparty_includes,msvc_setup_h">
e2c10c59 707 <define>wxUSE_GUI=0</define>
15d93f1e
VS
708 </template>
709
ee929bcf
VS
710 <template id="wx_dll"
711 template="wx_dll_b,wx_3rdparty_dependencies,wx_3rdparty_includes"
9698d244 712 template_append="msvc_setup_h,wx_append_nomono"/>
ee929bcf
VS
713 <template id="wx_base_dll"
714 template="wx_dll_b,wx_3rdparty_dependencies,wx_3rdparty_includes"
9698d244 715 template_append="msvc_setup_h,wx_append_base_nomono">
e2c10c59 716 <define>wxUSE_GUI=0</define>
15d93f1e 717 </template>
e2c10c59 718
ae4ae157 719 <!-- =============================================================== -->
77ffb593 720 <!-- Templates for building wxWidgets plugins: -->
ae4ae157
VS
721 <!-- =============================================================== -->
722
ae4ae157 723 <if cond="WX_STABLE_BRANCH=='1'">
c79241a2 724 <set var="PLUGIN_VERSION0">
a1bf307a
RL
725 <if cond="PLATFORM_UNIX=='1'">$(WX_RELEASE)</if>
726 <if cond="PLATFORM_UNIX=='0'">$(WX_RELEASE_NODOT)</if>
ae4ae157
VS
727 </set>
728 </if>
729 <if cond="WX_STABLE_BRANCH=='0'">
c79241a2 730 <set var="PLUGIN_VERSION0">
a1bf307a
RL
731 <if cond="PLATFORM_UNIX=='1'">$(WX_VERSION)</if>
732 <if cond="PLATFORM_UNIX=='0'">$(WX_VERSION_NODOT)</if>
ae4ae157
VS
733 </set>
734 </if>
c79241a2
VS
735 <set var="PLUGVERDELIM">
736 <if cond="PLATFORM_UNIX=='1'">-</if>
737 <if cond="PLATFORM_UNIX=='0'"></if>
738 </set>
739 <set var="PLUGIN_VERSION">$(PLUGVERDELIM)$(PLUGIN_VERSION0)</set>
e2c10c59 740
c79241a2
VS
741 <set var="PLUGINS_INST_DIR" make_var="1">
742 $(LIBDIR)/wx/$(PLUGIN_VERSION0)
743 </set>
ae4ae157
VS
744
745 <define-rule name="wx-base-plugin" extends="module">
746 <template>
747 <dllname>
c6684d42 748 $(id)$(WX_U_D_SUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
ae4ae157
VS
749 </dllname>
750 <define>WXUSINGDLL</define>
15d93f1e 751 <define>wxUSE_GUI=0</define>
c79241a2 752 <install-to>$(PLUGINS_INST_DIR)</install-to>
ae4ae157
VS
753 </template>
754 </define-rule>
e2c10c59 755
ae4ae157
VS
756 <define-rule name="wx-gui-plugin" extends="module">
757 <template template="wx">
758 <dllname>
c6684d42 759 $(id)_$(PORTNAME)$(WXUNIVNAME)$(WX_U_D_SUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
ae4ae157
VS
760 </dllname>
761 <define>WXUSINGDLL</define>
c79241a2 762 <install-to>$(PLUGINS_INST_DIR)</install-to>
ae4ae157
VS
763 </template>
764 </define-rule>
e2c10c59 765
ddf98968 766 <!-- =============================================================== -->
591a3be4 767 <!-- Support for wxWidgets samples: -->
ddf98968
VS
768 <!-- =============================================================== -->
769
770 <!-- Link against one wxWin library. Value must be literal! -->
485a205e 771 <define-tag name="wx-lib" rules="exe,dll,module">
ddf98968 772 <sys-lib>$(wxwin.libToLink(value))</sys-lib>
22cef566 773 <ldlibs>$(wxwin.extraLdflags(value))</ldlibs>
7a4fa569 774 <!-- msvs200?prj formats don't support external dependencies yet: -->
5acf8f1d 775 <if cond="FORMAT in ['msvc6prj','msevc4prj'] and MONOLITHIC=='0'">
dce0742b 776 <depends-on-dsp>$(wxwin.makeDspDependency(value))</depends-on-dsp>
7bd54b68 777 </if>
ddf98968
VS
778 </define-tag>
779
4bae0a94
VS
780
781 <!-- A hack to keep autoconf happy (we pass CPPFLAGS that contain
782 {top_srcdir} from configure, poor bakefile can't know that
783 and won't output top_srcdir = @top_srcdir@ line): -->
784 <set var="VARS_DONT_ELIMINATE" append="1">top_srcdir</set>
785
786
ddf98968 787</makefile>