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">$(WXVER_MAJOR).$(WXVER_MINOR).$(WXVER_RELEASE)
</set>
24 <set var=
"WX_STABLE_BRANCH">$(int(int(WXVER_MINOR) %
2 ==
0))
</set>
26 <set var=
"WXSOVERSION">
27 <if cond=
"WX_STABLE_BRANCH=='1'">0.0.0</if>
28 <if cond=
"WX_STABLE_BRANCH=='0'">$(WXVER_RELEASE)
.0.0</if>
30 <set var=
"WXMACVERSION">$(WX_VERSION)
</set>
31 <set var=
"WXWIN32DLLVERSION">
32 <if cond=
"WX_STABLE_BRANCH=='1'">$(WXVER_MAJOR)$(WXVER_MINOR)
</if>
33 <if cond=
"WX_STABLE_BRANCH=='0'">$(WXVER_MAJOR)$(WXVER_MINOR)$(WXVER_RELEASE)
</if>
37 <!-- ================================================================== -->
38 <!-- Names of libraries and DLLs: -->
39 <!-- ================================================================== -->
42 <if cond=
"USE_GUI=='0'">base
</if>
43 <if cond=
"USE_GUI=='1'">$(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
</if>
46 <set var=
"WXBASEPORT">
47 <if cond=
"TOOLKIT=='MAC'">_carbon
</if>
50 <set var=
"COMPILERORGCC">
51 <if cond=
"isdefined('COMPILER')">$(COMPILER)
</if>
52 <if cond=
"not isdefined('COMPILER')">gcc
</if>
54 <set var=
"WXCOMPILER">
55 <if cond=
"PLATFORM_WIN32=='1'">_$(COMPILERORGCC)
</if>
59 <if cond=
"PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='1'"></if>
60 <if cond=
"PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='0'">_$(VENDOR)
</if>
63 <set var=
"WXDEBUGFLAG">
64 <if cond=
"BUILD=='debug' and DEBUG_FLAG=='default'">d
</if>
65 <if cond=
"DEBUG_FLAG=='1'">d
</if>
67 <set var=
"WXUNICODEFLAG">
68 <if cond=
"UNICODE=='1'">u
</if>
70 <set var=
"WXNAMESUFFIX">
71 $(WXUNICODEFLAG)$(WXDEBUGFLAG)
74 <set var=
"WXUNIVNAME">
75 <if cond=
"WXUNIV=='1'">univ
</if>
77 <set var=
"WXUNIV_DEFINE">
78 <if cond=
"WXUNIV=='1'">__WXUNIVERSAL__
</if>
81 <if cond=
"FORMAT=='autoconf'">
82 <set var=
"WXNAMEPREFIX">wx_base$(WXBASEPORT)
</set>
83 <set var=
"WXNAMEPREFIXGUI">wx_$(PORTNAME)$(WXUNIVNAME)
</set>
84 <set var=
"WXVERSIONTAG">-$(WXVER_MAJOR).$(WXVER_MINOR)
</set>
86 <if cond=
"FORMAT!='autoconf'">
87 <set var=
"WXNAMEPREFIX">
88 wxbase$(WXBASEPORT)$(WXVER_MAJOR)$(WXVER_MINOR)
90 <set var=
"WXNAMEPREFIXGUI">
91 wx$(PORTNAME)$(WXUNIVNAME)$(WXVER_MAJOR)$(WXVER_MINOR)
</set>
92 <set var=
"WXVERSIONTAG"></set>
94 <set var=
"WXDLLNAMEPREFIX">
95 <if cond=
"PLATFORM_WIN32=='1'">
96 wxbase$(WXBASEPORT)$(WXWIN32DLLVERSION)
98 <if cond=
"PLATFORM_WIN32=='0'">$(WXNAMEPREFIX)
</if>
100 <set var=
"WXDLLNAMEPREFIXGUI">
101 <if cond=
"PLATFORM_WIN32=='1'">
102 wx$(PORTNAME)$(WXUNIVNAME)$(WXWIN32DLLVERSION)
104 <if cond=
"PLATFORM_WIN32=='0'">$(WXNAMEPREFIXGUI)
</if>
106 <set var=
"WXDLLVERSIONTAG">
107 <if cond=
"PLATFORM_WIN32=='1'"></if>
108 <if cond=
"PLATFORM_WIN32=='0'">$(WXVERSIONTAG)
</if>
112 <!-- =============================================================== -->
113 <!-- Names of component libraries: -->
114 <!-- =============================================================== -->
116 <set var=
"WXLIB_BASE">
117 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('base')))
</if>
119 <set var=
"WXLIB_NET">
120 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('net')))
</if>
122 <set var=
"WXLIB_CORE">
123 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))
</if>
125 <set var=
"WXLIB_ADV">
126 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('adv')))
</if>
128 <set var=
"WXLIB_HTML">
129 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('html')))
</if>
131 <set var=
"WXLIB_XML">
132 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xml')))
</if>
134 <set var=
"WXLIB_ODBC">
135 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('odbc')))
</if>
137 <set var=
"WXLIB_DBGRID">
138 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('dbgrid')))
</if>
141 <set var=
"WXLIB_MONO">
142 <if cond=
"MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))
</if>
146 <!-- =============================================================== -->
147 <!-- Where to store built libraries and objects: -->
148 <!-- =============================================================== -->
151 <if cond=
"FORMAT!='autoconf'">
152 <set var=
"WXDLLFLAG">
153 <if cond=
"SHARED=='1'">dll
</if>
155 <set var=
"CFG_NAME_PART">
156 $(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
158 <set var=
"OBJS" make_var=
"1">$(COMPILER)_$(CFG_NAME_PART)
</set>
159 <set var=
"BUILDDIR">$(OBJS)
</set>
162 <set var=
"LIBDIRNAME" make_var=
"1">
163 <if cond=
"FORMAT=='autoconf'">$(top_builddir)lib
</if>
164 <if cond=
"FORMAT!='autoconf'">
165 $(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER)_$(CFG_NAME_PART)
170 <!-- =============================================================== -->
171 <!-- Templates for libs: -->
172 <!-- =============================================================== -->
174 <set var=
"DEBUGINFO">
175 <if cond=
"BUILD=='debug' and DEBUG_INFO=='default'">on
</if>
176 <if cond=
"DEBUG_INFO=='1'">on
</if>
177 <if cond=
"BUILD=='release' and DEBUG_INFO=='default'">off
</if>
178 <if cond=
"DEBUG_INFO=='0'">off
</if>
180 <set var=
"DEBUGRUNTIME">
181 <if cond=
"DEBUG_RUNTIME_LIBS=='default'">$(DEBUGINFO)
</if>
182 <if cond=
"DEBUG_RUNTIME_LIBS=='0'">off
</if>
183 <if cond=
"DEBUG_RUNTIME_LIBS=='1'">on
</if>
185 <set var=
"OPTIMIZEFLAG">
186 <if cond=
"BUILD=='debug'">off
</if>
187 <if cond=
"BUILD=='release'">speed
</if>
190 <set var=
"DEBUG_DEFINE">
191 <if cond=
"FORMAT!='autoconf' and BUILD=='debug' and DEBUG_FLAG=='default'">__WXDEBUG__
</if>
192 <if cond=
"FORMAT!='autoconf' and DEBUG_FLAG=='1'">__WXDEBUG__
</if>
194 <set var=
"UNICODE_DEFINE">
195 <if cond=
"FORMAT!='autoconf' and UNICODE=='1'">wxUSE_UNICODE=
1</if>
198 <set var=
"UNICOWS_LIB">
199 <if cond=
"MSLU=='1'">unicows
</if>
202 <template id=
"common_settings">
203 <debug-info>$(DEBUGINFO)
</debug-info>
204 <debug-runtime-libs>$(DEBUGRUNTIME)
</debug-runtime-libs>
205 <optimize>$(OPTIMIZEFLAG)
</optimize>
206 <threading>multi
</threading>
207 <runtime-libs>$(RUNTIME_LIBS)
</runtime-libs>
208 <if cond=
"FORMAT!='autoconf'">
209 <cppflags>$(EXTRACFLAGS)
</cppflags>
213 <template id=
"anylib">
214 <dirname>$(LIBDIRNAME)
</dirname>
215 <install-to>$(LIBDIR)
</install-to>
218 <template id=
"3rdparty_lib" template=
"common_settings,anylib">
219 <libname>$(id)$(WXDEBUGFLAG)$(HOST_SUFFIX)
</libname>
221 we want to install 3rd party libs system-wide only with static
222 version of wxWindows; otherwise they are embedded in shared libs:
224 <install-if>SHARED=='
0'
</install-if>
228 <!-- =============================================================== -->
229 <!-- 3rd party libs: -->
230 <!-- =============================================================== -->
232 <!-- 3rd party libraries: -->
233 <include file=
"regex.bkl"/>
234 <include file=
"zlib.bkl"/>
235 <include file=
"png.bkl"/>
236 <include file=
"jpeg.bkl"/>
237 <include file=
"tiff.bkl"/>
238 <include file=
"odbc.bkl"/>
239 <include file=
"expat.bkl"/>
242 <!-- =============================================================== -->
243 <!-- Templates for wxWindows libs: -->
244 <!-- =============================================================== -->
246 <template id=
"wx" template=
"common_settings">
247 <set var=
"wxid">$(wxwin.mk_wxid(id))
</set>
248 <define>__WX$(TOOLKIT)__
</define>
249 <define>$(WXUNIV_DEFINE)
</define>
250 <define>$(DEBUG_DEFINE)
</define>
251 <define>$(UNICODE_DEFINE)
</define>
252 <include>$(TOP_SRCDIR)include
</include>
253 <lib-path>$(LIBDIRNAME)
</lib-path>
254 <include cond=
"FORMAT!='autoconf'">$(LIBDIRNAME)
</include>
255 <include>$(INC_TIFF)
</include>
256 <include>$(INC_JPEG)
</include>
257 <include>$(INC_PNG)
</include>
258 <include>$(INC_ZLIB)
</include>
259 <include>$(INC_ODBC)
</include>
260 <include>$(INC_REGEX)
</include>
261 <include>$(INC_EXPAT)
</include>
264 <!-- for both GUI and wxBase libs/samples: -->
265 <template id=
"wx_append_base_nomono">
266 <!-- link against builtin 3rd party libs, if needed: -->
267 <sys-lib>$(LIB_TIFF)
</sys-lib>
268 <sys-lib>$(LIB_JPEG)
</sys-lib>
269 <sys-lib>$(LIB_PNG)
</sys-lib>
270 <sys-lib>$(LIB_ZLIB)
</sys-lib>
271 <sys-lib>$(LIB_ODBC)
</sys-lib>
272 <sys-lib>$(LIB_REGEX)
</sys-lib>
273 <sys-lib>$(LIB_EXPAT)
</sys-lib>
275 <ldlibs>$(EXTRALIBS)
</ldlibs>
277 <!-- system libraries on windows: -->
278 <if cond=
"FORMAT!='autoconf'">
279 <sys-lib>$(UNICOWS_LIB)
</sys-lib>
280 <if cond=
"COMPILER=='bcc'">
281 <sys-lib>import32
</sys-lib>
282 <sys-lib>ole2w32
</sys-lib>
284 <if cond=
"COMPILER!='bcc'">
285 <sys-lib>kernel32
</sys-lib>
286 <sys-lib>user32
</sys-lib>
287 <sys-lib>gdi32
</sys-lib>
288 <sys-lib>comdlg32
</sys-lib>
289 <sys-lib>winspool
</sys-lib>
290 <sys-lib>winmm
</sys-lib>
291 <sys-lib>shell32
</sys-lib>
292 <sys-lib>comctl32
</sys-lib>
293 <sys-lib>odbc32
</sys-lib>
294 <sys-lib>ole32
</sys-lib>
295 <sys-lib>oleaut32
</sys-lib>
296 <sys-lib>uuid
</sys-lib>
297 <sys-lib>rpcrt4
</sys-lib>
298 <sys-lib>advapi32
</sys-lib>
299 <sys-lib>wsock32
</sys-lib>
304 <define-tag name=
"msvc-headers" rules=
"dll,lib">
305 <if cond=
"FORMAT=='msvc6prj'">
307 $(addPrefixToList('include\', wxwin.headersOnly(value)))
308 </msvc-project-files>
312 <define-tag name=
"msvc-copy-setup-h" rules=
"dll,lib">
313 <if cond=
"FORMAT=='msvc6prj'">
314 <msvc-headers>wx/msw/setup.h
</msvc-headers>
315 <set var=
"__custom_build_files" append=
"1">
316 include\wx\msw\setup.h
318 <set var=
"__custom_build_include_wx_msw_setup_h">
319 Creating $(LIBDIRNAME)\wx\setup.h
320 InputPath=..\include\wx\msw\setup.h
322 "$(LIBDIRNAME)\wx\setup.h" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)"
323 $(TAB)copy "$(DOLLAR)(InputPath)" $(LIBDIRNAME)\wx\setup.h
329 <!-- for GUI libs/samples: -->
330 <template id=
"wx_append_nomono" template=
"wx_append_base_nomono">
331 <ldlibs>$(EXTRALIBS_GUI)
</ldlibs>
335 <template id=
"wx_append_base" template_append=
"wx_append_base_nomono">
336 <!-- Always link against the wxWin library in monolithic build: -->
337 <sys-lib>$(WXLIB_MONO)
</sys-lib>
339 <template id=
"wx_append" template_append=
"wx_append_nomono">
340 <!-- Always link against the wxWin library in monolithic build: -->
341 <sys-lib>$(WXLIB_MONO)
</sys-lib>
345 <set var=
"WX_DISABLE_PRECOMP_HEADERS" overwrite=
"0">0</set>
347 <template id=
"wx_lib_b" template=
"wx,anylib">
348 <set var=
"WXLIBNAME">$(wxwin.mkLibName(wxid))
</set>
349 <libname>$(WXLIBNAME)
</libname>
351 <if cond=
"WX_DISABLE_PRECOMP_HEADERS=='0'">
352 <if cond=
"FORMAT!='autoconf'">
353 <sources>$(WXTOPDIR)src/msw/dummy.cpp
</sources>
354 <precomp-headers-gen>
355 $(WXTOPDIR)src/msw/dummy.cpp
356 </precomp-headers-gen>
358 <precomp-headers-header>wx/wxprec.h
</precomp-headers-header>
359 <precomp-headers>on
</precomp-headers>
360 <precomp-headers-file>wxprec_$(id)
</precomp-headers-file>
361 <precomp-headers-exclude>
363 src/common/extended.c
366 </precomp-headers-exclude>
369 <if cond=
"FORMAT=='msvc6prj' and BUILDING_LIB=='1'">
370 <msvc-file-group>Common Sources:src/common/*
</msvc-file-group>
371 <msvc-file-group>MSW Sources:src/msw/*
</msvc-file-group>
372 <msvc-file-group>Generic Sources:src/generic/*
</msvc-file-group>
373 <msvc-file-group>wxUniv Sources:src/univ/*
</msvc-file-group>
374 <msvc-file-group>wxHTML Sources:src/html/*
</msvc-file-group>
375 <msvc-file-group>Setup Headers:*/setup.h
</msvc-file-group>
376 <msvc-file-group>MSW Headers:*wx/msw/*.h
</msvc-file-group>
377 <msvc-file-group>Generic Headers:*wx/generic/*.h
</msvc-file-group>
378 <msvc-file-group>wxUniv Headers:*wx/univ/*.h
</msvc-file-group>
379 <msvc-file-group>wxHTML Headers:*wx/html/*.h
</msvc-file-group>
380 <msvc-file-group>Common Headers:*wx/*.h
</msvc-file-group>
384 <template id=
"wx_dll_b" template=
"wx_lib_b">
385 <set var=
"WXDLLNAME">$(wxwin.mkDllName(wxid))
</set>
386 <dllname>$(WXDLLNAME)
</dllname>
387 <version>$(WX_VERSION)
</version>
388 <so_version>$(WXSOVERSION)
</so_version>
389 <mac_version>$(WXMACVERSION)
</mac_version>
392 <template id=
"wx_3rdparty_dependencies">
393 <depends>wxtiff
</depends>
394 <depends>wxjpeg
</depends>
395 <depends>wxpng
</depends>
396 <depends>wxexpat
</depends>
397 <depends>wxzlib
</depends>
398 <depends cond=
"FORMAT=='autoconf'">wxodbc
</depends>
399 <depends>wxregex
</depends>
402 <template id=
"wx_lib" template=
"wx_lib_b"/>
403 <template id=
"wx_base_lib" template=
"wx_lib_b">
404 <define>wxUSE_GUI=
0</define>
407 <template id=
"wx_dll" template=
"wx_dll_b,wx_3rdparty_dependencies"
408 template_append=
"wx_append_nomono"/>
409 <template id=
"wx_base_dll" template=
"wx_dll_b,wx_3rdparty_dependencies"
410 template_append=
"wx_append_base_nomono">
411 <define>wxUSE_GUI=
0</define>
414 <!-- =============================================================== -->
415 <!-- Templates for building wxWindows plugins: -->
416 <!-- =============================================================== -->
418 <if cond=
"WX_STABLE_BRANCH=='1'">
419 <set var=
"PLUGIN_VERSION">
420 <if cond=
"PLATFORM_UNIX=='1'">
421 -$(WXVER_MAJOR).$(WXVER_MINOR)
423 <if cond=
"PLATFORM_UNIX=='0'">
424 $(WXVER_MAJOR)$(WXVER_MINOR)
428 <if cond=
"WX_STABLE_BRANCH=='0'">
429 <set var=
"PLUGIN_VERSION">
430 <if cond=
"PLATFORM_UNIX=='1'">
431 -$(WXVER_MAJOR).$(WXVER_MINOR).$(WXVER_RELEASE)
433 <if cond=
"PLATFORM_UNIX=='0'">
434 $(WXVER_MAJOR)$(WXVER_MINOR)$(WXVER_RELEASE)
439 <define-rule name=
"wx-base-plugin" extends=
"module">
442 $(id)$(addPrefixIfNotEmpty('_',WXNAMESUFFIX))$(PLUGIN_VERSION)
444 <define>WXUSINGDLL
</define>
445 <define>wxUSE_GUI=
0</define>
449 <define-rule name=
"wx-gui-plugin" extends=
"module">
450 <template template=
"wx">
452 $(id)_$(PORTNAME)$(WXUNIVNAME)$(WXNAMESUFFIX)$(PLUGIN_VERSION)
454 <define>WXUSINGDLL
</define>
458 <!-- =============================================================== -->
459 <!-- Support for wxWindows samples and contrib: -->
460 <!-- =============================================================== -->
462 <!-- Link against one wxWin library. Value must be literal! -->
463 <define-tag name=
"wx-lib" rules=
"exe,dll,module">
464 <sys-lib>$(wxwin.libToLink(value))
</sys-lib>
465 <if cond=
"FORMAT=='msvc6prj' and MONOLITHIC=='0'">
466 <depends-on-dsp>$(wxwin.makeDspDependency(value))
</depends-on-dsp>