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=
"WXSOVERSION">0.0.0</set>
25 <set var=
"WXMACVERSION">$(WX_VERSION)
</set>
28 <!-- ================================================================== -->
29 <!-- Names of libraries and DLLs: -->
30 <!-- ================================================================== -->
33 <if cond=
"USE_GUI=='0'">base
</if>
34 <if cond=
"USE_GUI=='1'">$(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
</if>
37 <set var=
"WXBASEPORT">
38 <if cond=
"TOOLKIT=='MAC'">_carbon
</if>
41 <set var=
"COMPILERORGCC">
42 <if cond=
"isdefined('COMPILER')">$(COMPILER)
</if>
43 <if cond=
"not isdefined('COMPILER')">gcc
</if>
45 <set var=
"WXCOMPILER">
46 <if cond=
"PLATFORM_WIN32=='1'">_$(COMPILERORGCC)
</if>
50 <if cond=
"PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='1'"></if>
51 <if cond=
"PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='0'">_$(VENDOR)
</if>
54 <set var=
"WXDEBUGFLAG">
55 <if cond=
"BUILD=='debug'">d
</if>
57 <set var=
"WXUNICODEFLAG">
58 <if cond=
"UNICODE=='1'">u
</if>
60 <set var=
"WXNAMESUFFIX">
61 $(WXUNICODEFLAG)$(WXDEBUGFLAG)
64 <set var=
"WXUNIVNAME">
65 <if cond=
"WXUNIV=='1'">univ
</if>
67 <set var=
"WXUNIV_DEFINE">
68 <if cond=
"WXUNIV=='1'">__WXUNIVERSAL__
</if>
71 <if cond=
"FORMAT=='autoconf'">
72 <set var=
"WXNAMEPREFIX">wx_base$(WXBASEPORT)
</set>
73 <set var=
"WXNAMEPREFIXGUI">wx_$(PORTNAME)$(WXUNIVNAME)
</set>
74 <set var=
"WXVERSIONTAG">-$(WXVER_MAJOR).$(WXVER_MINOR)
</set>
76 <if cond=
"FORMAT!='autoconf'">
77 <set var=
"WXNAMEPREFIX">
78 wxbase$(WXBASEPORT)$(WXVER_MAJOR)$(WXVER_MINOR)
80 <set var=
"WXNAMEPREFIXGUI">
81 wx$(PORTNAME)$(WXUNIVNAME)$(WXVER_MAJOR)$(WXVER_MINOR)
</set>
82 <set var=
"WXVERSIONTAG"></set>
84 <set var=
"WXDLLNAMEPREFIX">
85 <if cond=
"PLATFORM_WIN32=='1'">
86 wxbase$(WXBASEPORT)$(WXVER_MAJOR)$(WXVER_MINOR)
88 <if cond=
"PLATFORM_WIN32=='0'">$(WXNAMEPREFIX)
</if>
90 <set var=
"WXDLLNAMEPREFIXGUI">
91 <if cond=
"PLATFORM_WIN32=='1'">
92 wx$(PORTNAME)$(WXUNIVNAME)$(WXVER_MAJOR)$(WXVER_MINOR)
94 <if cond=
"PLATFORM_WIN32=='0'">$(WXNAMEPREFIXGUI)
</if>
96 <set var=
"WXDLLVERSIONTAG">
97 <if cond=
"PLATFORM_WIN32=='1'"></if>
98 <if cond=
"PLATFORM_WIN32=='0'">$(WXVERSIONTAG)
</if>
102 <!-- =============================================================== -->
103 <!-- Names of component libraries: -->
104 <!-- =============================================================== -->
106 <set var=
"WXLIB_BASE">
107 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('base')))
</if>
109 <set var=
"WXLIB_CORE">
110 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))
</if>
112 <set var=
"WXLIB_HTML">
113 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('html')))
</if>
115 <set var=
"WXLIB_XML">
116 <if cond=
"MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xml')))
</if>
119 <set var=
"WXLIB_MONO">
120 <if cond=
"MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))
</if>
124 <!-- =============================================================== -->
125 <!-- Where to store built libraries and objects: -->
126 <!-- =============================================================== -->
129 <if cond=
"FORMAT!='autoconf'">
130 <set var=
"WXDLLFLAG">
131 <if cond=
"SHARED=='1'">dll
</if>
133 <set var=
"CFG_NAME_PART">
134 $(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
136 <set var=
"OBJS" make_var=
"1">$(COMPILER)_$(CFG_NAME_PART)
</set>
137 <set var=
"BUILDDIR">$(OBJS)
</set>
140 <set var=
"LIBDIRNAME">
141 <if cond=
"FORMAT=='autoconf'">$(top_builddir)lib
</if>
142 <if cond=
"FORMAT!='autoconf'">
143 $(TOP_SRCDIR)lib$(DIRSEP)$(COMPILER)_$(CFG_NAME_PART)
148 <!-- =============================================================== -->
149 <!-- Templates for libs: -->
150 <!-- =============================================================== -->
152 <set var=
"DEBUGFLAG">
153 <if cond=
"BUILD=='debug'">on
</if>
154 <if cond=
"BUILD=='release'">off
</if>
156 <set var=
"OPTIMIZEFLAG">
157 <if cond=
"BUILD=='debug'">off
</if>
158 <if cond=
"BUILD=='release'">speed
</if>
161 <set var=
"DEBUG_DEFINE">
162 <if cond=
"FORMAT!='autoconf' and BUILD=='debug'">__WXDEBUG__
</if>
164 <set var=
"UNICODE_DEFINE">
165 <if cond=
"FORMAT!='autoconf' and UNICODE=='1'">wxUSE_UNICODE=
1</if>
168 <template id=
"common_settings">
169 <debug-info>$(DEBUGFLAG)
</debug-info>
170 <optimize>$(OPTIMIZEFLAG)
</optimize>
171 <threading>multi
</threading>
172 <runtime-libs>$(RUNTIME_LIBS)
</runtime-libs>
173 <if cond=
"FORMAT!='autoconf'">
174 <cppflags>$(EXTRACFLAGS)
</cppflags>
178 <template id=
"anylib">
179 <dirname>$(LIBDIRNAME)
</dirname>
180 <install-to>$(LIBDIR)
</install-to>
183 <template id=
"3rdparty_lib" template=
"common_settings,anylib">
184 <libname>$(id)$(WXDEBUGFLAG)$(HOST_SUFFIX)
</libname>
188 <!-- =============================================================== -->
189 <!-- 3rd party libs: -->
190 <!-- =============================================================== -->
192 <!-- 3rd party libraries: -->
193 <include file=
"regex.bkl"/>
194 <include file=
"zlib.bkl"/>
195 <include file=
"png.bkl"/>
196 <include file=
"jpeg.bkl"/>
197 <include file=
"tiff.bkl"/>
198 <include file=
"odbc.bkl"/>
199 <include file=
"expat.bkl"/>
202 <!-- =============================================================== -->
203 <!-- Templates for wxWindows libs: -->
204 <!-- =============================================================== -->
206 <template id=
"wx" template=
"common_settings">
207 <set var=
"wxid">$(wxwin.mk_wxid(id))
</set>
208 <define>__WX$(TOOLKIT)__
</define>
209 <define>$(WXUNIV_DEFINE)
</define>
210 <define>$(DEBUG_DEFINE)
</define>
211 <define>$(UNICODE_DEFINE)
</define>
212 <include>$(TOP_SRCDIR)include
</include>
213 <lib-path>$(LIBDIRNAME)
</lib-path>
214 <include cond=
"FORMAT!='autoconf'">$(LIBDIRNAME)
</include>
215 <include>$(INC_TIFF)
</include>
216 <include>$(INC_JPEG)
</include>
217 <include>$(INC_PNG)
</include>
218 <include>$(INC_ZLIB)
</include>
219 <include>$(INC_ODBC)
</include>
220 <include>$(INC_REGEX)
</include>
221 <include>$(INC_EXPAT)
</include>
224 <!-- for both GUI and wxBase libs/samples: -->
225 <template id=
"wx_append_base_nomono">
226 <!-- link against builtin 3rd party libs, if needed: -->
227 <sys-lib>$(LIB_TIFF)
</sys-lib>
228 <sys-lib>$(LIB_JPEG)
</sys-lib>
229 <sys-lib>$(LIB_PNG)
</sys-lib>
230 <sys-lib>$(LIB_ZLIB)
</sys-lib>
231 <sys-lib>$(LIB_ODBC)
</sys-lib>
232 <sys-lib>$(LIB_REGEX)
</sys-lib>
233 <sys-lib>$(LIB_EXPAT)
</sys-lib>
235 <ldlibs>$(EXTRALIBS)
</ldlibs>
237 <!-- system libraries on windows: -->
238 <if cond=
"FORMAT!='autoconf'">
239 <if cond=
"COMPILER=='bcc'">
240 <sys-lib>import32
</sys-lib>
241 <sys-lib>ole2w32
</sys-lib>
243 <if cond=
"COMPILER!='bcc'">
244 <sys-lib>kernel32
</sys-lib>
245 <sys-lib>user32
</sys-lib>
246 <sys-lib>gdi32
</sys-lib>
247 <sys-lib>comdlg32
</sys-lib>
248 <sys-lib>winspool
</sys-lib>
249 <sys-lib>winmm
</sys-lib>
250 <sys-lib>shell32
</sys-lib>
251 <sys-lib>comctl32
</sys-lib>
252 <sys-lib>odbc32
</sys-lib>
253 <sys-lib>ole32
</sys-lib>
254 <sys-lib>oleaut32
</sys-lib>
255 <sys-lib>uuid
</sys-lib>
256 <sys-lib>rpcrt4
</sys-lib>
257 <sys-lib>advapi32
</sys-lib>
258 <sys-lib>wsock32
</sys-lib>
263 <!-- for GUI libs/samples: -->
264 <template id=
"wx_append_nomono" template=
"wx_append_base_nomono">
265 <ldlibs>$(EXTRALIBS_GUI)
</ldlibs>
269 <template id=
"wx_append_base" template_append=
"wx_append_base_nomono">
270 <!-- Always link against the wxWin library in monolithic build: -->
271 <sys-lib>$(WXLIB_MONO)
</sys-lib>
273 <template id=
"wx_append" template_append=
"wx_append_nomono">
274 <!-- Always link against the wxWin library in monolithic build: -->
275 <sys-lib>$(WXLIB_MONO)
</sys-lib>
279 <template id=
"wx_lib_b" template=
"wx,anylib">
280 <set var=
"WXLIBNAME">$(wxwin.mkLibName(wxid))
</set>
281 <libname>$(WXLIBNAME)
</libname>
283 <if cond=
"FORMAT!='autoconf'">
284 <sources>$(WXTOPDIR)src/msw/dummy.cpp
</sources>
285 <precomp-headers-gen>
286 $(WXTOPDIR)src/msw/dummy.cpp
287 </precomp-headers-gen>
289 <precomp-headers-header>wx/wxprec.h
</precomp-headers-header>
290 <precomp-headers>on
</precomp-headers>
291 <precomp-headers-file>wxprec_$(id)
</precomp-headers-file>
294 <template id=
"wx_dll_b" template=
"wx_lib_b">
295 <set var=
"WXDLLNAME">$(wxwin.mkDllName(wxid))
</set>
296 <dllname>$(WXDLLNAME)
</dllname>
297 <version>$(WX_VERSION)
</version>
298 <so_version>$(WXSOVERSION)
</so_version>
299 <mac_version>$(WXMACVERSION)
</mac_version>
302 <template id=
"wx_lib" template=
"wx_lib_b"/>
303 <template id=
"wx_base_lib" template=
"wx_lib_b"/>
304 <template id=
"wx_dll" template=
"wx_dll_b"
305 template_append=
"wx_append_nomono">
306 <depends>wxtiff
</depends>
307 <depends>wxjpeg
</depends>
308 <depends>wxpng
</depends>
309 <depends>wxexpat
</depends>
310 <depends>wxzlib
</depends>
311 <depends cond=
"FORMAT=='autoconf'">wxodbc
</depends>
312 <depends>wxregex
</depends>
314 <template id=
"wx_base_dll" template=
"wx_dll_b"
315 template_append=
"wx_append_base_nomono">
316 <depends>wxzlib
</depends>
317 <depends>wxregex
</depends>
320 <!-- =============================================================== -->
321 <!-- Support for wxWindows samples and contrib: -->
322 <!-- =============================================================== -->
324 <!-- Link against one wxWin library. Value must be literal! -->
325 <define-tag name=
"wx-lib" rules=
"exe,dll">
326 <sys-lib>$(wxwin.libToLink(value))
</sys-lib>