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 <template id=
"common_settings">
199 <debug-info>$(DEBUGINFO)
</debug-info>
200 <debug-runtime-libs>$(DEBUGRUNTIME)
</debug-runtime-libs>
201 <optimize>$(OPTIMIZEFLAG)
</optimize>
202 <threading>multi
</threading>
203 <runtime-libs>$(RUNTIME_LIBS)
</runtime-libs>
204 <if cond=
"FORMAT!='autoconf'">
205 <cppflags>$(EXTRACFLAGS)
</cppflags>
209 <template id=
"anylib">
210 <dirname>$(LIBDIRNAME)
</dirname>
211 <install-to>$(LIBDIR)
</install-to>
214 <template id=
"3rdparty_lib" template=
"common_settings,anylib">
215 <libname>$(id)$(WXDEBUGFLAG)$(HOST_SUFFIX)
</libname>
219 <!-- =============================================================== -->
220 <!-- 3rd party libs: -->
221 <!-- =============================================================== -->
223 <!-- 3rd party libraries: -->
224 <include file=
"regex.bkl"/>
225 <include file=
"zlib.bkl"/>
226 <include file=
"png.bkl"/>
227 <include file=
"jpeg.bkl"/>
228 <include file=
"tiff.bkl"/>
229 <include file=
"odbc.bkl"/>
230 <include file=
"expat.bkl"/>
233 <!-- =============================================================== -->
234 <!-- Templates for wxWindows libs: -->
235 <!-- =============================================================== -->
237 <template id=
"wx" template=
"common_settings">
238 <set var=
"wxid">$(wxwin.mk_wxid(id))
</set>
239 <define>__WX$(TOOLKIT)__
</define>
240 <define>$(WXUNIV_DEFINE)
</define>
241 <define>$(DEBUG_DEFINE)
</define>
242 <define>$(UNICODE_DEFINE)
</define>
243 <include>$(TOP_SRCDIR)include
</include>
244 <lib-path>$(LIBDIRNAME)
</lib-path>
245 <include cond=
"FORMAT!='autoconf'">$(LIBDIRNAME)
</include>
246 <include>$(INC_TIFF)
</include>
247 <include>$(INC_JPEG)
</include>
248 <include>$(INC_PNG)
</include>
249 <include>$(INC_ZLIB)
</include>
250 <include>$(INC_ODBC)
</include>
251 <include>$(INC_REGEX)
</include>
252 <include>$(INC_EXPAT)
</include>
255 <!-- for both GUI and wxBase libs/samples: -->
256 <template id=
"wx_append_base_nomono">
257 <!-- link against builtin 3rd party libs, if needed: -->
258 <sys-lib>$(LIB_TIFF)
</sys-lib>
259 <sys-lib>$(LIB_JPEG)
</sys-lib>
260 <sys-lib>$(LIB_PNG)
</sys-lib>
261 <sys-lib>$(LIB_ZLIB)
</sys-lib>
262 <sys-lib>$(LIB_ODBC)
</sys-lib>
263 <sys-lib>$(LIB_REGEX)
</sys-lib>
264 <sys-lib>$(LIB_EXPAT)
</sys-lib>
266 <ldlibs>$(EXTRALIBS)
</ldlibs>
268 <!-- system libraries on windows: -->
269 <if cond=
"FORMAT!='autoconf'">
270 <if cond=
"COMPILER=='bcc'">
271 <sys-lib>import32
</sys-lib>
272 <sys-lib>ole2w32
</sys-lib>
274 <if cond=
"COMPILER!='bcc'">
275 <sys-lib>kernel32
</sys-lib>
276 <sys-lib>user32
</sys-lib>
277 <sys-lib>gdi32
</sys-lib>
278 <sys-lib>comdlg32
</sys-lib>
279 <sys-lib>winspool
</sys-lib>
280 <sys-lib>winmm
</sys-lib>
281 <sys-lib>shell32
</sys-lib>
282 <sys-lib>comctl32
</sys-lib>
283 <sys-lib>odbc32
</sys-lib>
284 <sys-lib>ole32
</sys-lib>
285 <sys-lib>oleaut32
</sys-lib>
286 <sys-lib>uuid
</sys-lib>
287 <sys-lib>rpcrt4
</sys-lib>
288 <sys-lib>advapi32
</sys-lib>
289 <sys-lib>wsock32
</sys-lib>
294 <define-tag name=
"msvc-headers" rules=
"dll,lib">
295 <if cond=
"FORMAT=='msvc6prj'">
297 $(addPrefixToList('include\', wxwin.headersOnly(value)))
298 </msvc-project-files>
302 <define-tag name=
"msvc-copy-setup-h" rules=
"dll,lib">
303 <if cond=
"FORMAT=='msvc6prj'">
304 <msvc-headers>wx/msw/setup.h
</msvc-headers>
305 <set var=
"__custom_build_files" append=
"1">
306 include\wx\msw\setup.h
308 <set var=
"__custom_build_include_wx_msw_setup_h">
309 Creating $(LIBDIRNAME)\wx\setup.h
310 InputPath=..\include\wx\msw\setup.h
312 "$(LIBDIRNAME)\wx\setup.h" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)"
313 $(TAB)copy "$(DOLLAR)(InputPath)" $(LIBDIRNAME)\wx\setup.h
319 <!-- for GUI libs/samples: -->
320 <template id=
"wx_append_nomono" template=
"wx_append_base_nomono">
321 <ldlibs>$(EXTRALIBS_GUI)
</ldlibs>
325 <template id=
"wx_append_base" template_append=
"wx_append_base_nomono">
326 <!-- Always link against the wxWin library in monolithic build: -->
327 <sys-lib>$(WXLIB_MONO)
</sys-lib>
329 <template id=
"wx_append" template_append=
"wx_append_nomono">
330 <!-- Always link against the wxWin library in monolithic build: -->
331 <sys-lib>$(WXLIB_MONO)
</sys-lib>
335 <set var=
"WX_DISABLE_PRECOMP_HEADERS" overwrite=
"0">0</set>
337 <template id=
"wx_lib_b" template=
"wx,anylib">
338 <set var=
"WXLIBNAME">$(wxwin.mkLibName(wxid))
</set>
339 <libname>$(WXLIBNAME)
</libname>
341 <if cond=
"WX_DISABLE_PRECOMP_HEADERS=='0'">
342 <if cond=
"FORMAT!='autoconf'">
343 <sources>$(WXTOPDIR)src/msw/dummy.cpp
</sources>
344 <precomp-headers-gen>
345 $(WXTOPDIR)src/msw/dummy.cpp
346 </precomp-headers-gen>
348 <precomp-headers-header>wx/wxprec.h
</precomp-headers-header>
349 <precomp-headers>on
</precomp-headers>
350 <precomp-headers-file>wxprec_$(id)
</precomp-headers-file>
351 <precomp-headers-exclude>
353 src/common/extended.c
356 </precomp-headers-exclude>
359 <if cond=
"FORMAT=='msvc6prj' and BUILDING_LIB=='1'">
360 <msvc-file-group>Common Sources:src/common/*
</msvc-file-group>
361 <msvc-file-group>MSW Sources:src/msw/*
</msvc-file-group>
362 <msvc-file-group>Generic Sources:src/generic/*
</msvc-file-group>
363 <msvc-file-group>wxUniv Sources:src/univ/*
</msvc-file-group>
364 <msvc-file-group>wxHTML Sources:src/html/*
</msvc-file-group>
365 <msvc-file-group>Setup Headers:*/setup.h
</msvc-file-group>
366 <msvc-file-group>Common Headers:*wx/[!/]*.h
</msvc-file-group>
367 <msvc-file-group>MSW Headers:*wx/msw/*.h
</msvc-file-group>
368 <msvc-file-group>Generic Headers:*wx/generic/*.h
</msvc-file-group>
369 <msvc-file-group>wxUniv Headers:*wx/univ/*.h
</msvc-file-group>
370 <msvc-file-group>wxHTML Headers:*wx/html/*.h
</msvc-file-group>
374 <template id=
"wx_dll_b" template=
"wx_lib_b">
375 <set var=
"WXDLLNAME">$(wxwin.mkDllName(wxid))
</set>
376 <dllname>$(WXDLLNAME)
</dllname>
377 <version>$(WX_VERSION)
</version>
378 <so_version>$(WXSOVERSION)
</so_version>
379 <mac_version>$(WXMACVERSION)
</mac_version>
382 <template id=
"wx_3rdparty_dependencies">
383 <depends>wxtiff
</depends>
384 <depends>wxjpeg
</depends>
385 <depends>wxpng
</depends>
386 <depends>wxexpat
</depends>
387 <depends>wxzlib
</depends>
388 <depends cond=
"FORMAT=='autoconf'">wxodbc
</depends>
389 <depends>wxregex
</depends>
392 <template id=
"wx_lib" template=
"wx_lib_b,wx_3rdparty_dependencies"/>
393 <template id=
"wx_base_lib" template=
"wx_lib_b,wx_3rdparty_dependencies"/>
394 <template id=
"wx_dll" template=
"wx_dll_b,wx_3rdparty_dependencies"
395 template_append=
"wx_append_nomono"/>
396 <template id=
"wx_base_dll" template=
"wx_dll_b,wx_3rdparty_dependencies"
397 template_append=
"wx_append_base_nomono"/>
399 <!-- =============================================================== -->
400 <!-- Support for wxWindows samples and contrib: -->
401 <!-- =============================================================== -->
403 <!-- Link against one wxWin library. Value must be literal! -->
404 <define-tag name=
"wx-lib" rules=
"exe,dll">
405 <sys-lib>$(wxwin.libToLink(value))
</sys-lib>