6 <!-- bakefile modules we need: -->
7 <using module=
"datafiles"/>
9 <!-- load python module with wxwindows helpers: -->
10 <using module=
"wxwin"/>
12 <include file=
"config.bkl"/>
14 <include file=
"plugins_deps.bkl"/>
16 <!-- ================================================================== -->
17 <!-- wxWindows version numbers: -->
18 <!-- ================================================================== -->
20 <set var=
"WXVER_MAJOR">$(wxwin.getVersionMajor())
</set>
21 <set var=
"WXVER_MINOR">$(wxwin.getVersionMinor())
</set>
22 <set var=
"WXVER_RELEASE">$(wxwin.getVersionRelease())
</set>
23 <set var=
"WX_VERSION" make_var=
"1">
24 $(WXVER_MAJOR).$(WXVER_MINOR).$(WXVER_RELEASE)
27 <set var=
"WX_STABLE_BRANCH">$(int(int(WXVER_MINOR) %
2 ==
0))
</set>
29 <set var=
"WXSOVERSION">
30 <if cond=
"WX_STABLE_BRANCH=='1'">0.0.0</if>
31 <if cond=
"WX_STABLE_BRANCH=='0'">$(WXVER_RELEASE)
.0.0</if>
33 <set var=
"WXMACVERSION">$(WX_VERSION)
</set>
34 <set var=
"WXWIN32DLLVERSION">
35 <if cond=
"WX_STABLE_BRANCH=='1'">$(WXVER_MAJOR)$(WXVER_MINOR)
</if>
36 <if cond=
"WX_STABLE_BRANCH=='0'">$(WXVER_MAJOR)$(WXVER_MINOR)$(WXVER_RELEASE)
</if>
40 <!-- ================================================================== -->
41 <!-- Names of libraries and DLLs: -->
42 <!-- ================================================================== -->
45 <if cond=
"USE_GUI=='0'">base
</if>
46 <if cond=
"USE_GUI=='1'">$(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
</if>
49 <set var=
"WXBASEPORT">
50 <if cond=
"TOOLKIT=='MAC'">_carbon
</if>
53 <set var=
"COMPILERORGCC">
54 <if cond=
"isdefined('COMPILER')">$(COMPILER)
</if>
55 <if cond=
"not isdefined('COMPILER')">gcc
</if>
57 <set var=
"WXCOMPILER">
58 <if cond=
"PLATFORM_WIN32=='1'">_$(COMPILERORGCC)
</if>
62 <if cond=
"PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='1'"></if>
63 <if cond=
"PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='0'">_$(VENDOR)
</if>
66 <set var=
"WXDEBUGFLAG">
67 <if cond=
"BUILD=='debug' and DEBUG_FLAG=='default'">d
</if>
68 <if cond=
"DEBUG_FLAG=='1'">d
</if>
70 <set var=
"WXUNICODEFLAG">
71 <if cond=
"UNICODE=='1'">u
</if>
73 <set var=
"WXNAMESUFFIX">
74 $(WXUNICODEFLAG)$(WXDEBUGFLAG)
77 <set var=
"WXUNIVNAME">
78 <if cond=
"WXUNIV=='1'">univ
</if>
80 <set var=
"WXUNIV_DEFINE">
81 <if cond=
"WXUNIV=='1'">__WXUNIVERSAL__
</if>
84 <if cond=
"FORMAT=='autoconf'">
85 <set var=
"WXNAMEPREFIX">wx_base$(WXBASEPORT)
</set>
86 <set var=
"WXNAMEPREFIXGUI">wx_$(PORTNAME)$(WXUNIVNAME)
</set>
87 <set var=
"WXVERSIONTAG">-$(WXVER_MAJOR).$(WXVER_MINOR)
</set>
89 <if cond=
"FORMAT!='autoconf'">
90 <set var=
"WXNAMEPREFIX">
91 wxbase$(WXBASEPORT)$(WXVER_MAJOR)$(WXVER_MINOR)
93 <set var=
"WXNAMEPREFIXGUI">
94 wx$(PORTNAME)$(WXUNIVNAME)$(WXVER_MAJOR)$(WXVER_MINOR)
</set>
95 <set var=
"WXVERSIONTAG"></set>
97 <set var=
"WXDLLNAMEPREFIX">
98 <if cond=
"PLATFORM_WIN32=='1'">
99 wxbase$(WXBASEPORT)$(WXWIN32DLLVERSION)
101 <if cond=
"PLATFORM_WIN32=='0'">$(WXNAMEPREFIX)
</if>
103 <set var=
"WXDLLNAMEPREFIXGUI">
104 <if cond=
"PLATFORM_WIN32=='1'">
105 wx$(PORTNAME)$(WXUNIVNAME)$(WXWIN32DLLVERSION)
107 <if cond=
"PLATFORM_WIN32=='0'">$(WXNAMEPREFIXGUI)
</if>
109 <set var=
"WXDLLVERSIONTAG">
110 <if cond=
"PLATFORM_WIN32=='1'"></if>
111 <if cond=
"PLATFORM_WIN32=='0'">$(WXVERSIONTAG)
</if>
115 <!-- =============================================================== -->
116 <!-- Names of component libraries: -->
117 <!-- =============================================================== -->
119 <set var=
"WXLIB_BASE">
120 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('base')))
</if>
122 <set var=
"WXLIB_NET">
123 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('net')))
</if>
125 <set var=
"WXLIB_CORE">
126 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))
</if>
128 <set var=
"WXLIB_ADV">
129 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('adv')))
</if>
131 <set var=
"WXLIB_HTML">
132 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('html')))
</if>
134 <set var=
"WXLIB_XML">
135 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xml')))
</if>
137 <set var=
"WXLIB_ODBC">
138 <if cond=
"MONOLITHIC=='0' and USE_ODBC=='1'">
139 $(mk.evalExpr(wxwin.mkLibName('odbc')))
142 <set var=
"WXLIB_DBGRID">
143 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('dbgrid')))
</if>
146 <set var=
"WXLIB_MONO">
147 <if cond=
"MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))
</if>
151 <!-- =============================================================== -->
152 <!-- Where to store built libraries and objects: -->
153 <!-- =============================================================== -->
156 <if cond=
"FORMAT!='autoconf'">
157 <set var=
"WXDLLFLAG">
158 <if cond=
"SHARED=='1'">dll
</if>
160 <set var=
"CFG_NAME_PART">
161 $(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
163 <set var=
"OBJS" make_var=
"1">
164 <if cond=
"FORMAT!='cbuilderx'">$(COMPILER)_$(CFG_NAME_PART)
</if>
165 <!-- FIXME: waiting for removal after CBX has better ../ dirs
167 <if cond=
"FORMAT=='cbuilderx'">build_cbx_$(CFG_NAME_PART)
</if>
170 <set var=
"BUILDDIR">$(OBJS)
</set>
173 <set var=
"LIBDIRNAME" make_var=
"1">
174 <if cond=
"FORMAT=='autoconf'">$(top_builddir)lib
</if>
175 <if cond=
"FORMAT!='autoconf' and SHARED=='0'">
176 $(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER)_lib$(CFG)
178 <if cond=
"FORMAT!='autoconf' and SHARED=='1'">
179 $(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER)_dll$(CFG)
183 <if cond=
"FORMAT!='autoconf'">
184 <set var=
"SETUPHDIR" make_var=
"1">
185 $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
191 <!-- =============================================================== -->
192 <!-- Templates for libs: -->
193 <!-- =============================================================== -->
195 <set var=
"DEBUGINFO">
196 <if cond=
"BUILD=='debug' and DEBUG_INFO=='default'">on
</if>
197 <if cond=
"DEBUG_INFO=='1'">on
</if>
198 <if cond=
"BUILD=='release' and DEBUG_INFO=='default'">off
</if>
199 <if cond=
"DEBUG_INFO=='0'">off
</if>
201 <set var=
"DEBUGRUNTIME">
202 <if cond=
"DEBUG_RUNTIME_LIBS=='default'">$(DEBUGINFO)
</if>
203 <if cond=
"DEBUG_RUNTIME_LIBS=='0'">off
</if>
204 <if cond=
"DEBUG_RUNTIME_LIBS=='1'">on
</if>
206 <set var=
"OPTIMIZEFLAG">
207 <if cond=
"BUILD=='debug'">off
</if>
208 <if cond=
"BUILD=='release'">speed
</if>
210 <set var=
"EXCEPTIONSFLAG">
211 <if cond=
"USE_EXCEPTIONS=='1'">on
</if>
212 <if cond=
"USE_EXCEPTIONS=='0'">off
</if>
215 <set var=
"DEBUG_DEFINE">
216 <if cond=
"FORMAT!='autoconf' and BUILD=='debug' and DEBUG_FLAG=='default'">__WXDEBUG__
</if>
217 <if cond=
"FORMAT!='autoconf' and DEBUG_FLAG=='1'">__WXDEBUG__
</if>
219 <!-- does not cover all cases, but better than nothing -->
220 <set var=
"NO_VC_CRTDBG">
221 <if cond=
"FORMAT=='msvc' and BUILD=='debug' and DEBUG_RUNTIME_LIBS=='0'">__NO_VC_CRTDBG__
</if>
222 <if cond=
"FORMAT=='msvc' and BUILD=='release' and DEBUG_FLAG=='1'">__NO_VC_CRTDBG__
</if>
224 <set var=
"UNICODE_DEFINE">
225 <if cond=
"FORMAT!='autoconf' and UNICODE=='1'">_UNICODE
</if>
228 <set var=
"UNICOWS_LIB">
229 <if cond=
"MSLU=='1'">unicows
</if>
232 <template id=
"common_settings">
233 <debug-info>$(DEBUGINFO)
</debug-info>
234 <debug-runtime-libs>$(DEBUGRUNTIME)
</debug-runtime-libs>
235 <optimize>$(OPTIMIZEFLAG)
</optimize>
236 <threading>multi
</threading>
237 <runtime-libs>$(RUNTIME_LIBS)
</runtime-libs>
238 <cxx-rtti>$(EXCEPTIONSFLAG)
</cxx-rtti>
239 <cxx-exceptions>$(EXCEPTIONSFLAG)
</cxx-exceptions>
240 <if cond=
"FORMAT!='autoconf'">
241 <cppflags>$(EXTRACFLAGS)
</cppflags>
243 <define>$(NO_VC_CRTDBG)
</define>
246 <template id=
"anylib">
247 <dirname>$(LIBDIRNAME)
</dirname>
248 <install-to>$(LIBDIR)
</install-to>
251 <template id=
"3rdparty_lib" template=
"common_settings,anylib">
252 <libname>$(id)$(WXDEBUGFLAG)$(HOST_SUFFIX)
</libname>
254 we want to install 3rd party libs system-wide only with static
255 version of wxWindows; otherwise they are embedded in shared libs:
257 <install-if>SHARED=='
0'
</install-if>
261 <!-- deal with the need to copy setup.h here: -->
263 <define-tag name=
"msvc-headers" rules=
"dll,lib">
264 <if cond=
"FORMAT=='msvc6prj'">
266 $(addPrefixToList('include\', wxwin.headersOnly(value)))
267 </msvc-project-files>
271 <define-tag name=
"msvc-copy-setup-h" rules=
"dll,lib">
272 <if cond=
"FORMAT=='msvc6prj'">
273 <msvc-headers>wx/msw/setup.h
</msvc-headers>
274 <set var=
"__custom_build_files" append=
"1">
275 include\wx\msw\setup.h
277 <set var=
"__custom_build_include_wx_msw_setup_h">
278 Creating $(SETUPHDIR)\wx\setup.h
279 InputPath=..\include\wx\msw\setup.h
281 "$(SETUPHDIR)\wx\setup.h" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)"
282 $(TAB)copy "$(DOLLAR)(InputPath)" $(SETUPHDIR)\wx\setup.h
287 <template id=
"msvc_setup_h">
291 <!-- =============================================================== -->
292 <!-- 3rd party libs: -->
293 <!-- =============================================================== -->
295 <!-- 3rd party libraries: -->
296 <include file=
"regex.bkl"/>
297 <include file=
"zlib.bkl"/>
298 <include file=
"png.bkl"/>
299 <include file=
"jpeg.bkl"/>
300 <include file=
"tiff.bkl"/>
301 <include file=
"odbc.bkl"/>
302 <include file=
"expat.bkl"/>
305 <!-- =============================================================== -->
306 <!-- Templates for wxWindows libs: -->
307 <!-- =============================================================== -->
309 <template id=
"wx" template=
"common_settings">
310 <set var=
"wxid">$(wxwin.mk_wxid(id))
</set>
311 <define>__WX$(TOOLKIT)__
</define>
312 <define>$(WXUNIV_DEFINE)
</define>
313 <define>$(DEBUG_DEFINE)
</define>
314 <define>$(UNICODE_DEFINE)
</define>
315 <!-- this include is added by configure, we need to put other
316 includes before it: -->
317 <include cond=
"FORMAT!='autoconf'">$(TOP_SRCDIR)include
</include>
318 <lib-path>$(LIBDIRNAME)
</lib-path>
319 <include cond=
"FORMAT!='autoconf'">$(SETUPHDIR)
</include>
320 <warnings>max
</warnings>
323 <!-- for both GUI and wxBase libs/samples: -->
324 <template id=
"wx_append_base_nomono">
325 <!-- link against builtin 3rd party libs, if needed: -->
326 <sys-lib>$(LIB_TIFF)
</sys-lib>
327 <sys-lib>$(LIB_JPEG)
</sys-lib>
328 <sys-lib>$(LIB_PNG)
</sys-lib>
329 <sys-lib>$(LIB_ZLIB)
</sys-lib>
330 <sys-lib>$(LIB_ODBC)
</sys-lib>
331 <sys-lib>$(LIB_REGEX)
</sys-lib>
332 <sys-lib>$(LIB_EXPAT)
</sys-lib>
334 <ldlibs>$(EXTRALIBS)
</ldlibs>
336 <!-- system libraries on windows: -->
337 <if cond=
"FORMAT!='autoconf'">
338 <sys-lib>$(UNICOWS_LIB)
</sys-lib>
339 <if cond=
"FORMAT=='borland'">
340 <sys-lib>ole2w32
</sys-lib>
342 <if cond=
"FORMAT!='borland'">
343 <sys-lib>kernel32
</sys-lib>
344 <sys-lib>user32
</sys-lib>
345 <sys-lib>gdi32
</sys-lib>
346 <sys-lib>comdlg32
</sys-lib>
347 <sys-lib>winspool
</sys-lib>
348 <sys-lib>winmm
</sys-lib>
349 <sys-lib>shell32
</sys-lib>
350 <sys-lib>comctl32
</sys-lib>
351 <sys-lib>ole32
</sys-lib>
352 <sys-lib>oleaut32
</sys-lib>
353 <sys-lib>uuid
</sys-lib>
354 <sys-lib>rpcrt4
</sys-lib>
355 <sys-lib>advapi32
</sys-lib>
356 <sys-lib>wsock32
</sys-lib>
358 <if cond=
"FORMAT=='msvc' or FORMAT=='msvc6prj' or FORMAT=='borland'">
359 <sys-lib>oleacc
</sys-lib>
361 <sys-lib>odbc32
</sys-lib>
366 <!-- for GUI libs/samples: -->
367 <template id=
"wx_append_nomono" template=
"wx_append_base_nomono">
368 <ldlibs>$(EXTRALIBS_GUI)
</ldlibs>
372 <template id=
"wx_append_base" template_append=
"wx_append_base_nomono">
373 <!-- Always link against the wxWin library in monolithic build: -->
374 <sys-lib>$(WXLIB_MONO)
</sys-lib>
376 <template id=
"wx_append" template_append=
"wx_append_nomono">
377 <!-- Always link against the wxWin library in monolithic build: -->
378 <sys-lib>$(WXLIB_MONO)
</sys-lib>
382 <set var=
"WX_DISABLE_PRECOMP_HEADERS" overwrite=
"0">0</set>
384 <template id=
"wx_lib_b" template=
"wx,anylib">
385 <set var=
"WXLIBNAME">$(wxwin.mkLibName(wxid))
</set>
386 <libname>$(WXLIBNAME)
</libname>
388 <if cond=
"WX_DISABLE_PRECOMP_HEADERS=='0'">
389 <if cond=
"FORMAT!='autoconf'">
390 <sources>$(WXTOPDIR)src/msw/dummy.cpp
</sources>
391 <precomp-headers-gen>
392 $(WXTOPDIR)src/msw/dummy.cpp
393 </precomp-headers-gen>
395 <precomp-headers-header>wx/wxprec.h
</precomp-headers-header>
396 <precomp-headers>on
</precomp-headers>
397 <precomp-headers-file>wxprec_$(id)
</precomp-headers-file>
398 <precomp-headers-exclude>
400 src/common/extended.c
403 </precomp-headers-exclude>
406 <if cond=
"FORMAT=='msvc6prj' and BUILDING_LIB=='1'">
407 <msvc-file-group>Common Sources:src/common/*
</msvc-file-group>
408 <msvc-file-group>MSW Sources:src/msw/*
</msvc-file-group>
409 <msvc-file-group>Generic Sources:src/generic/*
</msvc-file-group>
410 <msvc-file-group>wxUniv Sources:src/univ/*
</msvc-file-group>
411 <msvc-file-group>wxHTML Sources:src/html/*
</msvc-file-group>
412 <msvc-file-group>Setup Headers:*/setup.h
</msvc-file-group>
413 <msvc-file-group>MSW Headers:*wx/msw/*.h
</msvc-file-group>
414 <msvc-file-group>Generic Headers:*wx/generic/*.h
</msvc-file-group>
415 <msvc-file-group>wxUniv Headers:*wx/univ/*.h
</msvc-file-group>
416 <msvc-file-group>wxHTML Headers:*wx/html/*.h
</msvc-file-group>
417 <msvc-file-group>Common Headers:*wx/*.h
</msvc-file-group>
421 <template id=
"wx_dll_b" template=
"wx_lib_b">
422 <set var=
"WXDLLNAME">$(wxwin.mkDllName(wxid))
</set>
423 <dllname>$(WXDLLNAME)
</dllname>
424 <version>$(WX_VERSION)
</version>
425 <so_version>$(WXSOVERSION)
</so_version>
426 <mac_version>$(WXMACVERSION)
</mac_version>
429 <template id=
"wx_3rdparty_dependencies">
430 <depends>wxtiff
</depends>
431 <depends>wxjpeg
</depends>
432 <depends>wxpng
</depends>
433 <depends>wxexpat
</depends>
434 <depends>wxzlib
</depends>
435 <depends cond=
"FORMAT=='autoconf'">wxodbc
</depends>
436 <depends>wxregex
</depends>
439 <template id=
"wx_3rdparty_includes">
440 <include>$(INC_TIFF)
</include>
441 <include>$(INC_JPEG)
</include>
442 <include>$(INC_PNG)
</include>
443 <include>$(INC_ZLIB)
</include>
444 <include>$(INC_ODBC)
</include>
445 <include>$(INC_REGEX)
</include>
446 <include>$(INC_EXPAT)
</include>
449 <template id=
"wx_lib"
450 template=
"wx_lib_b,wx_3rdparty_includes,msvc_setup_h"/>
451 <template id=
"wx_base_lib"
452 template=
"wx_lib_b,wx_3rdparty_includes,msvc_setup_h">
453 <define>wxUSE_GUI=
0</define>
456 <template id=
"wx_dll"
457 template=
"wx_dll_b,wx_3rdparty_dependencies,wx_3rdparty_includes"
458 template_append=
"msvc_setup_h,wx_append_nomono"/>
459 <template id=
"wx_base_dll"
460 template=
"wx_dll_b,wx_3rdparty_dependencies,wx_3rdparty_includes"
461 template_append=
"msvc_setup_h,wx_append_base_nomono">
462 <define>wxUSE_GUI=
0</define>
465 <!-- =============================================================== -->
466 <!-- Templates for building wxWindows plugins: -->
467 <!-- =============================================================== -->
469 <if cond=
"WX_STABLE_BRANCH=='1'">
470 <set var=
"PLUGIN_VERSION0">
471 <if cond=
"PLATFORM_UNIX=='1'">
472 $(WXVER_MAJOR).$(WXVER_MINOR)
474 <if cond=
"PLATFORM_UNIX=='0'">
475 $(WXVER_MAJOR)$(WXVER_MINOR)
479 <if cond=
"WX_STABLE_BRANCH=='0'">
480 <set var=
"PLUGIN_VERSION0">
481 <if cond=
"PLATFORM_UNIX=='1'">
482 $(WXVER_MAJOR).$(WXVER_MINOR).$(WXVER_RELEASE)
484 <if cond=
"PLATFORM_UNIX=='0'">
485 $(WXVER_MAJOR)$(WXVER_MINOR)$(WXVER_RELEASE)
489 <set var=
"PLUGVERDELIM">
490 <if cond=
"PLATFORM_UNIX=='1'">-
</if>
491 <if cond=
"PLATFORM_UNIX=='0'"></if>
493 <set var=
"PLUGIN_VERSION">$(PLUGVERDELIM)$(PLUGIN_VERSION0)
</set>
495 <set var=
"PLUGINSUFFIX">
496 <if cond=
"UNICODE=='0' and BUILD=='release'"></if>
497 <if cond=
"UNICODE=='0' and BUILD=='debug'">_d
</if>
498 <if cond=
"UNICODE=='1' and BUILD=='release'">_u
</if>
499 <if cond=
"UNICODE=='1' and BUILD=='debug'">_ud
</if>
502 <set var=
"PLUGINS_INST_DIR" make_var=
"1">
503 $(LIBDIR)/wx/$(PLUGIN_VERSION0)
506 <define-rule name=
"wx-base-plugin" extends=
"module">
509 $(id)$(PLUGINSUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
511 <define>WXUSINGDLL
</define>
512 <define>wxUSE_GUI=
0</define>
513 <install-to>$(PLUGINS_INST_DIR)
</install-to>
517 <define-rule name=
"wx-gui-plugin" extends=
"module">
518 <template template=
"wx">
520 $(id)_$(PORTNAME)$(WXUNIVNAME)$(PLUGINSUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
522 <define>WXUSINGDLL
</define>
523 <install-to>$(PLUGINS_INST_DIR)
</install-to>
527 <!-- =============================================================== -->
528 <!-- Support for wxWindows samples and contrib: -->
529 <!-- =============================================================== -->
531 <!-- Link against one wxWin library. Value must be literal! -->
532 <define-tag name=
"wx-lib" rules=
"exe,dll,module">
533 <sys-lib>$(wxwin.libToLink(value))
</sys-lib>
534 <ldlibs>$(wxwin.extraLdflags(value))
</ldlibs>
535 <if cond=
"FORMAT=='msvc6prj' and MONOLITHIC=='0'">
536 <depends-on-dsp>$(wxwin.makeDspDependency(value))
</depends-on-dsp>
541 <!-- A hack to keep autoconf happy (we pass CPPFLAGS that contain
542 {top_srcdir} from configure, poor bakefile can't know that
543 and won't output top_srcdir = @top_srcdir@ line): -->
544 <set var=
"VARS_DONT_ELIMINATE" append=
"1">top_srcdir
</set>