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'">d
</if>
66 <set var=
"WXUNICODEFLAG">
67 <if cond=
"UNICODE=='1'">u
</if>
69 <set var=
"WXNAMESUFFIX">
70 $(WXUNICODEFLAG)$(WXDEBUGFLAG)
73 <set var=
"WXUNIVNAME">
74 <if cond=
"WXUNIV=='1'">univ
</if>
76 <set var=
"WXUNIV_DEFINE">
77 <if cond=
"WXUNIV=='1'">__WXUNIVERSAL__
</if>
80 <if cond=
"FORMAT=='autoconf'">
81 <set var=
"WXNAMEPREFIX">wx_base$(WXBASEPORT)
</set>
82 <set var=
"WXNAMEPREFIXGUI">wx_$(PORTNAME)$(WXUNIVNAME)
</set>
83 <set var=
"WXVERSIONTAG">-$(WXVER_MAJOR).$(WXVER_MINOR)
</set>
85 <if cond=
"FORMAT!='autoconf'">
86 <set var=
"WXNAMEPREFIX">
87 wxbase$(WXBASEPORT)$(WXVER_MAJOR)$(WXVER_MINOR)
89 <set var=
"WXNAMEPREFIXGUI">
90 wx$(PORTNAME)$(WXUNIVNAME)$(WXVER_MAJOR)$(WXVER_MINOR)
</set>
91 <set var=
"WXVERSIONTAG"></set>
93 <set var=
"WXDLLNAMEPREFIX">
94 <if cond=
"PLATFORM_WIN32=='1'">
95 wxbase$(WXBASEPORT)$(WXWIN32DLLVERSION)
97 <if cond=
"PLATFORM_WIN32=='0'">$(WXNAMEPREFIX)
</if>
99 <set var=
"WXDLLNAMEPREFIXGUI">
100 <if cond=
"PLATFORM_WIN32=='1'">
101 wx$(PORTNAME)$(WXUNIVNAME)$(WXWIN32DLLVERSION)
103 <if cond=
"PLATFORM_WIN32=='0'">$(WXNAMEPREFIXGUI)
</if>
105 <set var=
"WXDLLVERSIONTAG">
106 <if cond=
"PLATFORM_WIN32=='1'"></if>
107 <if cond=
"PLATFORM_WIN32=='0'">$(WXVERSIONTAG)
</if>
111 <!-- =============================================================== -->
112 <!-- Names of component libraries: -->
113 <!-- =============================================================== -->
115 <set var=
"WXLIB_BASE">
116 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('base')))
</if>
118 <set var=
"WXLIB_CORE">
119 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))
</if>
121 <set var=
"WXLIB_HTML">
122 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('html')))
</if>
124 <set var=
"WXLIB_XML">
125 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xml')))
</if>
128 <set var=
"WXLIB_MONO">
129 <if cond=
"MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))
</if>
133 <!-- =============================================================== -->
134 <!-- Where to store built libraries and objects: -->
135 <!-- =============================================================== -->
138 <if cond=
"FORMAT!='autoconf'">
139 <set var=
"WXDLLFLAG">
140 <if cond=
"SHARED=='1'">dll
</if>
142 <set var=
"CFG_NAME_PART">
143 $(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
145 <set var=
"OBJS" make_var=
"1">$(COMPILER)_$(CFG_NAME_PART)
</set>
146 <set var=
"BUILDDIR">$(OBJS)
</set>
149 <set var=
"LIBDIRNAME" make_var=
"1">
150 <if cond=
"FORMAT=='autoconf'">$(top_builddir)lib
</if>
151 <if cond=
"FORMAT!='autoconf'">
152 $(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER)_$(CFG_NAME_PART)
157 <!-- =============================================================== -->
158 <!-- Templates for libs: -->
159 <!-- =============================================================== -->
161 <set var=
"DEBUGFLAG">
162 <if cond=
"BUILD=='debug'">on
</if>
163 <if cond=
"BUILD=='release'">off
</if>
165 <set var=
"OPTIMIZEFLAG">
166 <if cond=
"BUILD=='debug'">off
</if>
167 <if cond=
"BUILD=='release'">speed
</if>
170 <set var=
"DEBUG_DEFINE">
171 <if cond=
"FORMAT!='autoconf' and BUILD=='debug'">__WXDEBUG__
</if>
173 <set var=
"UNICODE_DEFINE">
174 <if cond=
"FORMAT!='autoconf' and UNICODE=='1'">wxUSE_UNICODE=
1</if>
177 <template id=
"common_settings">
178 <debug-info>$(DEBUGFLAG)
</debug-info>
179 <optimize>$(OPTIMIZEFLAG)
</optimize>
180 <threading>multi
</threading>
181 <runtime-libs>$(RUNTIME_LIBS)
</runtime-libs>
182 <if cond=
"FORMAT!='autoconf'">
183 <cppflags>$(EXTRACFLAGS)
</cppflags>
187 <template id=
"anylib">
188 <dirname>$(LIBDIRNAME)
</dirname>
189 <install-to>$(LIBDIR)
</install-to>
192 <template id=
"3rdparty_lib" template=
"common_settings,anylib">
193 <libname>$(id)$(WXDEBUGFLAG)$(HOST_SUFFIX)
</libname>
197 <!-- =============================================================== -->
198 <!-- 3rd party libs: -->
199 <!-- =============================================================== -->
201 <!-- 3rd party libraries: -->
202 <include file=
"regex.bkl"/>
203 <include file=
"zlib.bkl"/>
204 <include file=
"png.bkl"/>
205 <include file=
"jpeg.bkl"/>
206 <include file=
"tiff.bkl"/>
207 <include file=
"odbc.bkl"/>
208 <include file=
"expat.bkl"/>
211 <!-- =============================================================== -->
212 <!-- Templates for wxWindows libs: -->
213 <!-- =============================================================== -->
215 <template id=
"wx" template=
"common_settings">
216 <set var=
"wxid">$(wxwin.mk_wxid(id))
</set>
217 <define>__WX$(TOOLKIT)__
</define>
218 <define>$(WXUNIV_DEFINE)
</define>
219 <define>$(DEBUG_DEFINE)
</define>
220 <define>$(UNICODE_DEFINE)
</define>
221 <include>$(TOP_SRCDIR)include
</include>
222 <lib-path>$(LIBDIRNAME)
</lib-path>
223 <include cond=
"FORMAT!='autoconf'">$(LIBDIRNAME)
</include>
224 <include>$(INC_TIFF)
</include>
225 <include>$(INC_JPEG)
</include>
226 <include>$(INC_PNG)
</include>
227 <include>$(INC_ZLIB)
</include>
228 <include>$(INC_ODBC)
</include>
229 <include>$(INC_REGEX)
</include>
230 <include>$(INC_EXPAT)
</include>
233 <!-- for both GUI and wxBase libs/samples: -->
234 <template id=
"wx_append_base_nomono">
235 <!-- link against builtin 3rd party libs, if needed: -->
236 <sys-lib>$(LIB_TIFF)
</sys-lib>
237 <sys-lib>$(LIB_JPEG)
</sys-lib>
238 <sys-lib>$(LIB_PNG)
</sys-lib>
239 <sys-lib>$(LIB_ZLIB)
</sys-lib>
240 <sys-lib>$(LIB_ODBC)
</sys-lib>
241 <sys-lib>$(LIB_REGEX)
</sys-lib>
242 <sys-lib>$(LIB_EXPAT)
</sys-lib>
244 <ldlibs>$(EXTRALIBS)
</ldlibs>
246 <!-- system libraries on windows: -->
247 <if cond=
"FORMAT!='autoconf'">
248 <if cond=
"COMPILER=='bcc'">
249 <sys-lib>import32
</sys-lib>
250 <sys-lib>ole2w32
</sys-lib>
252 <if cond=
"COMPILER!='bcc'">
253 <sys-lib>kernel32
</sys-lib>
254 <sys-lib>user32
</sys-lib>
255 <sys-lib>gdi32
</sys-lib>
256 <sys-lib>comdlg32
</sys-lib>
257 <sys-lib>winspool
</sys-lib>
258 <sys-lib>winmm
</sys-lib>
259 <sys-lib>shell32
</sys-lib>
260 <sys-lib>comctl32
</sys-lib>
261 <sys-lib>odbc32
</sys-lib>
262 <sys-lib>ole32
</sys-lib>
263 <sys-lib>oleaut32
</sys-lib>
264 <sys-lib>uuid
</sys-lib>
265 <sys-lib>rpcrt4
</sys-lib>
266 <sys-lib>advapi32
</sys-lib>
267 <sys-lib>wsock32
</sys-lib>
272 <define-tag name=
"msvc-headers" rules=
"dll,lib">
273 <if cond=
"FORMAT=='msvc6prj'">
275 $(addPrefixToList('include\', wxwin.headersOnly(value)))
276 </msvc-project-files>
280 <!-- for GUI libs/samples: -->
281 <template id=
"wx_append_nomono" template=
"wx_append_base_nomono">
282 <ldlibs>$(EXTRALIBS_GUI)
</ldlibs>
286 <template id=
"wx_append_base" template_append=
"wx_append_base_nomono">
287 <!-- Always link against the wxWin library in monolithic build: -->
288 <sys-lib>$(WXLIB_MONO)
</sys-lib>
290 <template id=
"wx_append" template_append=
"wx_append_nomono">
291 <!-- Always link against the wxWin library in monolithic build: -->
292 <sys-lib>$(WXLIB_MONO)
</sys-lib>
296 <set var=
"WX_DISABLE_PRECOMP_HEADERS" overwrite=
"0">0</set>
298 <template id=
"wx_lib_b" template=
"wx,anylib">
299 <set var=
"WXLIBNAME">$(wxwin.mkLibName(wxid))
</set>
300 <libname>$(WXLIBNAME)
</libname>
302 <if cond=
"WX_DISABLE_PRECOMP_HEADERS=='0'">
303 <if cond=
"FORMAT!='autoconf'">
304 <sources>$(WXTOPDIR)src/msw/dummy.cpp
</sources>
305 <precomp-headers-gen>
306 $(WXTOPDIR)src/msw/dummy.cpp
307 </precomp-headers-gen>
309 <precomp-headers-header>wx/wxprec.h
</precomp-headers-header>
310 <precomp-headers>on
</precomp-headers>
311 <precomp-headers-file>wxprec_$(id)
</precomp-headers-file>
315 <template id=
"wx_dll_b" template=
"wx_lib_b">
316 <set var=
"WXDLLNAME">$(wxwin.mkDllName(wxid))
</set>
317 <dllname>$(WXDLLNAME)
</dllname>
318 <version>$(WX_VERSION)
</version>
319 <so_version>$(WXSOVERSION)
</so_version>
320 <mac_version>$(WXMACVERSION)
</mac_version>
323 <template id=
"wx_lib" template=
"wx_lib_b"/>
324 <template id=
"wx_base_lib" template=
"wx_lib_b"/>
325 <template id=
"wx_dll" template=
"wx_dll_b"
326 template_append=
"wx_append_nomono">
327 <depends>wxtiff
</depends>
328 <depends>wxjpeg
</depends>
329 <depends>wxpng
</depends>
330 <depends>wxexpat
</depends>
331 <depends>wxzlib
</depends>
332 <depends cond=
"FORMAT=='autoconf'">wxodbc
</depends>
333 <depends>wxregex
</depends>
335 <template id=
"wx_base_dll" template=
"wx_dll_b"
336 template_append=
"wx_append_base_nomono">
337 <depends>wxexpat
</depends>
338 <depends>wxzlib
</depends>
339 <depends>wxregex
</depends>
342 <!-- =============================================================== -->
343 <!-- Support for wxWindows samples and contrib: -->
344 <!-- =============================================================== -->
346 <!-- Link against one wxWin library. Value must be literal! -->
347 <define-tag name=
"wx-lib" rules=
"exe,dll">
348 <sys-lib>$(wxwin.libToLink(value))
</sys-lib>