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"/>
15 <!-- ================================================================== -->
16 <!-- wxWindows version numbers: -->
17 <!-- ================================================================== -->
19 <set var=
"WXVER_MAJOR">$(wxwin.getVersionMajor())
</set>
20 <set var=
"WXVER_MINOR">$(wxwin.getVersionMinor())
</set>
21 <set var=
"WXVER_RELEASE">$(wxwin.getVersionRelease())
</set>
22 <set var=
"WX_VERSION" make_var=
"1">
23 $(WXVER_MAJOR).$(WXVER_MINOR).$(WXVER_RELEASE)
26 <set var=
"WX_STABLE_BRANCH">$(int(int(WXVER_MINOR) %
2 ==
0))
</set>
28 <set var=
"WXSOVERSION">
29 <if cond=
"WX_STABLE_BRANCH=='1'">0.0.0</if>
30 <if cond=
"WX_STABLE_BRANCH=='0'">$(WXVER_RELEASE)
.0.0</if>
32 <set var=
"WXMACVERSION">$(WX_VERSION)
</set>
33 <set var=
"WXWIN32DLLVERSION">
34 <if cond=
"WX_STABLE_BRANCH=='1'">$(WXVER_MAJOR)$(WXVER_MINOR)
</if>
35 <if cond=
"WX_STABLE_BRANCH=='0'">$(WXVER_MAJOR)$(WXVER_MINOR)$(WXVER_RELEASE)
</if>
39 <!-- ================================================================== -->
40 <!-- Names of libraries and DLLs: -->
41 <!-- ================================================================== -->
44 <if cond=
"USE_GUI=='0'">base
</if>
45 <if cond=
"USE_GUI=='1'">$(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
</if>
48 <set var=
"WXBASEPORT">
49 <if cond=
"TOOLKIT=='MAC'">_carbon
</if>
52 <set var=
"COMPILERORGCC">
53 <if cond=
"isdefined('COMPILER')">$(COMPILER)
</if>
54 <if cond=
"not isdefined('COMPILER')">gcc
</if>
56 <set var=
"WXCOMPILER">
57 <if cond=
"PLATFORM_WIN32=='1'">_$(COMPILERORGCC)
</if>
61 <if cond=
"PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='1'"></if>
62 <if cond=
"PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='0'">_$(VENDOR)
</if>
65 <set var=
"WXDEBUGFLAG">
66 <if cond=
"BUILD=='debug' and DEBUG_FLAG=='default'">d
</if>
67 <if cond=
"DEBUG_FLAG=='1'">d
</if>
69 <set var=
"WXUNICODEFLAG">
70 <if cond=
"UNICODE=='1'">u
</if>
72 <set var=
"WXNAMESUFFIX">
73 $(WXUNICODEFLAG)$(WXDEBUGFLAG)
76 <set var=
"WXUNIVNAME">
77 <if cond=
"WXUNIV=='1'">univ
</if>
79 <set var=
"WXUNIV_DEFINE">
80 <if cond=
"WXUNIV=='1'">__WXUNIVERSAL__
</if>
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">-$(WXVER_MAJOR).$(WXVER_MINOR)
</set>
88 <if cond=
"FORMAT!='autoconf'">
89 <set var=
"WXNAMEPREFIX">
90 wxbase$(WXBASEPORT)$(WXVER_MAJOR)$(WXVER_MINOR)
92 <set var=
"WXNAMEPREFIXGUI">
93 wx$(PORTNAME)$(WXUNIVNAME)$(WXVER_MAJOR)$(WXVER_MINOR)
</set>
94 <set var=
"WXVERSIONTAG"></set>
96 <set var=
"WXDLLNAMEPREFIX">
97 <if cond=
"PLATFORM_WIN32=='1'">
98 wxbase$(WXBASEPORT)$(WXWIN32DLLVERSION)
100 <if cond=
"PLATFORM_WIN32=='0'">$(WXNAMEPREFIX)
</if>
102 <set var=
"WXDLLNAMEPREFIXGUI">
103 <if cond=
"PLATFORM_WIN32=='1'">
104 wx$(PORTNAME)$(WXUNIVNAME)$(WXWIN32DLLVERSION)
106 <if cond=
"PLATFORM_WIN32=='0'">$(WXNAMEPREFIXGUI)
</if>
108 <set var=
"WXDLLVERSIONTAG">
109 <if cond=
"PLATFORM_WIN32=='1'"></if>
110 <if cond=
"PLATFORM_WIN32=='0'">$(WXVERSIONTAG)
</if>
114 <!-- =============================================================== -->
115 <!-- Names of component libraries: -->
116 <!-- =============================================================== -->
118 <set var=
"WXLIB_BASE">
119 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('base')))
</if>
121 <set var=
"WXLIB_NET">
122 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('net')))
</if>
124 <set var=
"WXLIB_CORE">
125 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))
</if>
127 <set var=
"WXLIB_ADV">
128 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('adv')))
</if>
130 <set var=
"WXLIB_HTML">
131 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('html')))
</if>
133 <set var=
"WXLIB_XML">
134 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xml')))
</if>
136 <set var=
"WXLIB_ODBC">
137 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('odbc')))
</if>
139 <set var=
"WXLIB_DBGRID">
140 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('dbgrid')))
</if>
143 <set var=
"WXLIB_MONO">
144 <if cond=
"MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))
</if>
148 <!-- =============================================================== -->
149 <!-- Where to store built libraries and objects: -->
150 <!-- =============================================================== -->
153 <if cond=
"FORMAT!='autoconf'">
154 <set var=
"WXDLLFLAG">
155 <if cond=
"SHARED=='1'">dll
</if>
157 <set var=
"CFG_NAME_PART">
158 $(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
160 <set var=
"OBJS" make_var=
"1">$(COMPILER)_$(CFG_NAME_PART)
</set>
161 <set var=
"BUILDDIR">$(OBJS)
</set>
164 <set var=
"LIBDIRNAME" make_var=
"1">
165 <if cond=
"FORMAT=='autoconf'">$(top_builddir)lib
</if>
166 <if cond=
"FORMAT!='autoconf' and SHARED=='0'">
167 $(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER)_lib$(CFG)
169 <if cond=
"FORMAT!='autoconf' and SHARED=='1'">
170 $(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER)_dll$(CFG)
174 <if cond=
"FORMAT!='autoconf'">
175 <set var=
"SETUPHDIR" make_var=
"1">
176 $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
182 <!-- =============================================================== -->
183 <!-- Templates for libs: -->
184 <!-- =============================================================== -->
186 <set var=
"DEBUGINFO">
187 <if cond=
"BUILD=='debug' and DEBUG_INFO=='default'">on
</if>
188 <if cond=
"DEBUG_INFO=='1'">on
</if>
189 <if cond=
"BUILD=='release' and DEBUG_INFO=='default'">off
</if>
190 <if cond=
"DEBUG_INFO=='0'">off
</if>
192 <set var=
"DEBUGRUNTIME">
193 <if cond=
"DEBUG_RUNTIME_LIBS=='default'">$(DEBUGINFO)
</if>
194 <if cond=
"DEBUG_RUNTIME_LIBS=='0'">off
</if>
195 <if cond=
"DEBUG_RUNTIME_LIBS=='1'">on
</if>
197 <set var=
"OPTIMIZEFLAG">
198 <if cond=
"BUILD=='debug'">off
</if>
199 <if cond=
"BUILD=='release'">speed
</if>
202 <set var=
"DEBUG_DEFINE">
203 <if cond=
"FORMAT!='autoconf' and BUILD=='debug' and DEBUG_FLAG=='default'">__WXDEBUG__
</if>
204 <if cond=
"FORMAT!='autoconf' and DEBUG_FLAG=='1'">__WXDEBUG__
</if>
206 <set var=
"UNICODE_DEFINE">
207 <if cond=
"FORMAT!='autoconf' and UNICODE=='1'">_UNICODE
</if>
210 <set var=
"UNICOWS_LIB">
211 <if cond=
"MSLU=='1'">unicows
</if>
214 <template id=
"common_settings">
215 <debug-info>$(DEBUGINFO)
</debug-info>
216 <debug-runtime-libs>$(DEBUGRUNTIME)
</debug-runtime-libs>
217 <optimize>$(OPTIMIZEFLAG)
</optimize>
218 <threading>multi
</threading>
219 <runtime-libs>$(RUNTIME_LIBS)
</runtime-libs>
220 <if cond=
"FORMAT!='autoconf'">
221 <cppflags>$(EXTRACFLAGS)
</cppflags>
225 <template id=
"anylib">
226 <dirname>$(LIBDIRNAME)
</dirname>
227 <install-to>$(LIBDIR)
</install-to>
230 <template id=
"3rdparty_lib" template=
"common_settings,anylib">
231 <libname>$(id)$(WXDEBUGFLAG)$(HOST_SUFFIX)
</libname>
233 we want to install 3rd party libs system-wide only with static
234 version of wxWindows; otherwise they are embedded in shared libs:
236 <install-if>SHARED=='
0'
</install-if>
240 <!-- =============================================================== -->
241 <!-- 3rd party libs: -->
242 <!-- =============================================================== -->
244 <!-- 3rd party libraries: -->
245 <include file=
"regex.bkl"/>
246 <include file=
"zlib.bkl"/>
247 <include file=
"png.bkl"/>
248 <include file=
"jpeg.bkl"/>
249 <include file=
"tiff.bkl"/>
250 <include file=
"odbc.bkl"/>
251 <include file=
"expat.bkl"/>
254 <!-- =============================================================== -->
255 <!-- Templates for wxWindows libs: -->
256 <!-- =============================================================== -->
258 <template id=
"wx" template=
"common_settings">
259 <set var=
"wxid">$(wxwin.mk_wxid(id))
</set>
260 <define>__WX$(TOOLKIT)__
</define>
261 <define>$(WXUNIV_DEFINE)
</define>
262 <define>$(DEBUG_DEFINE)
</define>
263 <define>$(UNICODE_DEFINE)
</define>
264 <include>$(TOP_SRCDIR)include
</include>
265 <lib-path>$(LIBDIRNAME)
</lib-path>
266 <include cond=
"FORMAT!='autoconf'">$(SETUPHDIR)
</include>
267 <warnings>max
</warnings>
270 <!-- for both GUI and wxBase libs/samples: -->
271 <template id=
"wx_append_base_nomono">
272 <!-- link against builtin 3rd party libs, if needed: -->
273 <sys-lib>$(LIB_TIFF)
</sys-lib>
274 <sys-lib>$(LIB_JPEG)
</sys-lib>
275 <sys-lib>$(LIB_PNG)
</sys-lib>
276 <sys-lib>$(LIB_ZLIB)
</sys-lib>
277 <sys-lib>$(LIB_ODBC)
</sys-lib>
278 <sys-lib>$(LIB_REGEX)
</sys-lib>
279 <sys-lib>$(LIB_EXPAT)
</sys-lib>
281 <ldlibs>$(EXTRALIBS)
</ldlibs>
283 <!-- system libraries on windows: -->
284 <if cond=
"FORMAT!='autoconf'">
285 <sys-lib>$(UNICOWS_LIB)
</sys-lib>
286 <if cond=
"COMPILER=='bcc'">
287 <sys-lib>ole2w32
</sys-lib>
289 <if cond=
"COMPILER!='bcc'">
290 <sys-lib>kernel32
</sys-lib>
291 <sys-lib>user32
</sys-lib>
292 <sys-lib>gdi32
</sys-lib>
293 <sys-lib>comdlg32
</sys-lib>
294 <sys-lib>winspool
</sys-lib>
295 <sys-lib>winmm
</sys-lib>
296 <sys-lib>shell32
</sys-lib>
297 <sys-lib>comctl32
</sys-lib>
298 <sys-lib>odbc32
</sys-lib>
299 <sys-lib>ole32
</sys-lib>
300 <sys-lib>oleaut32
</sys-lib>
301 <sys-lib>uuid
</sys-lib>
302 <sys-lib>rpcrt4
</sys-lib>
303 <sys-lib>advapi32
</sys-lib>
304 <sys-lib>wsock32
</sys-lib>
306 <if cond=
"COMPILER=='vc' or COMPILER=='bcc'">
307 <sys-lib>oleacc
</sys-lib>
312 <define-tag name=
"msvc-headers" rules=
"dll,lib">
313 <if cond=
"FORMAT=='msvc6prj'">
315 $(addPrefixToList('include\', wxwin.headersOnly(value)))
316 </msvc-project-files>
320 <define-tag name=
"msvc-copy-setup-h" rules=
"dll,lib">
321 <if cond=
"FORMAT=='msvc6prj'">
322 <msvc-headers>wx/msw/setup.h
</msvc-headers>
323 <set var=
"__custom_build_files" append=
"1">
324 include\wx\msw\setup.h
326 <set var=
"__custom_build_include_wx_msw_setup_h">
327 Creating $(SETUPHDIR)\wx\setup.h
328 InputPath=..\include\wx\msw\setup.h
330 "$(SETUPHDIR)\wx\setup.h" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)"
331 $(TAB)copy "$(DOLLAR)(InputPath)" $(SETUPHDIR)\wx\setup.h
337 <!-- for GUI libs/samples: -->
338 <template id=
"wx_append_nomono" template=
"wx_append_base_nomono">
339 <ldlibs>$(EXTRALIBS_GUI)
</ldlibs>
343 <template id=
"wx_append_base" template_append=
"wx_append_base_nomono">
344 <!-- Always link against the wxWin library in monolithic build: -->
345 <sys-lib>$(WXLIB_MONO)
</sys-lib>
347 <template id=
"wx_append" template_append=
"wx_append_nomono">
348 <!-- Always link against the wxWin library in monolithic build: -->
349 <sys-lib>$(WXLIB_MONO)
</sys-lib>
353 <set var=
"WX_DISABLE_PRECOMP_HEADERS" overwrite=
"0">0</set>
355 <template id=
"wx_lib_b" template=
"wx,anylib">
356 <set var=
"WXLIBNAME">$(wxwin.mkLibName(wxid))
</set>
357 <libname>$(WXLIBNAME)
</libname>
359 <if cond=
"WX_DISABLE_PRECOMP_HEADERS=='0'">
360 <if cond=
"FORMAT!='autoconf'">
361 <sources>$(WXTOPDIR)src/msw/dummy.cpp
</sources>
362 <precomp-headers-gen>
363 $(WXTOPDIR)src/msw/dummy.cpp
364 </precomp-headers-gen>
366 <precomp-headers-header>wx/wxprec.h
</precomp-headers-header>
367 <precomp-headers>on
</precomp-headers>
368 <precomp-headers-file>wxprec_$(id)
</precomp-headers-file>
369 <precomp-headers-exclude>
371 src/common/extended.c
374 </precomp-headers-exclude>
377 <if cond=
"FORMAT=='msvc6prj' and BUILDING_LIB=='1'">
378 <msvc-file-group>Common Sources:src/common/*
</msvc-file-group>
379 <msvc-file-group>MSW Sources:src/msw/*
</msvc-file-group>
380 <msvc-file-group>Generic Sources:src/generic/*
</msvc-file-group>
381 <msvc-file-group>wxUniv Sources:src/univ/*
</msvc-file-group>
382 <msvc-file-group>wxHTML Sources:src/html/*
</msvc-file-group>
383 <msvc-file-group>Setup Headers:*/setup.h
</msvc-file-group>
384 <msvc-file-group>MSW Headers:*wx/msw/*.h
</msvc-file-group>
385 <msvc-file-group>Generic Headers:*wx/generic/*.h
</msvc-file-group>
386 <msvc-file-group>wxUniv Headers:*wx/univ/*.h
</msvc-file-group>
387 <msvc-file-group>wxHTML Headers:*wx/html/*.h
</msvc-file-group>
388 <msvc-file-group>Common Headers:*wx/*.h
</msvc-file-group>
392 <template id=
"wx_dll_b" template=
"wx_lib_b">
393 <set var=
"WXDLLNAME">$(wxwin.mkDllName(wxid))
</set>
394 <dllname>$(WXDLLNAME)
</dllname>
395 <version>$(WX_VERSION)
</version>
396 <so_version>$(WXSOVERSION)
</so_version>
397 <mac_version>$(WXMACVERSION)
</mac_version>
400 <template id=
"wx_3rdparty_dependencies">
401 <depends>wxtiff
</depends>
402 <depends>wxjpeg
</depends>
403 <depends>wxpng
</depends>
404 <depends>wxexpat
</depends>
405 <depends>wxzlib
</depends>
406 <depends cond=
"FORMAT=='autoconf'">wxodbc
</depends>
407 <depends>wxregex
</depends>
410 <template id=
"wx_3rdparty_includes">
411 <include>$(INC_TIFF)
</include>
412 <include>$(INC_JPEG)
</include>
413 <include>$(INC_PNG)
</include>
414 <include>$(INC_ZLIB)
</include>
415 <include>$(INC_ODBC)
</include>
416 <include>$(INC_REGEX)
</include>
417 <include>$(INC_EXPAT)
</include>
420 <template id=
"msvc_setup_h">
424 <template id=
"wx_lib"
425 template=
"wx_lib_b,wx_3rdparty_includes,msvc_setup_h"/>
426 <template id=
"wx_base_lib"
427 template=
"wx_lib_b,wx_3rdparty_includes,msvc_setup_h">
428 <define>wxUSE_GUI=
0</define>
431 <template id=
"wx_dll"
432 template=
"wx_dll_b,wx_3rdparty_dependencies,wx_3rdparty_includes"
433 template_append=
"msvc_setup_h,wx_append_nomono"/>
434 <template id=
"wx_base_dll"
435 template=
"wx_dll_b,wx_3rdparty_dependencies,wx_3rdparty_includes"
436 template_append=
"msvc_setup_h,wx_append_base_nomono">
437 <define>wxUSE_GUI=
0</define>
440 <!-- =============================================================== -->
441 <!-- Templates for building wxWindows plugins: -->
442 <!-- =============================================================== -->
444 <if cond=
"WX_STABLE_BRANCH=='1'">
445 <set var=
"PLUGIN_VERSION">
446 <if cond=
"PLATFORM_UNIX=='1'">
447 -$(WXVER_MAJOR).$(WXVER_MINOR)
449 <if cond=
"PLATFORM_UNIX=='0'">
450 $(WXVER_MAJOR)$(WXVER_MINOR)
454 <if cond=
"WX_STABLE_BRANCH=='0'">
455 <set var=
"PLUGIN_VERSION">
456 <if cond=
"PLATFORM_UNIX=='1'">
457 -$(WXVER_MAJOR).$(WXVER_MINOR).$(WXVER_RELEASE)
459 <if cond=
"PLATFORM_UNIX=='0'">
460 $(WXVER_MAJOR)$(WXVER_MINOR)$(WXVER_RELEASE)
465 <define-rule name=
"wx-base-plugin" extends=
"module">
468 $(id)$(addPrefixIfNotEmpty('_',WXNAMESUFFIX))$(PLUGIN_VERSION)$(WXCOMPILER)
470 <define>WXUSINGDLL
</define>
471 <define>wxUSE_GUI=
0</define>
475 <define-rule name=
"wx-gui-plugin" extends=
"module">
476 <template template=
"wx">
478 $(id)_$(PORTNAME)$(WXUNIVNAME)$(WXNAMESUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
480 <define>WXUSINGDLL
</define>
484 <!-- =============================================================== -->
485 <!-- Support for wxWindows samples and contrib: -->
486 <!-- =============================================================== -->
488 <!-- Link against one wxWin library. Value must be literal! -->
489 <define-tag name=
"wx-lib" rules=
"exe,dll,module">
490 <sys-lib>$(wxwin.libToLink(value))
</sys-lib>
491 <ldlibs>$(wxwin.extraLdflags(value))
</ldlibs>
492 <if cond=
"FORMAT=='msvc6prj' and MONOLITHIC=='0'">
493 <depends-on-dsp>$(wxwin.makeDspDependency(value))
</depends-on-dsp>