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