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