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_NET">
119 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('net')))
</if>
121 <set var=
"WXLIB_CORE">
122 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))
</if>
124 <set var=
"WXLIB_HTML">
125 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('html')))
</if>
127 <set var=
"WXLIB_XML">
128 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xml')))
</if>
131 <set var=
"WXLIB_MONO">
132 <if cond=
"MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))
</if>
136 <!-- =============================================================== -->
137 <!-- Where to store built libraries and objects: -->
138 <!-- =============================================================== -->
141 <if cond=
"FORMAT!='autoconf'">
142 <set var=
"WXDLLFLAG">
143 <if cond=
"SHARED=='1'">dll
</if>
145 <set var=
"CFG_NAME_PART">
146 $(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
148 <set var=
"OBJS" make_var=
"1">$(COMPILER)_$(CFG_NAME_PART)
</set>
149 <set var=
"BUILDDIR">$(OBJS)
</set>
152 <set var=
"LIBDIRNAME" make_var=
"1">
153 <if cond=
"FORMAT=='autoconf'">$(top_builddir)lib
</if>
154 <if cond=
"FORMAT!='autoconf'">
155 $(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER)_$(CFG_NAME_PART)
160 <!-- =============================================================== -->
161 <!-- Templates for libs: -->
162 <!-- =============================================================== -->
164 <set var=
"DEBUGFLAG">
165 <if cond=
"BUILD=='debug'">on
</if>
166 <if cond=
"BUILD=='release'">off
</if>
168 <set var=
"OPTIMIZEFLAG">
169 <if cond=
"BUILD=='debug'">off
</if>
170 <if cond=
"BUILD=='release'">speed
</if>
173 <set var=
"DEBUG_DEFINE">
174 <if cond=
"FORMAT!='autoconf' and BUILD=='debug'">__WXDEBUG__
</if>
176 <set var=
"UNICODE_DEFINE">
177 <if cond=
"FORMAT!='autoconf' and UNICODE=='1'">wxUSE_UNICODE=
1</if>
180 <template id=
"common_settings">
181 <debug-info>$(DEBUGFLAG)
</debug-info>
182 <optimize>$(OPTIMIZEFLAG)
</optimize>
183 <threading>multi
</threading>
184 <runtime-libs>$(RUNTIME_LIBS)
</runtime-libs>
185 <if cond=
"FORMAT!='autoconf'">
186 <cppflags>$(EXTRACFLAGS)
</cppflags>
190 <template id=
"anylib">
191 <dirname>$(LIBDIRNAME)
</dirname>
192 <install-to>$(LIBDIR)
</install-to>
195 <template id=
"3rdparty_lib" template=
"common_settings,anylib">
196 <libname>$(id)$(WXDEBUGFLAG)$(HOST_SUFFIX)
</libname>
200 <!-- =============================================================== -->
201 <!-- 3rd party libs: -->
202 <!-- =============================================================== -->
204 <!-- 3rd party libraries: -->
205 <include file=
"regex.bkl"/>
206 <include file=
"zlib.bkl"/>
207 <include file=
"png.bkl"/>
208 <include file=
"jpeg.bkl"/>
209 <include file=
"tiff.bkl"/>
210 <include file=
"odbc.bkl"/>
211 <include file=
"expat.bkl"/>
214 <!-- =============================================================== -->
215 <!-- Templates for wxWindows libs: -->
216 <!-- =============================================================== -->
218 <template id=
"wx" template=
"common_settings">
219 <set var=
"wxid">$(wxwin.mk_wxid(id))
</set>
220 <define>__WX$(TOOLKIT)__
</define>
221 <define>$(WXUNIV_DEFINE)
</define>
222 <define>$(DEBUG_DEFINE)
</define>
223 <define>$(UNICODE_DEFINE)
</define>
224 <include>$(TOP_SRCDIR)include
</include>
225 <lib-path>$(LIBDIRNAME)
</lib-path>
226 <include cond=
"FORMAT!='autoconf'">$(LIBDIRNAME)
</include>
227 <include>$(INC_TIFF)
</include>
228 <include>$(INC_JPEG)
</include>
229 <include>$(INC_PNG)
</include>
230 <include>$(INC_ZLIB)
</include>
231 <include>$(INC_ODBC)
</include>
232 <include>$(INC_REGEX)
</include>
233 <include>$(INC_EXPAT)
</include>
236 <!-- for both GUI and wxBase libs/samples: -->
237 <template id=
"wx_append_base_nomono">
238 <!-- link against builtin 3rd party libs, if needed: -->
239 <sys-lib>$(LIB_TIFF)
</sys-lib>
240 <sys-lib>$(LIB_JPEG)
</sys-lib>
241 <sys-lib>$(LIB_PNG)
</sys-lib>
242 <sys-lib>$(LIB_ZLIB)
</sys-lib>
243 <sys-lib>$(LIB_ODBC)
</sys-lib>
244 <sys-lib>$(LIB_REGEX)
</sys-lib>
245 <sys-lib>$(LIB_EXPAT)
</sys-lib>
247 <ldlibs>$(EXTRALIBS)
</ldlibs>
249 <!-- system libraries on windows: -->
250 <if cond=
"FORMAT!='autoconf'">
251 <if cond=
"COMPILER=='bcc'">
252 <sys-lib>import32
</sys-lib>
253 <sys-lib>ole2w32
</sys-lib>
255 <if cond=
"COMPILER!='bcc'">
256 <sys-lib>kernel32
</sys-lib>
257 <sys-lib>user32
</sys-lib>
258 <sys-lib>gdi32
</sys-lib>
259 <sys-lib>comdlg32
</sys-lib>
260 <sys-lib>winspool
</sys-lib>
261 <sys-lib>winmm
</sys-lib>
262 <sys-lib>shell32
</sys-lib>
263 <sys-lib>comctl32
</sys-lib>
264 <sys-lib>odbc32
</sys-lib>
265 <sys-lib>ole32
</sys-lib>
266 <sys-lib>oleaut32
</sys-lib>
267 <sys-lib>uuid
</sys-lib>
268 <sys-lib>rpcrt4
</sys-lib>
269 <sys-lib>advapi32
</sys-lib>
270 <sys-lib>wsock32
</sys-lib>
275 <define-tag name=
"msvc-headers" rules=
"dll,lib">
276 <if cond=
"FORMAT=='msvc6prj'">
278 $(addPrefixToList('include\', wxwin.headersOnly(value)))
279 </msvc-project-files>
283 <!-- for GUI libs/samples: -->
284 <template id=
"wx_append_nomono" template=
"wx_append_base_nomono">
285 <ldlibs>$(EXTRALIBS_GUI)
</ldlibs>
289 <template id=
"wx_append_base" template_append=
"wx_append_base_nomono">
290 <!-- Always link against the wxWin library in monolithic build: -->
291 <sys-lib>$(WXLIB_MONO)
</sys-lib>
293 <template id=
"wx_append" template_append=
"wx_append_nomono">
294 <!-- Always link against the wxWin library in monolithic build: -->
295 <sys-lib>$(WXLIB_MONO)
</sys-lib>
299 <set var=
"WX_DISABLE_PRECOMP_HEADERS" overwrite=
"0">0</set>
301 <template id=
"wx_lib_b" template=
"wx,anylib">
302 <set var=
"WXLIBNAME">$(wxwin.mkLibName(wxid))
</set>
303 <libname>$(WXLIBNAME)
</libname>
305 <if cond=
"WX_DISABLE_PRECOMP_HEADERS=='0'">
306 <if cond=
"FORMAT!='autoconf'">
307 <sources>$(WXTOPDIR)src/msw/dummy.cpp
</sources>
308 <precomp-headers-gen>
309 $(WXTOPDIR)src/msw/dummy.cpp
310 </precomp-headers-gen>
312 <precomp-headers-header>wx/wxprec.h
</precomp-headers-header>
313 <precomp-headers>on
</precomp-headers>
314 <precomp-headers-file>wxprec_$(id)
</precomp-headers-file>
315 <precomp-headers-exclude>
317 src/common/extended.c
320 </precomp-headers-exclude>
324 <template id=
"wx_dll_b" template=
"wx_lib_b">
325 <set var=
"WXDLLNAME">$(wxwin.mkDllName(wxid))
</set>
326 <dllname>$(WXDLLNAME)
</dllname>
327 <version>$(WX_VERSION)
</version>
328 <so_version>$(WXSOVERSION)
</so_version>
329 <mac_version>$(WXMACVERSION)
</mac_version>
332 <template id=
"wx_lib" template=
"wx_lib_b"/>
333 <template id=
"wx_base_lib" template=
"wx_lib_b"/>
334 <template id=
"wx_dll" template=
"wx_dll_b"
335 template_append=
"wx_append_nomono">
336 <depends>wxtiff
</depends>
337 <depends>wxjpeg
</depends>
338 <depends>wxpng
</depends>
339 <depends>wxexpat
</depends>
340 <depends>wxzlib
</depends>
341 <depends cond=
"FORMAT=='autoconf'">wxodbc
</depends>
342 <depends>wxregex
</depends>
344 <template id=
"wx_base_dll" template=
"wx_dll_b"
345 template_append=
"wx_append_base_nomono">
346 <depends>wxtiff
</depends>
347 <depends>wxjpeg
</depends>
348 <depends>wxpng
</depends>
349 <depends>wxexpat
</depends>
350 <depends>wxzlib
</depends>
351 <depends cond=
"FORMAT=='autoconf'">wxodbc
</depends>
352 <depends>wxregex
</depends>
355 <!-- =============================================================== -->
356 <!-- Support for wxWindows samples and contrib: -->
357 <!-- =============================================================== -->
359 <!-- Link against one wxWin library. Value must be literal! -->
360 <define-tag name=
"wx-lib" rules=
"exe,dll">
361 <sys-lib>$(wxwin.libToLink(value))
</sys-lib>