6 <requires version=
"0.1.3"/>
8 <!-- bakefile modules we need: -->
9 <using module=
"datafiles"/>
11 <!-- load python module with wxwindows helpers: -->
12 <using module=
"wxwin"/>
14 <include file=
"config.bkl"/>
16 <include file=
"plugins_deps.bkl"/>
18 <!-- ================================================================== -->
19 <!-- wxWindows version numbers: -->
20 <!-- ================================================================== -->
22 <set var=
"WXVER_MAJOR">$(wxwin.getVersionMajor())
</set>
23 <set var=
"WXVER_MINOR">$(wxwin.getVersionMinor())
</set>
24 <set var=
"WXVER_RELEASE">$(wxwin.getVersionRelease())
</set>
25 <set var=
"WX_VERSION" make_var=
"1">
26 $(WXVER_MAJOR).$(WXVER_MINOR).$(WXVER_RELEASE)
29 <set var=
"WX_STABLE_BRANCH">$(int(int(WXVER_MINOR) %
2 ==
0))
</set>
31 <set var=
"WXSOVERSION">
32 <if cond=
"WX_STABLE_BRANCH=='1'">0.0.0</if>
33 <if cond=
"WX_STABLE_BRANCH=='0'">$(WXVER_RELEASE)
.0.0</if>
35 <set var=
"WXMACVERSION">$(WX_VERSION)
</set>
36 <set var=
"WXWIN32DLLVERSION">
37 <if cond=
"WX_STABLE_BRANCH=='1'">$(WXVER_MAJOR)$(WXVER_MINOR)
</if>
38 <if cond=
"WX_STABLE_BRANCH=='0'">$(WXVER_MAJOR)$(WXVER_MINOR)$(WXVER_RELEASE)
</if>
42 <!-- ================================================================== -->
43 <!-- Names of libraries and DLLs: -->
44 <!-- ================================================================== -->
47 <if cond=
"USE_GUI=='0'">base
</if>
48 <if cond=
"USE_GUI=='1'">$(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
</if>
51 <set var=
"WXBASEPORT">
52 <if cond=
"TOOLKIT=='MAC'">_carbon
</if>
55 <set var=
"COMPILERORGCC">
56 <if cond=
"isdefined('COMPILER')">$(COMPILER)
</if>
57 <if cond=
"not isdefined('COMPILER')">gcc
</if>
59 <set var=
"WXCOMPILER">
60 <if cond=
"PLATFORM_WIN32=='1'">_$(COMPILERORGCC)
</if>
64 <if cond=
"PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='1'"></if>
65 <if cond=
"PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='0'">_$(VENDOR)
</if>
68 <set var=
"WXDEBUGFLAG">
69 <if cond=
"BUILD=='debug' and DEBUG_FLAG=='default'">d
</if>
70 <if cond=
"DEBUG_FLAG=='1'">d
</if>
72 <set var=
"WXUNICODEFLAG">
73 <if cond=
"UNICODE=='1'">u
</if>
75 <set var=
"WXNAMESUFFIX">
76 $(WXUNICODEFLAG)$(WXDEBUGFLAG)
79 <set var=
"WXUNIVNAME">
80 <if cond=
"WXUNIV=='1'">univ
</if>
82 <set var=
"WXUNIV_DEFINE">
83 <if cond=
"WXUNIV=='1'">__WXUNIVERSAL__
</if>
86 <if cond=
"FORMAT=='autoconf'">
87 <set var=
"WXNAMEPREFIX">wx_base$(WXBASEPORT)
</set>
88 <set var=
"WXNAMEPREFIXGUI">wx_$(PORTNAME)$(WXUNIVNAME)
</set>
89 <set var=
"WXVERSIONTAG">-$(WXVER_MAJOR).$(WXVER_MINOR)
</set>
91 <if cond=
"FORMAT!='autoconf'">
92 <set var=
"WXNAMEPREFIX">
93 wxbase$(WXBASEPORT)$(WXVER_MAJOR)$(WXVER_MINOR)
95 <set var=
"WXNAMEPREFIXGUI">
96 wx$(PORTNAME)$(WXUNIVNAME)$(WXVER_MAJOR)$(WXVER_MINOR)
</set>
97 <set var=
"WXVERSIONTAG"></set>
99 <set var=
"WXDLLNAMEPREFIX">
100 <if cond=
"PLATFORM_WIN32=='1'">
101 wxbase$(WXBASEPORT)$(WXWIN32DLLVERSION)
103 <if cond=
"PLATFORM_WIN32=='0'">$(WXNAMEPREFIX)
</if>
105 <set var=
"WXDLLNAMEPREFIXGUI">
106 <if cond=
"PLATFORM_WIN32=='1'">
107 wx$(PORTNAME)$(WXUNIVNAME)$(WXWIN32DLLVERSION)
109 <if cond=
"PLATFORM_WIN32=='0'">$(WXNAMEPREFIXGUI)
</if>
111 <set var=
"WXDLLVERSIONTAG">
112 <if cond=
"PLATFORM_WIN32=='1'"></if>
113 <if cond=
"PLATFORM_WIN32=='0'">$(WXVERSIONTAG)
</if>
117 <!-- =============================================================== -->
118 <!-- Names of component libraries: -->
119 <!-- =============================================================== -->
121 <set var=
"WXLIB_BASE">
122 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('base')))
</if>
124 <set var=
"WXLIB_NET">
125 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('net')))
</if>
127 <set var=
"WXLIB_CORE">
128 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))
</if>
130 <set var=
"WXLIB_ADV">
131 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('adv')))
</if>
133 <set var=
"WXLIB_HTML">
134 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('html')))
</if>
136 <set var=
"WXLIB_XML">
137 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xml')))
</if>
139 <set var=
"WXLIB_ODBC">
140 <if cond=
"MONOLITHIC=='0' and USE_ODBC=='1'">
141 $(mk.evalExpr(wxwin.mkLibName('odbc')))
144 <set var=
"WXLIB_DBGRID">
145 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('dbgrid')))
</if>
148 <set var=
"WXLIB_MONO">
149 <if cond=
"MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))
</if>
153 <!-- =============================================================== -->
154 <!-- Where to store built libraries and objects: -->
155 <!-- =============================================================== -->
158 <if cond=
"FORMAT!='autoconf'">
159 <set var=
"WXDLLFLAG">
160 <if cond=
"SHARED=='1'">dll
</if>
162 <set var=
"CFG_NAME_PART">
163 $(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
165 <set var=
"OBJS" make_var=
"1">
166 <if cond=
"FORMAT!='cbuilderx'">$(COMPILER)_$(CFG_NAME_PART)
</if>
167 <!-- FIXME: waiting for removal after CBX has better ../ dirs
169 <if cond=
"FORMAT=='cbuilderx'">build_cbx_$(CFG_NAME_PART)
</if>
172 <set var=
"BUILDDIR">$(OBJS)
</set>
175 <set var=
"LIBDIRNAME" make_var=
"1">
176 <if cond=
"FORMAT=='autoconf'">$(top_builddir)lib
</if>
177 <if cond=
"FORMAT!='autoconf' and SHARED=='0'">
178 $(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER)_lib$(CFG)
180 <if cond=
"FORMAT!='autoconf' and SHARED=='1'">
181 $(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER)_dll$(CFG)
185 <if cond=
"FORMAT!='autoconf'">
186 <set var=
"SETUPHDIR" make_var=
"1">
187 $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
193 <!-- =============================================================== -->
194 <!-- Templates for libs: -->
195 <!-- =============================================================== -->
197 <set var=
"DEBUGINFO">
198 <if cond=
"BUILD=='debug' and DEBUG_INFO=='default'">on
</if>
199 <if cond=
"DEBUG_INFO=='1'">on
</if>
200 <if cond=
"BUILD=='release' and DEBUG_INFO=='default'">off
</if>
201 <if cond=
"DEBUG_INFO=='0'">off
</if>
203 <set var=
"DEBUGRUNTIME">
204 <if cond=
"DEBUG_RUNTIME_LIBS=='default'">$(DEBUGINFO)
</if>
205 <if cond=
"DEBUG_RUNTIME_LIBS=='0'">off
</if>
206 <if cond=
"DEBUG_RUNTIME_LIBS=='1'">on
</if>
208 <set var=
"OPTIMIZEFLAG">
209 <if cond=
"BUILD=='debug'">off
</if>
210 <if cond=
"BUILD=='release'">speed
</if>
212 <set var=
"EXCEPTIONSFLAG">
213 <if cond=
"USE_EXCEPTIONS=='1'">on
</if>
214 <if cond=
"USE_EXCEPTIONS=='0'">off
</if>
217 <set var=
"DEBUG_DEFINE">
218 <if cond=
"FORMAT!='autoconf' and BUILD=='debug' and DEBUG_FLAG=='default'">__WXDEBUG__
</if>
219 <if cond=
"FORMAT!='autoconf' and DEBUG_FLAG=='1'">__WXDEBUG__
</if>
221 <!-- does not cover all cases, but better than nothing -->
222 <set var=
"NO_VC_CRTDBG">
223 <if cond=
"FORMAT=='msvc' and BUILD=='debug' and DEBUG_RUNTIME_LIBS=='0'">__NO_VC_CRTDBG__
</if>
224 <if cond=
"FORMAT=='msvc' and BUILD=='release' and DEBUG_FLAG=='1'">__NO_VC_CRTDBG__
</if>
226 <set var=
"UNICODE_DEFINE">
227 <if cond=
"FORMAT!='autoconf' and UNICODE=='1'">_UNICODE
</if>
230 <set var=
"UNICOWS_LIB">
231 <if cond=
"MSLU=='1'">unicows
</if>
234 <template id=
"common_settings">
235 <debug-info>$(DEBUGINFO)
</debug-info>
236 <debug-runtime-libs>$(DEBUGRUNTIME)
</debug-runtime-libs>
237 <optimize>$(OPTIMIZEFLAG)
</optimize>
238 <threading>multi
</threading>
239 <runtime-libs>$(RUNTIME_LIBS)
</runtime-libs>
240 <cxx-rtti>$(EXCEPTIONSFLAG)
</cxx-rtti>
241 <cxx-exceptions>$(EXCEPTIONSFLAG)
</cxx-exceptions>
242 <if cond=
"FORMAT!='autoconf'">
243 <cppflags>$(EXTRACFLAGS)
</cppflags>
245 <define>$(NO_VC_CRTDBG)
</define>
248 <template id=
"anylib">
249 <dirname>$(LIBDIRNAME)
</dirname>
250 <install-to>$(LIBDIR)
</install-to>
253 <template id=
"3rdparty_lib" template=
"common_settings,anylib">
254 <libname>$(id)$(WXDEBUGFLAG)$(HOST_SUFFIX)
</libname>
256 we want to install 3rd party libs system-wide only with static
257 version of wxWindows; otherwise they are embedded in shared libs:
259 <install-if>SHARED=='
0'
</install-if>
263 <!-- deal with the need to copy setup.h here: -->
265 <define-tag name=
"msvc-headers" rules=
"dll,lib">
266 <if cond=
"FORMAT=='msvc6prj'">
268 $(addPrefixToList('include\', wxwin.headersOnly(value)))
269 </msvc-project-files>
273 <define-tag name=
"msvc-copy-setup-h" rules=
"dll,lib">
274 <if cond=
"FORMAT=='msvc6prj'">
275 <msvc-headers>wx/msw/setup.h
</msvc-headers>
276 <set var=
"__custom_build_files" append=
"1">
277 include\wx\msw\setup.h
279 <set var=
"__custom_build_include_wx_msw_setup_h">
280 Creating $(SETUPHDIR)\wx\setup.h
281 InputPath=..\include\wx\msw\setup.h
283 "$(SETUPHDIR)\wx\setup.h" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)"
284 $(TAB)copy "$(DOLLAR)(InputPath)" $(SETUPHDIR)\wx\setup.h
289 <template id=
"msvc_setup_h">
293 <!-- =============================================================== -->
294 <!-- 3rd party libs: -->
295 <!-- =============================================================== -->
297 <!-- 3rd party libraries: -->
298 <include file=
"regex.bkl"/>
299 <include file=
"zlib.bkl"/>
300 <include file=
"png.bkl"/>
301 <include file=
"jpeg.bkl"/>
302 <include file=
"tiff.bkl"/>
303 <include file=
"odbc.bkl"/>
304 <include file=
"expat.bkl"/>
307 <!-- =============================================================== -->
308 <!-- Templates for wxWindows libs: -->
309 <!-- =============================================================== -->
311 <template id=
"wx" template=
"common_settings">
312 <set var=
"wxid">$(wxwin.mk_wxid(id))
</set>
313 <define>__WX$(TOOLKIT)__
</define>
314 <define>$(WXUNIV_DEFINE)
</define>
315 <define>$(DEBUG_DEFINE)
</define>
316 <define>$(UNICODE_DEFINE)
</define>
317 <!-- this include is added by configure, we need to put other
318 includes before it: -->
319 <include cond=
"FORMAT!='autoconf'">$(TOP_SRCDIR)include
</include>
320 <lib-path>$(LIBDIRNAME)
</lib-path>
321 <include cond=
"FORMAT!='autoconf'">$(SETUPHDIR)
</include>
322 <warnings>max
</warnings>
325 <!-- for both GUI and wxBase libs/samples: -->
326 <template id=
"wx_append_base_nomono">
327 <!-- link against builtin 3rd party libs, if needed: -->
328 <sys-lib>$(LIB_TIFF)
</sys-lib>
329 <sys-lib>$(LIB_JPEG)
</sys-lib>
330 <sys-lib>$(LIB_PNG)
</sys-lib>
331 <sys-lib>$(LIB_ZLIB)
</sys-lib>
332 <sys-lib>$(LIB_ODBC)
</sys-lib>
333 <sys-lib>$(LIB_REGEX)
</sys-lib>
334 <sys-lib>$(LIB_EXPAT)
</sys-lib>
336 <ldlibs>$(EXTRALIBS)
</ldlibs>
338 <!-- system libraries on windows: -->
339 <if cond=
"FORMAT!='autoconf'">
340 <sys-lib>$(UNICOWS_LIB)
</sys-lib>
341 <if cond=
"FORMAT=='borland'">
342 <sys-lib>ole2w32
</sys-lib>
344 <if cond=
"FORMAT!='borland'">
345 <sys-lib>kernel32
</sys-lib>
346 <sys-lib>user32
</sys-lib>
347 <sys-lib>gdi32
</sys-lib>
348 <sys-lib>comdlg32
</sys-lib>
349 <sys-lib>winspool
</sys-lib>
350 <sys-lib>winmm
</sys-lib>
351 <sys-lib>shell32
</sys-lib>
352 <sys-lib>comctl32
</sys-lib>
353 <sys-lib>ole32
</sys-lib>
354 <sys-lib>oleaut32
</sys-lib>
355 <sys-lib>uuid
</sys-lib>
356 <sys-lib>rpcrt4
</sys-lib>
357 <sys-lib>advapi32
</sys-lib>
358 <sys-lib>wsock32
</sys-lib>
360 <if cond=
"FORMAT=='msvc' or FORMAT=='msvc6prj' or FORMAT=='borland'">
361 <sys-lib>oleacc
</sys-lib>
363 <sys-lib>odbc32
</sys-lib>
368 <!-- for GUI libs/samples: -->
369 <template id=
"wx_append_nomono" template=
"wx_append_base_nomono">
370 <ldlibs>$(EXTRALIBS_GUI)
</ldlibs>
374 <template id=
"wx_append_base" template_append=
"wx_append_base_nomono">
375 <!-- Always link against the wxWin library in monolithic build: -->
376 <sys-lib>$(WXLIB_MONO)
</sys-lib>
378 <template id=
"wx_append" template_append=
"wx_append_nomono">
379 <!-- Always link against the wxWin library in monolithic build: -->
380 <sys-lib>$(WXLIB_MONO)
</sys-lib>
384 <set var=
"WX_DISABLE_PRECOMP_HEADERS" overwrite=
"0">0</set>
386 <template id=
"wx_lib_b" template=
"wx,anylib">
387 <set var=
"WXLIBNAME">$(wxwin.mkLibName(wxid))
</set>
388 <libname>$(WXLIBNAME)
</libname>
390 <if cond=
"WX_DISABLE_PRECOMP_HEADERS=='0'">
391 <if cond=
"FORMAT!='autoconf'">
392 <sources>$(WXTOPDIR)src/msw/dummy.cpp
</sources>
393 <precomp-headers-gen>
394 $(WXTOPDIR)src/msw/dummy.cpp
395 </precomp-headers-gen>
397 <precomp-headers-header>wx/wxprec.h
</precomp-headers-header>
398 <precomp-headers>on
</precomp-headers>
399 <precomp-headers-file>wxprec_$(id)
</precomp-headers-file>
400 <precomp-headers-exclude>
402 src/common/extended.c
405 </precomp-headers-exclude>
408 <if cond=
"FORMAT=='msvc6prj' and BUILDING_LIB=='1'">
409 <msvc-file-group>Common Sources:src/common/*
</msvc-file-group>
410 <msvc-file-group>MSW Sources:src/msw/*
</msvc-file-group>
411 <msvc-file-group>Generic Sources:src/generic/*
</msvc-file-group>
412 <msvc-file-group>wxUniv Sources:src/univ/*
</msvc-file-group>
413 <msvc-file-group>wxHTML Sources:src/html/*
</msvc-file-group>
414 <msvc-file-group>Setup Headers:*/setup.h
</msvc-file-group>
415 <msvc-file-group>MSW Headers:*wx/msw/*.h
</msvc-file-group>
416 <msvc-file-group>Generic Headers:*wx/generic/*.h
</msvc-file-group>
417 <msvc-file-group>wxUniv Headers:*wx/univ/*.h
</msvc-file-group>
418 <msvc-file-group>wxHTML Headers:*wx/html/*.h
</msvc-file-group>
419 <msvc-file-group>Common Headers:*wx/*.h
</msvc-file-group>
423 <template id=
"wx_dll_b" template=
"wx_lib_b">
424 <set var=
"WXDLLNAME">$(wxwin.mkDllName(wxid))
</set>
425 <dllname>$(WXDLLNAME)
</dllname>
426 <version>$(WX_VERSION)
</version>
427 <so_version>$(WXSOVERSION)
</so_version>
428 <mac_version>$(WXMACVERSION)
</mac_version>
431 <template id=
"wx_3rdparty_dependencies">
432 <depends>wxtiff
</depends>
433 <depends>wxjpeg
</depends>
434 <depends>wxpng
</depends>
435 <depends>wxexpat
</depends>
436 <depends>wxzlib
</depends>
437 <depends cond=
"FORMAT=='autoconf'">wxodbc
</depends>
438 <depends>wxregex
</depends>
441 <template id=
"wx_3rdparty_includes">
442 <include>$(INC_TIFF)
</include>
443 <include>$(INC_JPEG)
</include>
444 <include>$(INC_PNG)
</include>
445 <include>$(INC_ZLIB)
</include>
446 <include>$(INC_ODBC)
</include>
447 <include>$(INC_REGEX)
</include>
448 <include>$(INC_EXPAT)
</include>
451 <template id=
"wx_lib"
452 template=
"wx_lib_b,wx_3rdparty_includes,msvc_setup_h"/>
453 <template id=
"wx_base_lib"
454 template=
"wx_lib_b,wx_3rdparty_includes,msvc_setup_h">
455 <define>wxUSE_GUI=
0</define>
458 <template id=
"wx_dll"
459 template=
"wx_dll_b,wx_3rdparty_dependencies,wx_3rdparty_includes"
460 template_append=
"msvc_setup_h,wx_append_nomono"/>
461 <template id=
"wx_base_dll"
462 template=
"wx_dll_b,wx_3rdparty_dependencies,wx_3rdparty_includes"
463 template_append=
"msvc_setup_h,wx_append_base_nomono">
464 <define>wxUSE_GUI=
0</define>
467 <!-- =============================================================== -->
468 <!-- Templates for building wxWindows plugins: -->
469 <!-- =============================================================== -->
471 <if cond=
"WX_STABLE_BRANCH=='1'">
472 <set var=
"PLUGIN_VERSION0">
473 <if cond=
"PLATFORM_UNIX=='1'">
474 $(WXVER_MAJOR).$(WXVER_MINOR)
476 <if cond=
"PLATFORM_UNIX=='0'">
477 $(WXVER_MAJOR)$(WXVER_MINOR)
481 <if cond=
"WX_STABLE_BRANCH=='0'">
482 <set var=
"PLUGIN_VERSION0">
483 <if cond=
"PLATFORM_UNIX=='1'">
484 $(WXVER_MAJOR).$(WXVER_MINOR).$(WXVER_RELEASE)
486 <if cond=
"PLATFORM_UNIX=='0'">
487 $(WXVER_MAJOR)$(WXVER_MINOR)$(WXVER_RELEASE)
491 <set var=
"PLUGVERDELIM">
492 <if cond=
"PLATFORM_UNIX=='1'">-
</if>
493 <if cond=
"PLATFORM_UNIX=='0'"></if>
495 <set var=
"PLUGIN_VERSION">$(PLUGVERDELIM)$(PLUGIN_VERSION0)
</set>
497 <set var=
"PLUGINSUFFIX">
498 <if cond=
"UNICODE=='0' and BUILD=='release'"></if>
499 <if cond=
"UNICODE=='0' and BUILD=='debug'">_d
</if>
500 <if cond=
"UNICODE=='1' and BUILD=='release'">_u
</if>
501 <if cond=
"UNICODE=='1' and BUILD=='debug'">_ud
</if>
504 <set var=
"PLUGINS_INST_DIR" make_var=
"1">
505 $(LIBDIR)/wx/$(PLUGIN_VERSION0)
508 <define-rule name=
"wx-base-plugin" extends=
"module">
511 $(id)$(PLUGINSUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
513 <define>WXUSINGDLL
</define>
514 <define>wxUSE_GUI=
0</define>
515 <install-to>$(PLUGINS_INST_DIR)
</install-to>
519 <define-rule name=
"wx-gui-plugin" extends=
"module">
520 <template template=
"wx">
522 $(id)_$(PORTNAME)$(WXUNIVNAME)$(PLUGINSUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
524 <define>WXUSINGDLL
</define>
525 <install-to>$(PLUGINS_INST_DIR)
</install-to>
529 <!-- =============================================================== -->
530 <!-- Support for wxWindows samples and contrib: -->
531 <!-- =============================================================== -->
533 <!-- Link against one wxWin library. Value must be literal! -->
534 <define-tag name=
"wx-lib" rules=
"exe,dll,module">
535 <sys-lib>$(wxwin.libToLink(value))
</sys-lib>
536 <ldlibs>$(wxwin.extraLdflags(value))
</ldlibs>
537 <if cond=
"FORMAT=='msvc6prj' and MONOLITHIC=='0'">
538 <depends-on-dsp>$(wxwin.makeDspDependency(value))
</depends-on-dsp>
543 <!-- A hack to keep autoconf happy (we pass CPPFLAGS that contain
544 {top_srcdir} from configure, poor bakefile can't know that
545 and won't output top_srcdir = @top_srcdir@ line): -->
546 <set var=
"VARS_DONT_ELIMINATE" append=
"1">top_srcdir
</set>