]>
Commit | Line | Data |
---|---|---|
1 | <?xml version="1.0" ?> | |
2 | <!-- $Id$ --> | |
3 | ||
4 | <makefile> | |
5 | ||
6 | <requires version="0.2.7"/> | |
7 | ||
8 | <!-- bakefile modules we need: --> | |
9 | <using module="datafiles"/> | |
10 | ||
11 | <!-- load python module with wxwindows helpers: --> | |
12 | <using module="wxwin"/> | |
13 | ||
14 | <!-- DFE: Add a platform meaning regular MacOS (not OS X) --> | |
15 | <!-- FIXME: This will be handled in Bakefile but for now I wanted to | |
16 | get my changes to the wx bakefiles in the tree but invisible to | |
17 | windows toolkits and their config.xxx settings --> | |
18 | <if cond="FORMAT=='autoconf'"> | |
19 | <option name="PLATFORM_MACOS"/> | |
20 | </if> | |
21 | <if cond="FORMAT!='autoconf'"> | |
22 | <set var="PLATFORM_MACOS">0</set> | |
23 | </if> | |
24 | ||
25 | <include file="config.bkl"/> | |
26 | ||
27 | <include file="plugins_deps.bkl"/> | |
28 | ||
29 | ||
30 | <!-- wxWidgets version numbers logic: --> | |
31 | <include file="version.bkl"/> | |
32 | ||
33 | <set var="ARCH_SUFFIX"> | |
34 | <if cond="FORMAT=='msevc4prj'">_$(CPU)</if> | |
35 | <if cond="TARGET_CPU=='amd64'">_x64</if> | |
36 | <if cond="TARGET_CPU=='AMD64'">_x64</if> | |
37 | <if cond="TARGET_CPU=='ia64'">_ia64</if> | |
38 | <if cond="TARGET_CPU=='IA64'">_ia64</if> | |
39 | <if cond="TARGET_CPU=='x64'">_x64</if> | |
40 | <if cond="TARGET_CPU=='X64'">_x64</if> | |
41 | </set> | |
42 | ||
43 | <!-- ================================================================== --> | |
44 | <!-- Names of libraries and DLLs: --> | |
45 | <!-- ================================================================== --> | |
46 | ||
47 | <set var="PORTNAME"> | |
48 | <if cond="USE_GUI=='0'">base</if> | |
49 | <if cond="USE_GUI=='1'">$(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)</if> | |
50 | </set> | |
51 | ||
52 | <set var="WXBASEPORT"> | |
53 | <if cond="TOOLKIT=='MAC'">_carbon</if> | |
54 | </set> | |
55 | ||
56 | <!-- | |
57 | Optional compiler version, mainly for Windows compilers for which it is | |
58 | supposed to be set on make command line for the official builds. | |
59 | --> | |
60 | <set var="COMPILER_VERSION" make_var="1"> | |
61 | <if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='1'">ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD</if> | |
62 | </set> | |
63 | ||
64 | <set var="COMPILERORGCC"> | |
65 | <if cond="isdefined('COMPILER')">$(COMPILER)</if> | |
66 | <if cond="not isdefined('COMPILER')">gcc</if> | |
67 | </set> | |
68 | ||
69 | <!-- | |
70 | In the official builds we use not only the compiler name but also its | |
71 | version and architecture we compile for in the libraries names. | |
72 | --> | |
73 | <set var="WXCOMPILER"> | |
74 | <if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='1'">_$(COMPILERORGCC)$(COMPILER_VERSION)$(ARCH_SUFFIX)</if> | |
75 | <if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='0'">_$(COMPILERORGCC)</if> | |
76 | </set> | |
77 | ||
78 | <set var="VENDORTAG"> | |
79 | <if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='1'"></if> | |
80 | <if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='0'">_$(VENDOR)</if> | |
81 | </set> | |
82 | ||
83 | <!-- debug suffix used for Windows libraries which use debug CRT --> | |
84 | <set var="WXDEBUGFLAG"> | |
85 | <if cond="BUILD=='debug' and DEBUG_RUNTIME_LIBS=='default'">d</if> | |
86 | <if cond="DEBUG_RUNTIME_LIBS=='1'">d</if> | |
87 | </set> | |
88 | <set var="WXUNICODEFLAG"> | |
89 | <!-- WinCE is Unicode-only platform: --> | |
90 | <if cond="UNICODE=='1' and FORMAT!='msevc4prj'">u</if> | |
91 | </set> | |
92 | <set var="WX_U_D_SUFFIX"> | |
93 | $(WXUNICODEFLAG)$(WXDEBUGFLAG) | |
94 | </set> | |
95 | <set var="WXNAMESUFFIX"> | |
96 | $(WX_U_D_SUFFIX)$(WX_LIB_FLAVOUR) | |
97 | </set> | |
98 | ||
99 | <set var="WXUNIVNAME"> | |
100 | <if cond="WXUNIV=='1'">univ</if> | |
101 | </set> | |
102 | <set var="WXUNIV_DEFINE"> | |
103 | <if cond="WXUNIV=='1'">__WXUNIVERSAL__</if> | |
104 | </set> | |
105 | ||
106 | <if cond="FORMAT=='autoconf'"> | |
107 | <set var="WXNAMEPREFIX">wx_base$(WXBASEPORT)</set> | |
108 | <set var="WXNAMEPREFIXGUI">wx_$(PORTNAME)$(WXUNIVNAME)</set> | |
109 | <set var="WXVERSIONTAG">-$(WX_RELEASE)</set> | |
110 | </if> | |
111 | <if cond="FORMAT!='autoconf'"> | |
112 | <set var="WXNAMEPREFIX"> | |
113 | wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT) | |
114 | </set> | |
115 | <set var="WXNAMEPREFIXGUI"> | |
116 | wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)</set> | |
117 | <set var="WXVERSIONTAG"></set> | |
118 | </if> | |
119 | <set var="WXDLLNAMEPREFIX"> | |
120 | <if cond="PLATFORM_WIN32=='1'"> | |
121 | wxbase$(WXBASEPORT)$(WXWIN32DLLVERSION) | |
122 | </if> | |
123 | <if cond="PLATFORM_WIN32=='0'">$(WXNAMEPREFIX)</if> | |
124 | </set> | |
125 | <set var="WXDLLNAMEPREFIXGUI"> | |
126 | <if cond="PLATFORM_WIN32=='1'"> | |
127 | wx$(PORTNAME)$(WXUNIVNAME)$(WXWIN32DLLVERSION) | |
128 | </if> | |
129 | <if cond="PLATFORM_WIN32=='0'">$(WXNAMEPREFIXGUI)</if> | |
130 | </set> | |
131 | <set var="WXDLLVERSIONTAG"> | |
132 | <if cond="PLATFORM_WIN32=='1'"></if> | |
133 | <if cond="PLATFORM_WIN32=='0'">$(WXVERSIONTAG)</if> | |
134 | </set> | |
135 | ||
136 | ||
137 | <!-- =============================================================== --> | |
138 | <!-- Names of component libraries: --> | |
139 | <!-- =============================================================== --> | |
140 | ||
141 | <set var="WXLIB_BASE"> | |
142 | <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('base')))</if> | |
143 | </set> | |
144 | <set var="WXLIB_NET"> | |
145 | <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('net')))</if> | |
146 | </set> | |
147 | <set var="WXLIB_QA"> | |
148 | <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('qa')))</if> | |
149 | </set> | |
150 | <set var="WXLIB_CORE"> | |
151 | <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))</if> | |
152 | </set> | |
153 | <set var="WXLIB_ADV"> | |
154 | <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('adv')))</if> | |
155 | </set> | |
156 | <set var="WXLIB_MEDIA"> | |
157 | <if cond="MONOLITHIC=='0' and USE_MEDIA=='1'">$(mk.evalExpr(wxwin.mkLibName('media')))</if> | |
158 | </set> | |
159 | <set var="WXLIB_HTML"> | |
160 | <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('html')))</if> | |
161 | </set> | |
162 | <set var="WXLIB_XML"> | |
163 | <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xml')))</if> | |
164 | </set> | |
165 | <set var="WXLIB_XRC"> | |
166 | <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xrc')))</if> | |
167 | </set> | |
168 | <set var="WXLIB_AUI"> | |
169 | <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('aui')))</if> | |
170 | </set> | |
171 | <set var="WXLIB_RIBBON"> | |
172 | <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('ribbon')))</if> | |
173 | </set> | |
174 | <set var="WXLIB_PROPGRID"> | |
175 | <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('propgrid')))</if> | |
176 | </set> | |
177 | <set var="WXLIB_RICHTEXT"> | |
178 | <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('richtext')))</if> | |
179 | </set> | |
180 | <set var="WXLIB_STC"> | |
181 | <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('stc')))</if> | |
182 | </set> | |
183 | <set var="WXLIB_WEBVIEW"> | |
184 | <if cond="MONOLITHIC=='0' and USE_WEBVIEW=='1'">$(mk.evalExpr(wxwin.mkLibName('webview')))</if> | |
185 | </set> | |
186 | <set var="WXLIB_MONO"> | |
187 | <if cond="MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))</if> | |
188 | </set> | |
189 | ||
190 | ||
191 | <!-- =============================================================== --> | |
192 | <!-- Where to store built libraries and objects: --> | |
193 | <!-- =============================================================== --> | |
194 | ||
195 | <if cond="FORMAT!='autoconf'"> | |
196 | <set var="WXDLLFLAG"> | |
197 | <if cond="SHARED=='1'">dll</if> | |
198 | </set> | |
199 | <set var="CFG_NAME_PART"> | |
200 | $(PORTNAME)$(WXUNIVNAME)$(WX_U_D_SUFFIX)$(WXDLLFLAG)$(CFG) | |
201 | </set> | |
202 | ||
203 | <!-- NB: this is make_var so that it can be overridden on command line | |
204 | like this: nmake -f makefile.vc COMPILER_PREFIX=vc6 --> | |
205 | <set var="COMPILER_PREFIX" make_var="1">$(COMPILER)</set> | |
206 | ||
207 | <set var="OBJS" make_var="1"> | |
208 | $(COMPILER_PREFIX)$(COMPILER_VERSION)_$(CFG_NAME_PART)$(ARCH_SUFFIX) | |
209 | </set> | |
210 | ||
211 | <set var="BUILDDIR">$(OBJS)</set> | |
212 | </if> | |
213 | ||
214 | <set var="LIBTYPE_SUFFIX" make_var="1"> | |
215 | <if cond="FORMAT!='autoconf' and SHARED=='0' and PLATFORM_WIN32=='1'">lib</if> | |
216 | <if cond="FORMAT!='autoconf' and SHARED=='1' and PLATFORM_WIN32=='1'">dll</if> | |
217 | <if cond="FORMAT=='watcom' and SHARED=='0' and PLATFORM_WIN32=='0'">$(TOOLKIT_LOWERCASE)_lib</if> | |
218 | <if cond="FORMAT=='watcom' and SHARED=='1' and PLATFORM_WIN32=='0'">$(TOOLKIT_LOWERCASE)_dll</if> | |
219 | </set> | |
220 | ||
221 | <set var="LIBDIRNAME" make_var="1"> | |
222 | <if cond="FORMAT=='autoconf'">$(wx_top_builddir)/lib</if> | |
223 | <if cond="FORMAT!='autoconf'"> | |
224 | $(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER_PREFIX)$(COMPILER_VERSION)$(ARCH_SUFFIX)_$(LIBTYPE_SUFFIX)$(CFG) | |
225 | </if> | |
226 | </set> | |
227 | ||
228 | <if cond="FORMAT!='autoconf'"> | |
229 | <set var="SETUPHDIR" make_var="1"> | |
230 | $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WX_U_D_SUFFIX) | |
231 | </set> | |
232 | </if> | |
233 | ||
234 | ||
235 | ||
236 | <!-- =============================================================== --> | |
237 | <!-- Templates for libs: --> | |
238 | <!-- =============================================================== --> | |
239 | ||
240 | <set var="DEBUGINFO"> | |
241 | <if cond="BUILD=='debug' and DEBUG_INFO=='default'">on</if> | |
242 | <if cond="DEBUG_INFO=='1'">on</if> | |
243 | <if cond="BUILD=='release' and DEBUG_INFO=='default'">off</if> | |
244 | <if cond="DEBUG_INFO=='0'">off</if> | |
245 | </set> | |
246 | <set var="DEBUGRUNTIME"> | |
247 | <if cond="DEBUG_RUNTIME_LIBS=='default' and BUILD=='debug'">on</if> | |
248 | <if cond="DEBUG_RUNTIME_LIBS=='default' and BUILD=='release'">off</if> | |
249 | <if cond="DEBUG_RUNTIME_LIBS=='0'">off</if> | |
250 | <if cond="DEBUG_RUNTIME_LIBS=='1'">on</if> | |
251 | </set> | |
252 | <set var="OPTIMIZEFLAG"> | |
253 | <if cond="BUILD=='debug'">off</if> | |
254 | <if cond="BUILD=='release'">speed</if> | |
255 | </set> | |
256 | <set var="EXCEPTIONSFLAG"> | |
257 | <if cond="USE_EXCEPTIONS=='1'">on</if> | |
258 | <if cond="USE_EXCEPTIONS=='0'">off</if> | |
259 | </set> | |
260 | <set var="RTTIFLAG"> | |
261 | <if cond="USE_RTTI=='1'">on</if> | |
262 | <if cond="USE_RTTI=='0'">off</if> | |
263 | </set> | |
264 | <set var="THREADSFLAG"> | |
265 | <if cond="USE_THREADS=='1'">multi</if> | |
266 | <if cond="USE_THREADS=='0'">single</if> | |
267 | </set> | |
268 | ||
269 | <set var="RTTI_DEFINE"> | |
270 | <if cond="USE_RTTI=='0'">wxNO_RTTI</if> | |
271 | </set> | |
272 | <set var="EXCEPTIONS_DEFINE"> | |
273 | <if cond="USE_EXCEPTIONS=='0'">wxNO_EXCEPTIONS</if> | |
274 | </set> | |
275 | <set var="THREAD_DEFINE"> | |
276 | <if cond="USE_THREADS=='0'">wxNO_THREADS</if> | |
277 | </set> | |
278 | ||
279 | <set var="DEBUG_DEFINE"> | |
280 | <if cond="DEBUG_FLAG=='0'">wxDEBUG_LEVEL=0</if> | |
281 | </set> | |
282 | <set var="NDEBUG_DEFINE"> | |
283 | <if cond="FORMAT!='autoconf' and DEBUG_RUNTIME_LIBS=='default' and BUILD=='release'">NDEBUG</if> | |
284 | <if cond="FORMAT!='autoconf' and DEBUG_RUNTIME_LIBS=='0'">NDEBUG</if> | |
285 | </set> | |
286 | ||
287 | <!-- does not cover all cases, but better than nothing --> | |
288 | <set var="NO_VC_CRTDBG"> | |
289 | <if cond="FORMAT=='msvc' and BUILD=='debug' and DEBUG_RUNTIME_LIBS=='0'">__NO_VC_CRTDBG__</if> | |
290 | <if cond="FORMAT=='msvc' and BUILD=='release' and DEBUG_FLAG=='1'">__NO_VC_CRTDBG__</if> | |
291 | </set> | |
292 | <set var="UNICODE_DEFINE"> | |
293 | <if cond="FORMAT!='autoconf' and UNICODE=='1'">_UNICODE</if> | |
294 | <if cond="FORMAT!='autoconf' and UNICODE=='0'">wxUSE_UNICODE=0</if> | |
295 | </set> | |
296 | <set var="MSLU_DEFINE"> | |
297 | <if cond="FORMAT!='autoconf' and MSLU=='1'">wxUSE_UNICODE_MSLU=1</if> | |
298 | </set> | |
299 | ||
300 | <!-- fill for the specific case of the format/compiler --> | |
301 | <set var="WIN32_WINNT"> | |
302 | <if cond="FORMAT=='dmars' or FORMAT=='dmars_smake'">_WIN32_WINNT=0x0400</if> | |
303 | </set> | |
304 | ||
305 | <set var="UNICOWS_LIB"> | |
306 | <if cond="MSLU=='1'">unicows</if> | |
307 | </set> | |
308 | <set var="CAIRO_LIB"> | |
309 | <if cond="USE_CAIRO=='1'">cairo</if> | |
310 | </set> | |
311 | <set var="CAIRO_LIBDIR"> | |
312 | <if cond="USE_CAIRO=='1'">$(DOLLAR)(CAIRO_ROOT)/lib</if> | |
313 | </set> | |
314 | <set var="CAIRO_INCLUDEDIR"> | |
315 | <if cond="USE_CAIRO=='1'">$(DOLLAR)(CAIRO_ROOT)/include/cairo</if> | |
316 | </set> | |
317 | ||
318 | <set var="LINK_TARGET_CPU"> | |
319 | <if cond="TARGET_CPU=='amd64'">/MACHINE:X64</if> | |
320 | <if cond="TARGET_CPU=='AMD64'">/MACHINE:X64</if> | |
321 | <if cond="TARGET_CPU=='ia64'">/MACHINE:IA64</if> | |
322 | <if cond="TARGET_CPU=='IA64'">/MACHINE:IA64</if> | |
323 | <if cond="TARGET_CPU=='x64'">/MACHINE:X64</if> | |
324 | <if cond="TARGET_CPU=='X64'">/MACHINE:X64</if> | |
325 | </set> | |
326 | ||
327 | <template id="common_settings"> | |
328 | <debug-info>$(DEBUGINFO)</debug-info> | |
329 | <debug-runtime-libs>$(DEBUGRUNTIME)</debug-runtime-libs> | |
330 | <optimize>$(OPTIMIZEFLAG)</optimize> | |
331 | <threading>$(THREADSFLAG)</threading> | |
332 | <runtime-libs>$(RUNTIME_LIBS)</runtime-libs> | |
333 | <cxx-rtti>$(RTTIFLAG)</cxx-rtti> | |
334 | <cxx-exceptions>$(EXCEPTIONSFLAG)</cxx-exceptions> | |
335 | <if cond="FORMAT!='autoconf'"> | |
336 | <cppflags>$(EXTRACFLAGS)</cppflags> | |
337 | </if> | |
338 | <!-- Suppress deprecation warnings for standard library calls --> | |
339 | <if cond="FORMAT in ['msvc','msvs2005prj','msvs2008prj']"> | |
340 | <define>_CRT_SECURE_NO_DEPRECATE=1</define> | |
341 | <define>_CRT_NON_CONFORMING_SWPRINTFS=1</define> | |
342 | <define>_SCL_SECURE_NO_WARNINGS=1</define> | |
343 | </if> | |
344 | ||
345 | <define>$(NO_VC_CRTDBG)</define> | |
346 | <define>$(WIN32_WINNT)</define> | |
347 | <if cond="FORMAT=='msvc'"> | |
348 | <ldflags>$(LINK_TARGET_CPU)</ldflags> | |
349 | </if> | |
350 | <include cond="FORMAT=='msevc4prj'">$(TOP_SRCDIR)build/wince/missing</include> | |
351 | </template> | |
352 | ||
353 | <template id="anylib"> | |
354 | <dirname>$(LIBDIRNAME)</dirname> | |
355 | <install-to>$(LIBDIR)</install-to> | |
356 | </template> | |
357 | ||
358 | <template id="3rdparty_lib" template="common_settings,anylib"> | |
359 | <if cond="FORMAT=='autoconf'"> | |
360 | <libname>$(id)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)</libname> | |
361 | </if> | |
362 | <if cond="FORMAT!='autoconf'"> | |
363 | <libname>$(id)$(WXDEBUGFLAG)$(HOST_SUFFIX)</libname> | |
364 | </if> | |
365 | <!-- | |
366 | we want to install 3rd party libs system-wide only with static | |
367 | version of wxWidgets; otherwise they are embedded in shared libs: | |
368 | --> | |
369 | <install-if>SHARED=='0'</install-if> | |
370 | <pic>$(substituteFromDict(SHARED, {'0':'off', '1':'on'}))</pic> | |
371 | ||
372 | <!-- | |
373 | we don't want to have asserts in the 3rd party libraries code, | |
374 | neither we nor wx users are interested in debugging them anyhow | |
375 | --> | |
376 | <define>NDEBUG</define> | |
377 | ||
378 | <if cond="IS_MSVC"> | |
379 | <!-- | |
380 | we're not interested in deprecation warnings about the use of | |
381 | standard C functions in the 3rd party libraries (these warnings | |
382 | are only given by VC8+ but it's simpler to just always define | |
383 | this symbol which disables them, even for previous VC versions) | |
384 | --> | |
385 | <define>_CRT_SECURE_NO_WARNINGS</define> | |
386 | </if> | |
387 | </template> | |
388 | ||
389 | ||
390 | <!-- deal with the need to copy setup.h here: --> | |
391 | ||
392 | <define-tag name="msvc-headers" rules="dll,lib"> | |
393 | <if cond="IS_MSVC_PRJ"> | |
394 | <msvc-project-files> | |
395 | $(addPrefixToList('include\\', wxwin.headersOnly(value))) | |
396 | </msvc-project-files> | |
397 | </if> | |
398 | </define-tag> | |
399 | ||
400 | <set var="msvc_copy_setup_h_script"> | |
401 | <if cond="IS_MSVC_PRJ=='1' and FORMAT not in ['msvc6prj','msevc4prj']"> | |
402 | Creating $(SETUPHDIR)\wx\setup.h | |
403 | InputPath=..\..\include\wx\%s | |
404 | ||
405 | "$(SETUPHDIR)\wx\setup.h" : | |
406 | $(TAB)copy "$(DOLLAR)(InputPath)" $(SETUPHDIR)\wx\setup.h | |
407 | </if> | |
408 | <if cond="IS_MSVC_PRJ=='1' and FORMAT in ['msvc6prj','msevc4prj']"> | |
409 | Creating $(SETUPHDIR)\wx\setup.h | |
410 | InputPath=..\..\include\wx\%s | |
411 | ||
412 | "$(SETUPHDIR)\wx\setup.h" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)" | |
413 | $(TAB)copy "$(DOLLAR)(InputPath)" $(SETUPHDIR)\wx\setup.h | |
414 | </if> | |
415 | </set> | |
416 | ||
417 | <define-tag name="msvc-headers-setup-h" rules="dll,lib"> | |
418 | <if cond="IS_MSVC_PRJ"> | |
419 | <msvc-headers> | |
420 | $(addPrefixToList('wx/', value)) | |
421 | </msvc-headers> | |
422 | <set var="_custom_build_files" append="1"> | |
423 | $(nativePaths(addPrefixToList('include/wx/', value))) | |
424 | </set> | |
425 | </if> | |
426 | </define-tag> | |
427 | ||
428 | <define-tag name="msvc-copy-setup-h" rules="dll,lib"> | |
429 | <if cond="IS_MSVC_PRJ"> | |
430 | <if cond="FORMAT=='msevc4prj'"> | |
431 | <msvc-headers-setup-h> | |
432 | msw/wince/setup.h | |
433 | </msvc-headers-setup-h> | |
434 | <set var="_custom_build_include_wx_msw_wince_setup_h"> | |
435 | $(msvc_copy_setup_h_script % 'msw\wince\setup.h') | |
436 | </set> | |
437 | </if> | |
438 | <if cond="FORMAT!='msevc4prj'"> | |
439 | <msvc-headers-setup-h> | |
440 | msw/setup.h | |
441 | univ/setup.h | |
442 | </msvc-headers-setup-h> | |
443 | <set var="_custom_build_include_wx_msw_setup_h"> | |
444 | <if cond="WXUNIV=='0' and TOOLKIT=='MSW'"> | |
445 | $(msvc_copy_setup_h_script % 'msw\setup.h') | |
446 | </if> | |
447 | </set> | |
448 | <set var="_custom_build_include_wx_univ_setup_h"> | |
449 | <if cond="WXUNIV=='1'"> | |
450 | $(msvc_copy_setup_h_script % 'univ\setup.h') | |
451 | </if> | |
452 | </set> | |
453 | </if> | |
454 | </if> | |
455 | </define-tag> | |
456 | ||
457 | <define-tag name="msvc-create-rcdefs-h" rules="dll,lib"> | |
458 | <if cond="IS_MSVC_PRJ"> | |
459 | <msvc-headers-setup-h> | |
460 | msw/genrcdefs.h | |
461 | </msvc-headers-setup-h> | |
462 | <!-- FIXME: we need another way to get the compiler name --> | |
463 | <set var="VC_COMPILER"> | |
464 | <if cond="FORMAT=='msevc4prj'">$(_COMPILER)</if> | |
465 | <if cond="FORMAT!='msevc4prj'">cl</if> | |
466 | </set> | |
467 | <set var="_custom_build_include_wx_msw_genrcdefs_h"> | |
468 | Creating $(SETUPHDIR)\wx\msw\rcdefs.h | |
469 | InputPath=..\..\include\wx\msw\genrcdefs.h | |
470 | ||
471 | "$(SETUPHDIR)\wx\msw\rcdefs.h" : "$(DOLLAR)(SOURCE)" "$(SETUPHDIR)\wx\msw" | |
472 | $(TAB)$(VC_COMPILER) /EP /nologo "$(DOLLAR)(InputPath)" > "$(SETUPHDIR)\wx\msw\rcdefs.h" | |
473 | </set> | |
474 | </if> | |
475 | </define-tag> | |
476 | ||
477 | <template id="msvc_setup_h"> | |
478 | <msvc-copy-setup-h/> | |
479 | <msvc-create-rcdefs-h/> | |
480 | </template> | |
481 | ||
482 | <!-- =============================================================== --> | |
483 | <!-- 3rd party libs: --> | |
484 | <!-- =============================================================== --> | |
485 | ||
486 | <!-- 3rd party libraries: --> | |
487 | <include file="regex.bkl"/> | |
488 | <include file="zlib.bkl"/> | |
489 | <include file="png.bkl"/> | |
490 | <include file="jpeg.bkl"/> | |
491 | <include file="tiff.bkl"/> | |
492 | <include file="expat.bkl"/> | |
493 | <include file="scintilla.bkl"/> | |
494 | ||
495 | ||
496 | <!-- =============================================================== --> | |
497 | <!-- Templates for wxWidgets libs: --> | |
498 | <!-- =============================================================== --> | |
499 | ||
500 | <!-- NB: in monolithic build, even wxBase-only must be linked against | |
501 | GUI extralibs, otherwise there would be unresolved references. | |
502 | The variables below are defined so that all libs are used | |
503 | in monolithic build, but not in multilib one. --> | |
504 | <set var="EXTRALIBS_FOR_BASE"> | |
505 | <if cond="MONOLITHIC=='1'">$(EXTRALIBS) $(EXTRALIBS_XML) $(EXTRALIBS_GUI)</if> | |
506 | <if cond="MONOLITHIC=='0'">$(EXTRALIBS)</if> | |
507 | </set> | |
508 | <set var="EXTRALIBS_FOR_GUI"> | |
509 | <if cond="MONOLITHIC=='1'"></if> | |
510 | <if cond="MONOLITHIC=='0'">$(EXTRALIBS_GUI)</if> | |
511 | </set> | |
512 | ||
513 | <template id="wx" template="common_settings"> | |
514 | <set var="wxid">$(wxwin.mk_wxid(id))</set> | |
515 | <define>__WX$(TOOLKIT)__</define> | |
516 | <define>$(WXUNIV_DEFINE)</define> | |
517 | <define>$(DEBUG_DEFINE)</define> | |
518 | <define>$(NDEBUG_DEFINE)</define> | |
519 | <define>$(EXCEPTIONS_DEFINE)</define> | |
520 | <define>$(RTTI_DEFINE)</define> | |
521 | <define>$(THREAD_DEFINE)</define> | |
522 | <define>$(UNICODE_DEFINE)</define> | |
523 | <define>$(MSLU_DEFINE)</define> | |
524 | <include cond="FORMAT!='autoconf'">$(SETUPHDIR)</include> | |
525 | <include cond="FORMAT!='autoconf'">$(TOP_SRCDIR)include</include> | |
526 | <include cond="FORMAT!='autoconf'">$(CAIRO_INCLUDEDIR)</include> | |
527 | <lib-path>$(LIBDIRNAME)</lib-path> | |
528 | ||
529 | <warnings>max</warnings> | |
530 | <cxxflags cond="FORMAT=='autoconf'">$(CXXWARNINGS)</cxxflags> | |
531 | <cppflags-watcom> | |
532 | -wcd=549 <!-- 'sizeof' operand contains compiler generated information --> | |
533 | -wcd=656 <!-- define this function inside its class definition (may improve code quality) --> | |
534 | -wcd=657 <!-- define this function inside its class definition (could have improved code quality) --> | |
535 | -wcd=667 <!-- 'va_start' macro will not work without an argument before '...' --> | |
536 | </cppflags-watcom> | |
537 | <cxxflags-mingw> | |
538 | -Wno-ctor-dtor-privacy <!-- only defines a private destructor and has no friends --> | |
539 | </cxxflags-mingw> | |
540 | </template> | |
541 | ||
542 | <!-- for both GUI and wxBase libs/samples: --> | |
543 | <template id="wx_append_base_nomono"> | |
544 | <!-- link against builtin 3rd party libs, if needed: --> | |
545 | <sys-lib>$(LIB_ZLIB)</sys-lib> | |
546 | <sys-lib>$(LIB_REGEX)</sys-lib> | |
547 | <sys-lib>$(LIB_EXPAT)</sys-lib> | |
548 | ||
549 | <ldlibs>$(EXTRALIBS_FOR_BASE)</ldlibs> | |
550 | ||
551 | <!-- system libraries on os2: --> | |
552 | <if cond="FORMAT!='autoconf' and PLATFORM_OS2=='1'"> | |
553 | <if cond="FORMAT=='watcom'"> | |
554 | <sys-lib>upm32</sys-lib> | |
555 | </if> | |
556 | </if> | |
557 | ||
558 | <!-- system libraries on windows: --> | |
559 | <if cond="FORMAT!='autoconf' and PLATFORM_WIN32=='1'"> | |
560 | <sys-lib>$(UNICOWS_LIB)</sys-lib> | |
561 | <sys-lib>$(CAIRO_LIB)</sys-lib> | |
562 | <lib-path>$(CAIRO_LIBDIR)</lib-path> | |
563 | <if cond="FORMAT=='borland'"> | |
564 | <sys-lib>ole2w32</sys-lib> | |
565 | </if> | |
566 | <if cond="FORMAT=='msevc4prj'"> | |
567 | <sys-lib>ole32</sys-lib> | |
568 | <sys-lib>oleaut32</sys-lib> | |
569 | <sys-lib>uuid</sys-lib> | |
570 | <sys-lib>commctrl</sys-lib> | |
571 | <sys-lib>winsock</sys-lib> | |
572 | <sys-lib>wininet</sys-lib> | |
573 | </if> | |
574 | <if cond="FORMAT!='borland' and FORMAT!='msevc4prj'"> | |
575 | <sys-lib>kernel32</sys-lib> | |
576 | <sys-lib>user32</sys-lib> | |
577 | <sys-lib>gdi32</sys-lib> | |
578 | <sys-lib>comdlg32</sys-lib> | |
579 | <sys-lib>winspool</sys-lib> | |
580 | <sys-lib>winmm</sys-lib> | |
581 | <sys-lib>shell32</sys-lib> | |
582 | <sys-lib>comctl32</sys-lib> | |
583 | <sys-lib>ole32</sys-lib> | |
584 | <sys-lib>oleaut32</sys-lib> | |
585 | <sys-lib>uuid</sys-lib> | |
586 | <sys-lib>rpcrt4</sys-lib> | |
587 | <sys-lib>advapi32</sys-lib> | |
588 | <sys-lib>wsock32</sys-lib> | |
589 | <!-- this one is only used if wxUSE_URL_NATIVE==1 but we don't | |
590 | know if it is here so just add it unconditionally --> | |
591 | <sys-lib>wininet</sys-lib> | |
592 | </if> | |
593 | <if cond="FORMAT=='borland'"> | |
594 | <sys-lib>oleacc</sys-lib> | |
595 | </if> | |
596 | </if> | |
597 | </template> | |
598 | ||
599 | ||
600 | <!-- for GUI libs/samples: --> | |
601 | <template id="wx_append_nomono" template_append="wx_append_base_nomono"> | |
602 | <sys-lib>$(LIB_TIFF)</sys-lib> | |
603 | <sys-lib>$(LIB_JPEG)</sys-lib> | |
604 | <sys-lib>$(LIB_PNG)</sys-lib> | |
605 | <ldlibs>$(EXTRALIBS_FOR_GUI)</ldlibs> | |
606 | </template> | |
607 | ||
608 | <set var="LIB_PNG_IF_MONO"> | |
609 | <if cond="MONOLITHIC=='1'">$(LIB_PNG)</if> | |
610 | </set> | |
611 | ||
612 | <template id="wx_append_base" template_append="wx_append_base_nomono"> | |
613 | <!-- Always link against the full wx library in monolithic build and | |
614 | also against the PNG one as core code references it for Tango | |
615 | icons and so it is pulled in even by the console programs. --> | |
616 | <sys-lib>$(WXLIB_MONO)</sys-lib> | |
617 | <sys-lib>$(LIB_PNG_IF_MONO)</sys-lib> | |
618 | </template> | |
619 | <template id="wx_append" template_append="wx_append_nomono"> | |
620 | <!-- Always link against the wxWin library in monolithic build: --> | |
621 | <sys-lib>$(WXLIB_MONO)</sys-lib> | |
622 | </template> | |
623 | ||
624 | ||
625 | <set var="WX_DISABLE_PRECOMP_HEADERS" overwrite="0">0</set> | |
626 | ||
627 | <template id="wx_lib_b" template="wx,anylib"> | |
628 | <set var="WXLIBNAME">$(wxwin.mkLibName(wxid))</set> | |
629 | <libname>$(WXLIBNAME)</libname> | |
630 | ||
631 | <define>WXBUILDING</define> | |
632 | ||
633 | <if cond="WX_DISABLE_PRECOMP_HEADERS=='0'"> | |
634 | <if cond="FORMAT!='autoconf'"> | |
635 | <sources>$(WXTOPDIR)src/common/dummy.cpp</sources> | |
636 | <precomp-headers-gen> | |
637 | $(WXTOPDIR)src/common/dummy.cpp | |
638 | </precomp-headers-gen> | |
639 | </if> | |
640 | <precomp-headers-location>$(WXTOPDIR)include</precomp-headers-location> | |
641 | <precomp-headers-header>wx/wxprec.h</precomp-headers-header> | |
642 | <precomp-headers>on</precomp-headers> | |
643 | <precomp-headers-file>wxprec_$(id)</precomp-headers-file> | |
644 | <precomp-headers-exclude> | |
645 | src/common/extended.c | |
646 | src/gtk/eggtrayicon.c | |
647 | src/gtk/treeentry_gtk.c | |
648 | </precomp-headers-exclude> | |
649 | </if> | |
650 | ||
651 | <if cond="IS_MSVC_PRJ=='1' and BUILDING_LIB=='1'"> | |
652 | <msvc-file-group>Common Sources:src/common/*</msvc-file-group> | |
653 | <msvc-file-group>MSW Sources:src/msw/*</msvc-file-group> | |
654 | <msvc-file-group>Generic Sources:src/generic/*</msvc-file-group> | |
655 | <msvc-file-group>wxUniv Sources:src/univ/*</msvc-file-group> | |
656 | <msvc-file-group>wxHTML Sources:src/html/*</msvc-file-group> | |
657 | <msvc-file-group>Setup Headers:*/setup.h</msvc-file-group> | |
658 | <msvc-file-group>MSW Headers:*wx/msw/*.h</msvc-file-group> | |
659 | <msvc-file-group>Generic Headers:*wx/generic/*.h</msvc-file-group> | |
660 | <msvc-file-group>wxUniv Headers:*wx/univ/*.h</msvc-file-group> | |
661 | <msvc-file-group>wxHTML Headers:*wx/html/*.h</msvc-file-group> | |
662 | <msvc-file-group>Common Headers:*wx/*.h</msvc-file-group> | |
663 | </if> | |
664 | </template> | |
665 | ||
666 | <if cond="FORMAT=='autoconf'"> | |
667 | <set var="RCDEFDIR"> | |
668 | <if cond="TOOLKIT=='MSW'"> | |
669 | $(LIBDIRNAME)/wx/include/$(TOOLCHAIN_FULLNAME) | |
670 | </if> | |
671 | </set> | |
672 | </if> | |
673 | ||
674 | <template id="wx_dll_b" template="wx_lib_b"> | |
675 | <set var="WXDLLNAME">$(wxwin.mkDllName(wxid))</set> | |
676 | <dllname>$(WXDLLNAME)</dllname> | |
677 | <version>$(WX_VERSION)</version> | |
678 | <so_version>$(WXSOVERSION)</so_version> | |
679 | ||
680 | <!-- FIXME: until libtool scheme is implemented in bakefile --> | |
681 | <ldflags cond="FORMAT=='autoconf'">$(WXMACVERSION_CMD)</ldflags> | |
682 | ||
683 | <!-- version info resources: --> | |
684 | <res-define>WXDLLNAME=$(WXDLLNAME)</res-define> | |
685 | <if cond="FORMAT=='autoconf'"> | |
686 | <res-include>$(RCDEFDIR)</res-include> | |
687 | <res-include>$(TOP_SRCDIR)include</res-include> | |
688 | <postlink-command>$(DYLIB_RPATH_POSTLINK)</postlink-command> | |
689 | </if> | |
690 | <win32-res>$(WXTOPDIR)src/msw/version.rc</win32-res> | |
691 | ||
692 | </template> | |
693 | ||
694 | <template id="wx_3rdparty_dependencies_gui" cond="USE_GUI=='1'"> | |
695 | <depends>wxtiff</depends> | |
696 | <depends>wxjpeg</depends> | |
697 | <depends>wxpng</depends> | |
698 | <depends>wxscintilla</depends> | |
699 | </template> | |
700 | ||
701 | <template id="wx_3rdparty_dependencies" | |
702 | template="wx_3rdparty_dependencies_gui"> | |
703 | <depends>wxexpat</depends> | |
704 | <depends>wxzlib</depends> | |
705 | <depends>wxregex</depends> | |
706 | </template> | |
707 | ||
708 | <template id="wx_3rdparty_includes_gui" cond="USE_GUI=='1'"> | |
709 | <include>$(INC_TIFF_BUILD)</include> | |
710 | <include>$(INC_TIFF)</include> | |
711 | <include>$(INC_JPEG)</include> | |
712 | <include>$(INC_PNG)</include> | |
713 | </template> | |
714 | ||
715 | <template id="wx_3rdparty_includes" | |
716 | template="wx_3rdparty_includes_gui"> | |
717 | <include>$(INC_ZLIB)</include> | |
718 | <include>$(INC_REGEX)</include> | |
719 | <include>$(INC_EXPAT)</include> | |
720 | </template> | |
721 | ||
722 | <template id="wx_lib" | |
723 | template="wx_lib_b,wx_3rdparty_includes,msvc_setup_h"/> | |
724 | <template id="wx_base_lib" | |
725 | template="wx_lib_b,wx_3rdparty_includes,msvc_setup_h"> | |
726 | <define>wxUSE_GUI=0</define> | |
727 | </template> | |
728 | ||
729 | <template id="wx_dll" | |
730 | template="wx_dll_b,wx_3rdparty_dependencies,wx_3rdparty_includes" | |
731 | template_append="msvc_setup_h,wx_append_nomono"/> | |
732 | <template id="wx_base_dll" | |
733 | template="wx_dll_b,wx_3rdparty_dependencies,wx_3rdparty_includes" | |
734 | template_append="msvc_setup_h,wx_append_base_nomono"> | |
735 | <define>wxUSE_GUI=0</define> | |
736 | </template> | |
737 | ||
738 | <!-- =============================================================== --> | |
739 | <!-- Templates for building wxWidgets plugins: --> | |
740 | <!-- =============================================================== --> | |
741 | ||
742 | <if cond="WX_STABLE_BRANCH=='1'"> | |
743 | <set var="PLUGIN_VERSION0"> | |
744 | <if cond="PLATFORM_UNIX=='1'">$(WX_RELEASE)</if> | |
745 | <if cond="PLATFORM_UNIX=='0'">$(WX_RELEASE_NODOT)</if> | |
746 | </set> | |
747 | </if> | |
748 | <if cond="WX_STABLE_BRANCH=='0'"> | |
749 | <set var="PLUGIN_VERSION0"> | |
750 | <if cond="PLATFORM_UNIX=='1'">$(WX_VERSION)</if> | |
751 | <if cond="PLATFORM_UNIX=='0'">$(WX_VERSION_NODOT)</if> | |
752 | </set> | |
753 | </if> | |
754 | <set var="PLUGVERDELIM"> | |
755 | <if cond="PLATFORM_UNIX=='1'">-</if> | |
756 | <if cond="PLATFORM_UNIX=='0'"></if> | |
757 | </set> | |
758 | <set var="PLUGIN_VERSION">$(PLUGVERDELIM)$(PLUGIN_VERSION0)</set> | |
759 | ||
760 | <set var="PLUGINS_INST_DIR" make_var="1"> | |
761 | $(LIBDIR)/wx/$(PLUGIN_VERSION0) | |
762 | </set> | |
763 | ||
764 | <define-rule name="wx-base-plugin" extends="module"> | |
765 | <template> | |
766 | <dllname> | |
767 | $(id)$(WX_U_D_SUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER) | |
768 | </dllname> | |
769 | <define>WXUSINGDLL</define> | |
770 | <define>wxUSE_GUI=0</define> | |
771 | <install-to>$(PLUGINS_INST_DIR)</install-to> | |
772 | </template> | |
773 | </define-rule> | |
774 | ||
775 | <define-rule name="wx-gui-plugin" extends="module"> | |
776 | <template template="wx"> | |
777 | <dllname> | |
778 | $(id)_$(PORTNAME)$(WXUNIVNAME)$(WX_U_D_SUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER) | |
779 | </dllname> | |
780 | <define>WXUSINGDLL</define> | |
781 | <install-to>$(PLUGINS_INST_DIR)</install-to> | |
782 | </template> | |
783 | </define-rule> | |
784 | ||
785 | <!-- =============================================================== --> | |
786 | <!-- Support for wxWidgets samples: --> | |
787 | <!-- =============================================================== --> | |
788 | ||
789 | <!-- Link against one wxWin library. Value must be literal! --> | |
790 | <define-tag name="wx-lib" rules="exe,dll,module"> | |
791 | <sys-lib>$(wxwin.libToLink(value))</sys-lib> | |
792 | <ldlibs>$(wxwin.extraLdflags(value))</ldlibs> | |
793 | <!-- msvs200?prj formats don't support external dependencies yet: --> | |
794 | <if cond="FORMAT in ['msvc6prj','msevc4prj'] and MONOLITHIC=='0'"> | |
795 | <depends-on-dsp>$(wxwin.makeDspDependency(value))</depends-on-dsp> | |
796 | </if> | |
797 | </define-tag> | |
798 | ||
799 | ||
800 | <!-- A hack to keep autoconf happy (we pass CPPFLAGS that contain | |
801 | {top_srcdir} from configure, poor bakefile can't know that | |
802 | and won't output top_srcdir = @top_srcdir@ line): --> | |
803 | <set var="VARS_DONT_ELIMINATE" append="1">top_srcdir</set> | |
804 | ||
805 | ||
806 | </makefile> |