]> git.saurik.com Git - wxWidgets.git/blob - build/bakefiles/common.bkl
Allow multiline tooltip testing.
[wxWidgets.git] / build / bakefiles / common.bkl
1 <?xml version="1.0" ?>
2 <!-- $Id$ -->
3
4 <makefile>
5
6 <requires version="0.1.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 <!-- FIXME: PalmOS is another candidate to bakefiles -->
26 <set var="PLATFORM_PALMOS">0</set>
27
28 <include file="config.bkl"/>
29
30 <include file="plugins_deps.bkl"/>
31
32 <!-- ================================================================== -->
33 <!-- wxWidgets version numbers: -->
34 <!-- ================================================================== -->
35
36 <set var="WXVER_MAJOR">$(wxwin.getVersionMajor())</set>
37 <set var="WXVER_MINOR">$(wxwin.getVersionMinor())</set>
38 <set var="WXVER_RELEASE">$(wxwin.getVersionRelease())</set>
39 <set var="WX_RELEASE" make_var="1">
40 $(WXVER_MAJOR).$(WXVER_MINOR)
41 </set>
42 <set var="WX_RELEASE_NODOT" make_var="1">
43 $(WXVER_MAJOR)$(WXVER_MINOR)
44 </set>
45 <set var="WX_VERSION" make_var="1">
46 $(WX_RELEASE).$(WXVER_RELEASE)
47 </set>
48 <set var="WX_VERSION_NODOT" make_var="1">
49 $(WX_RELEASE_NODOT)$(WXVER_RELEASE)
50 </set>
51
52 <set var="WX_STABLE_BRANCH">$(int(int(WXVER_MINOR) % 2 == 0))</set>
53
54 <!-- this needs to be reset to 0 on beginning of stable series and
55 increment by one 1 every time binary incompatible change is made
56 (i.e. preferably never) -->
57 <set var="WX_BINARY_VERSION">0</set>
58
59 <set var="WXSOVERSION">
60 <if cond="WX_STABLE_BRANCH=='1'">$(WX_BINARY_VERSION).0.0</if>
61 <if cond="WX_STABLE_BRANCH=='0'">$(WXVER_RELEASE).0.0</if>
62 </set>
63 <set var="WXMACVERSION">$(WX_VERSION)</set>
64 <set var="WXWIN32DLLVERSION">
65 <if cond="WX_STABLE_BRANCH=='1'">$(WX_RELEASE_NODOT)</if>
66 <if cond="WX_STABLE_BRANCH=='0'">$(WX_VERSION_NODOT)</if>
67 </set>
68
69
70 <!-- ================================================================== -->
71 <!-- Names of libraries and DLLs: -->
72 <!-- ================================================================== -->
73
74 <set var="PORTNAME">
75 <if cond="USE_GUI=='0'">base</if>
76 <if cond="USE_GUI=='1'">$(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)</if>
77 </set>
78
79 <set var="WXBASEPORT">
80 <if cond="TOOLKIT=='MAC'">_carbon</if>
81 </set>
82
83 <set var="COMPILERORGCC">
84 <if cond="isdefined('COMPILER')">$(COMPILER)</if>
85 <if cond="not isdefined('COMPILER')">gcc</if>
86 </set>
87 <set var="WXCOMPILER">
88 <if cond="PLATFORM_WIN32=='1'">_$(COMPILERORGCC)</if>
89 </set>
90
91 <set var="VENDORTAG">
92 <if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='1'"></if>
93 <if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='0'">_$(VENDOR)</if>
94 </set>
95
96 <set var="WXDEBUGFLAG">
97 <if cond="BUILD=='debug' and DEBUG_FLAG=='default'">d</if>
98 <if cond="DEBUG_FLAG=='1'">d</if>
99 </set>
100 <set var="WXUNICODEFLAG">
101 <!-- WinCE is Unicode-only platform: -->
102 <if cond="UNICODE=='1' and FORMAT!='msevc4prj'">u</if>
103 </set>
104 <set var="WXNAMESUFFIX">
105 $(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
106 </set>
107
108 <set var="WXUNIVNAME">
109 <if cond="WXUNIV=='1'">univ</if>
110 </set>
111 <set var="WXUNIV_DEFINE">
112 <if cond="WXUNIV=='1'">__WXUNIVERSAL__</if>
113 </set>
114
115 <if cond="FORMAT=='autoconf'">
116 <set var="WXNAMEPREFIX">wx_base$(WXBASEPORT)</set>
117 <set var="WXNAMEPREFIXGUI">wx_$(PORTNAME)$(WXUNIVNAME)</set>
118 <set var="WXVERSIONTAG">-$(WX_RELEASE)</set>
119 </if>
120 <if cond="FORMAT!='autoconf'">
121 <set var="WXNAMEPREFIX">
122 wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)
123 </set>
124 <set var="WXNAMEPREFIXGUI">
125 wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)</set>
126 <set var="WXVERSIONTAG"></set>
127 </if>
128 <set var="WXDLLNAMEPREFIX">
129 <if cond="PLATFORM_WIN32=='1'">
130 wxbase$(WXBASEPORT)$(WXWIN32DLLVERSION)
131 </if>
132 <if cond="PLATFORM_WIN32=='0'">$(WXNAMEPREFIX)</if>
133 </set>
134 <set var="WXDLLNAMEPREFIXGUI">
135 <if cond="PLATFORM_WIN32=='1'">
136 wx$(PORTNAME)$(WXUNIVNAME)$(WXWIN32DLLVERSION)
137 </if>
138 <if cond="PLATFORM_WIN32=='0'">$(WXNAMEPREFIXGUI)</if>
139 </set>
140 <set var="WXDLLVERSIONTAG">
141 <if cond="PLATFORM_WIN32=='1'"></if>
142 <if cond="PLATFORM_WIN32=='0'">$(WXVERSIONTAG)</if>
143 </set>
144
145
146 <!-- =============================================================== -->
147 <!-- Names of component libraries: -->
148 <!-- =============================================================== -->
149
150 <set var="WXLIB_BASE">
151 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('base')))</if>
152 </set>
153 <set var="WXLIB_NET">
154 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('net')))</if>
155 </set>
156 <set var="WXLIB_QA">
157 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('qa')))</if>
158 </set>
159 <set var="WXLIB_CORE">
160 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))</if>
161 </set>
162 <set var="WXLIB_ADV">
163 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('adv')))</if>
164 </set>
165 <set var="WXLIB_MEDIA">
166 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('media')))</if>
167 </set>
168 <set var="WXLIB_HTML">
169 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('html')))</if>
170 </set>
171 <set var="WXLIB_XML">
172 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xml')))</if>
173 </set>
174 <set var="WXLIB_XRC">
175 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xrc')))</if>
176 </set>
177 <set var="WXLIB_ODBC">
178 <if cond="MONOLITHIC=='0' and USE_ODBC=='1'">
179 $(mk.evalExpr(wxwin.mkLibName('odbc')))
180 </if>
181 </set>
182 <set var="WXLIB_DBGRID">
183 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('dbgrid')))</if>
184 </set>
185
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 <set var="DIR_SUFFIX_CPU">
196 <if cond="FORMAT=='msevc4prj'">_$(CPU)</if>
197 </set>
198
199 <if cond="FORMAT!='autoconf'">
200 <set var="WXDLLFLAG">
201 <if cond="SHARED=='1'">dll</if>
202 </set>
203 <set var="CFG_NAME_PART">
204 $(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
205 </set>
206 <set var="OBJS" make_var="1">
207 <if cond="FORMAT!='cbuilderx'">
208 $(COMPILER)_$(CFG_NAME_PART)$(DIR_SUFFIX_CPU)
209 </if>
210 <!-- FIXME: waiting for removal after CBX has better ../ dirs
211 support -->
212 <if cond="FORMAT=='cbuilderx'">build_cbx_$(CFG_NAME_PART)</if>
213 </set>
214
215 <set var="BUILDDIR">$(OBJS)</set>
216 </if>
217
218 <set var="LIBTYPE_SUFFIX" make_var="1">
219 <if cond="FORMAT!='autoconf' and SHARED=='0'">lib</if>
220 <if cond="FORMAT!='autoconf' and SHARED=='1'">dll</if>
221 </set>
222
223 <set var="LIBDIRNAME" make_var="1">
224 <if cond="FORMAT=='autoconf'">$(top_builddir)lib</if>
225 <if cond="FORMAT!='autoconf'">
226 $(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER)$(DIR_SUFFIX_CPU)_$(LIBTYPE_SUFFIX)$(CFG)
227 </if>
228 </set>
229
230 <if cond="FORMAT!='autoconf'">
231 <set var="SETUPHDIR" make_var="1">
232 $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
233 </set>
234 </if>
235
236
237
238 <!-- =============================================================== -->
239 <!-- Templates for libs: -->
240 <!-- =============================================================== -->
241
242 <set var="DEBUGINFO">
243 <if cond="BUILD=='debug' and DEBUG_INFO=='default'">on</if>
244 <if cond="DEBUG_INFO=='1'">on</if>
245 <if cond="BUILD=='release' and DEBUG_INFO=='default'">off</if>
246 <if cond="DEBUG_INFO=='0'">off</if>
247 </set>
248 <set var="DEBUGRUNTIME">
249 <if cond="DEBUG_RUNTIME_LIBS=='default' and BUILD=='debug'">on</if>
250 <if cond="DEBUG_RUNTIME_LIBS=='default' and BUILD=='release'">off</if>
251 <if cond="DEBUG_RUNTIME_LIBS=='0'">off</if>
252 <if cond="DEBUG_RUNTIME_LIBS=='1'">on</if>
253 </set>
254 <set var="OPTIMIZEFLAG">
255 <if cond="BUILD=='debug'">off</if>
256 <if cond="BUILD=='release'">speed</if>
257 </set>
258 <set var="EXCEPTIONSFLAG">
259 <if cond="USE_EXCEPTIONS=='1'">on</if>
260 <if cond="USE_EXCEPTIONS=='0'">off</if>
261 </set>
262 <set var="RTTIFLAG">
263 <if cond="USE_RTTI=='1'">on</if>
264 <if cond="USE_RTTI=='0'">off</if>
265 </set>
266 <set var="THREADSFLAG">
267 <if cond="USE_THREADS=='1'">multi</if>
268 <if cond="USE_THREADS=='0'">single</if>
269 </set>
270
271 <set var="RTTI_DEFINE">
272 <if cond="USE_RTTI=='0'">wxNO_RTTI</if>
273 </set>
274 <set var="EXCEPTIONS_DEFINE">
275 <if cond="USE_EXCEPTIONS=='0'">wxNO_EXCEPTIONS</if>
276 </set>
277 <set var="THREAD_DEFINE">
278 <if cond="USE_THREADS=='0'">wxNO_THREADS</if>
279 </set>
280
281 <set var="DEBUG_DEFINE">
282 <if cond="FORMAT!='autoconf' and BUILD=='debug' and DEBUG_FLAG=='default'">__WXDEBUG__</if>
283 <if cond="FORMAT!='autoconf' and DEBUG_FLAG=='1'">__WXDEBUG__</if>
284 </set>
285 <!-- does not cover all cases, but better than nothing -->
286 <set var="NO_VC_CRTDBG">
287 <if cond="FORMAT=='msvc' and BUILD=='debug' and DEBUG_RUNTIME_LIBS=='0'">__NO_VC_CRTDBG__</if>
288 <if cond="FORMAT=='msvc' and BUILD=='release' and DEBUG_FLAG=='1'">__NO_VC_CRTDBG__</if>
289 </set>
290 <set var="UNICODE_DEFINE">
291 <if cond="FORMAT!='autoconf' and UNICODE=='1'">_UNICODE</if>
292 </set>
293
294 <!-- fill for the specific case of the format/compiler -->
295 <set var="WIN32_WINNT">
296 <if cond="FORMAT=='dmars' or FORMAT=='dmars_smake'">_WIN32_WINNT=0x0400</if>
297 </set>
298
299 <set var="UNICOWS_LIB">
300 <if cond="MSLU=='1'">unicows</if>
301 </set>
302
303 <template id="common_settings">
304 <debug-info>$(DEBUGINFO)</debug-info>
305 <debug-runtime-libs>$(DEBUGRUNTIME)</debug-runtime-libs>
306 <optimize>$(OPTIMIZEFLAG)</optimize>
307 <threading>$(THREADSFLAG)</threading>
308 <runtime-libs>$(RUNTIME_LIBS)</runtime-libs>
309 <cxx-rtti>$(RTTIFLAG)</cxx-rtti>
310 <cxx-exceptions>$(EXCEPTIONSFLAG)</cxx-exceptions>
311 <if cond="FORMAT!='autoconf'">
312 <cppflags>$(EXTRACFLAGS)</cppflags>
313 </if>
314 <define>$(NO_VC_CRTDBG)</define>
315 <define>$(WIN32_WINNT)</define>
316 </template>
317
318 <template id="anylib">
319 <dirname>$(LIBDIRNAME)</dirname>
320 <install-to>$(LIBDIR)</install-to>
321 </template>
322
323 <template id="3rdparty_lib" template="common_settings,anylib">
324 <if cond="FORMAT=='autoconf'">
325 <libname>$(id)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)</libname>
326 </if>
327 <if cond="FORMAT!='autoconf'">
328 <libname>$(id)$(WXDEBUGFLAG)$(HOST_SUFFIX)</libname>
329 </if>
330 <!--
331 we want to install 3rd party libs system-wide only with static
332 version of wxWidgets; otherwise they are embedded in shared libs:
333 -->
334 <install-if>SHARED=='0'</install-if>
335 <pic>$(substituteFromDict(SHARED, {'0':'off', '1':'on'}))</pic>
336 </template>
337
338
339 <!-- deal with the need to copy setup.h here: -->
340
341 <set var="IS_MSVC_PRJ">$(FORMAT in ['msvc6prj','msevc4prj'])</set>
342
343 <define-tag name="msvc-headers" rules="dll,lib">
344 <if cond="IS_MSVC_PRJ">
345 <!-- FIXME: remove this once we require >=bkl-0.1.9 -->
346 <if cond="BAKEFILE_VERSION in ['0.1.7', '0.1.8']">
347 <msvc-project-files>
348 $(addPrefixToList('include\', wxwin.headersOnly(value)))
349 </msvc-project-files>
350 </if>
351 <if cond="BAKEFILE_VERSION not in ['0.1.7', '0.1.8']">
352 <msvc-project-files>
353 $(addPrefixToList('include\\', wxwin.headersOnly(value)))
354 </msvc-project-files>
355 </if>
356 </if>
357 </define-tag>
358
359 <define-tag name="msvc-copy-setup-h" rules="dll,lib">
360 <if cond="FORMAT=='msevc4prj'">
361 <msvc-headers>wx/msw/wince/setup.h</msvc-headers>
362 <set var="vc_setup_h">wince\setup.h</set>
363 <set var="vc_setup_h_rule">wince_setup_h</set>
364 </if>
365 <if cond="FORMAT!='msevc4prj'">
366 <msvc-headers>wx/msw/setup.h</msvc-headers>
367 <set var="vc_setup_h">setup.h</set>
368 <set var="vc_setup_h_rule">setup_h</set>
369 </if>
370 <if cond="IS_MSVC_PRJ">
371 <set var="_custom_build_files" append="1">
372 include\wx\msw\$(vc_setup_h)
373 </set>
374 <set var="_custom_build_include_wx_msw_$(vc_setup_h_rule)">
375 Creating $(SETUPHDIR)\wx\setup.h
376 InputPath=..\include\wx\msw\$(vc_setup_h)
377
378 "$(SETUPHDIR)\wx\setup.h" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)"
379 $(TAB)copy "$(DOLLAR)(InputPath)" $(SETUPHDIR)\wx\setup.h
380 </set>
381 </if>
382 </define-tag>
383
384 <template id="msvc_setup_h">
385 <msvc-copy-setup-h/>
386 </template>
387
388 <!-- =============================================================== -->
389 <!-- 3rd party libs: -->
390 <!-- =============================================================== -->
391
392 <!-- 3rd party libraries: -->
393 <include file="regex.bkl"/>
394 <include file="zlib.bkl"/>
395 <include file="png.bkl"/>
396 <include file="jpeg.bkl"/>
397 <include file="tiff.bkl"/>
398 <include file="odbc.bkl"/>
399 <include file="expat.bkl"/>
400
401
402 <!-- =============================================================== -->
403 <!-- Templates for wxWidgets libs: -->
404 <!-- =============================================================== -->
405
406 <!-- NB: in monolithic build, even wxBase-only must be linked against
407 GUI extralibs, otherwise there would be unresolved references.
408 The variables below are defined so that all libs are used
409 in monolithic build, but not in multilib one. -->
410 <set var="EXTRALIBS_FOR_BASE">
411 <if cond="MONOLITHIC=='1'">$(EXTRALIBS) $(EXTRALIBS_GUI)</if>
412 <if cond="MONOLITHIC=='0'">$(EXTRALIBS)</if>
413 </set>
414 <set var="EXTRALIBS_FOR_GUI">
415 <if cond="MONOLITHIC=='1'"></if>
416 <if cond="MONOLITHIC=='0'">$(EXTRALIBS_GUI)</if>
417 </set>
418
419 <template id="wx" template="common_settings">
420 <set var="wxid">$(wxwin.mk_wxid(id))</set>
421 <define>__WX$(TOOLKIT)__</define>
422 <define>$(WXUNIV_DEFINE)</define>
423 <define>$(DEBUG_DEFINE)</define>
424 <define>$(EXCEPTIONS_DEFINE)</define>
425 <define>$(RTTI_DEFINE)</define>
426 <define>$(THREAD_DEFINE)</define>
427 <define>$(UNICODE_DEFINE)</define>
428 <!-- this include is added by configure, we need to put other
429 includes before it: -->
430 <include cond="FORMAT!='autoconf'">$(TOP_SRCDIR)include</include>
431 <lib-path>$(LIBDIRNAME)</lib-path>
432 <include cond="FORMAT!='autoconf'">$(SETUPHDIR)</include>
433 <warnings>max</warnings>
434 <cppflags-watcom>
435 -wcd=549 <!-- 'sizeof' operand contains compiler generated information -->
436 -wcd=656 <!-- define this function inside its class definition (may improve code quality) -->
437 -wcd=657 <!-- define this function inside its class definition (could have improved code quality) -->
438 -wcd=667 <!-- 'va_start' macro will not work without an argument before '...' -->
439 </cppflags-watcom>
440 <cxxflags-mingw>
441 -Wno-ctor-dtor-privacy <!-- only defines a private destructor and has no friends -->
442 </cxxflags-mingw>
443 </template>
444
445 <!-- for both GUI and wxBase libs/samples: -->
446 <template id="wx_append_base_nomono">
447 <!-- link against builtin 3rd party libs, if needed: -->
448 <sys-lib>$(LIB_TIFF)</sys-lib>
449 <sys-lib>$(LIB_JPEG)</sys-lib>
450 <sys-lib>$(LIB_PNG)</sys-lib>
451 <sys-lib>$(LIB_ZLIB)</sys-lib>
452 <sys-lib>$(LIB_ODBC)</sys-lib>
453 <sys-lib>$(LIB_REGEX)</sys-lib>
454 <sys-lib>$(LIB_EXPAT)</sys-lib>
455
456 <ldlibs>$(EXTRALIBS_FOR_BASE)</ldlibs>
457
458 <!-- system libraries on windows: -->
459 <if cond="FORMAT!='autoconf'">
460 <sys-lib>$(UNICOWS_LIB)</sys-lib>
461 <if cond="FORMAT=='borland'">
462 <sys-lib>ole2w32</sys-lib>
463 </if>
464 <if cond="FORMAT=='msevc4prj'">
465 <sys-lib>ole32</sys-lib>
466 <sys-lib>oleaut32</sys-lib>
467 <sys-lib>uuid</sys-lib>
468 <sys-lib>commctrl</sys-lib>
469 <sys-lib>winsock</sys-lib>
470 <sys-lib>wininet</sys-lib>
471 </if>
472 <if cond="FORMAT!='borland' and FORMAT!='msevc4prj'">
473 <sys-lib>kernel32</sys-lib>
474 <sys-lib>user32</sys-lib>
475 <sys-lib>gdi32</sys-lib>
476 <sys-lib>comdlg32</sys-lib>
477 <sys-lib>winspool</sys-lib>
478 <sys-lib>winmm</sys-lib>
479 <sys-lib>shell32</sys-lib>
480 <sys-lib>comctl32</sys-lib>
481 <sys-lib>ole32</sys-lib>
482 <sys-lib>oleaut32</sys-lib>
483 <sys-lib>uuid</sys-lib>
484 <sys-lib>rpcrt4</sys-lib>
485 <sys-lib>advapi32</sys-lib>
486 <sys-lib>wsock32</sys-lib>
487 </if>
488 <if cond="FORMAT=='msvc' or FORMAT=='msvc6prj' or FORMAT=='borland'">
489 <sys-lib>oleacc</sys-lib>
490 </if>
491 <if cond="FORMAT!='msevc4prj'">
492 <sys-lib>odbc32</sys-lib>
493 </if>
494 </if>
495 </template>
496
497
498 <!-- for GUI libs/samples: -->
499 <template id="wx_append_nomono" template="wx_append_base_nomono">
500 <ldlibs>$(EXTRALIBS_FOR_GUI)</ldlibs>
501 </template>
502
503
504 <template id="wx_append_base" template_append="wx_append_base_nomono">
505 <!-- Always link against the wxWin library in monolithic build: -->
506 <sys-lib>$(WXLIB_MONO)</sys-lib>
507 </template>
508 <template id="wx_append" template_append="wx_append_nomono">
509 <!-- Always link against the wxWin library in monolithic build: -->
510 <sys-lib>$(WXLIB_MONO)</sys-lib>
511 </template>
512
513
514 <set var="WX_DISABLE_PRECOMP_HEADERS" overwrite="0">0</set>
515
516 <template id="wx_lib_b" template="wx,anylib">
517 <set var="WXLIBNAME">$(wxwin.mkLibName(wxid))</set>
518 <libname>$(WXLIBNAME)</libname>
519
520 <if cond="WX_DISABLE_PRECOMP_HEADERS=='0'">
521 <if cond="FORMAT!='autoconf' and TOOLKIT in ['MSW','WINCE']">
522 <sources>$(WXTOPDIR)src/msw/dummy.cpp</sources>
523 <precomp-headers-gen>
524 $(WXTOPDIR)src/msw/dummy.cpp
525 </precomp-headers-gen>
526 </if>
527 <precomp-headers-location>$(WXTOPDIR)include</precomp-headers-location>
528 <precomp-headers-header>wx/wxprec.h</precomp-headers-header>
529 <precomp-headers>on</precomp-headers>
530 <precomp-headers-file>wxprec_$(id)</precomp-headers-file>
531 <precomp-headers-exclude>
532 src/common/extended.c
533 </precomp-headers-exclude>
534 </if>
535
536 <if cond="IS_MSVC_PRJ=='1' and BUILDING_LIB=='1'">
537 <msvc-file-group>Common Sources:src/common/*</msvc-file-group>
538 <msvc-file-group>MSW Sources:src/msw/*</msvc-file-group>
539 <msvc-file-group>Generic Sources:src/generic/*</msvc-file-group>
540 <msvc-file-group>wxUniv Sources:src/univ/*</msvc-file-group>
541 <msvc-file-group>wxHTML Sources:src/html/*</msvc-file-group>
542 <msvc-file-group>Setup Headers:*/setup.h</msvc-file-group>
543 <msvc-file-group>MSW Headers:*wx/msw/*.h</msvc-file-group>
544 <msvc-file-group>Generic Headers:*wx/generic/*.h</msvc-file-group>
545 <msvc-file-group>wxUniv Headers:*wx/univ/*.h</msvc-file-group>
546 <msvc-file-group>wxHTML Headers:*wx/html/*.h</msvc-file-group>
547 <msvc-file-group>Common Headers:*wx/*.h</msvc-file-group>
548 </if>
549 </template>
550
551 <template id="wx_dll_b" template="wx_lib_b">
552 <set var="WXDLLNAME">$(wxwin.mkDllName(wxid))</set>
553 <dllname>$(WXDLLNAME)</dllname>
554 <version>$(WX_VERSION)</version>
555 <so_version>$(WXSOVERSION)</so_version>
556 <mac_version>$(WXMACVERSION)</mac_version>
557
558 <!-- version info resources: -->
559 <if cond="FORMAT not in ['rpmspec','wx24dsp']"> <!-- FIXME: fix for bkl-0.1.7 only, remove the cond later -->
560 <res-define>WXDLLNAME=$(WXDLLNAME)</res-define>
561 <res-include cond="FORMAT=='autoconf'">
562 $(TOP_SRCDIR)include
563 </res-include>
564 </if>
565 <win32-res>$(WXTOPDIR)src/msw/version.rc</win32-res>
566 </template>
567
568 <template id="wx_3rdparty_dependencies_gui" cond="USE_GUI=='1'">
569 <depends>wxtiff</depends>
570 <depends>wxjpeg</depends>
571 <depends>wxpng</depends>
572 </template>
573
574 <template id="wx_3rdparty_dependencies"
575 template="wx_3rdparty_dependencies_gui">
576 <depends>wxexpat</depends>
577 <depends>wxzlib</depends>
578 <depends cond="FORMAT=='autoconf'">wxodbc</depends>
579 <depends>wxregex</depends>
580 </template>
581
582 <template id="wx_3rdparty_includes_gui" cond="USE_GUI=='1'">
583 <include>$(INC_TIFF)</include>
584 <include>$(INC_JPEG)</include>
585 <include>$(INC_PNG)</include>
586 </template>
587
588 <template id="wx_3rdparty_includes"
589 template="wx_3rdparty_includes_gui">
590 <include>$(INC_ZLIB)</include>
591 <include>$(INC_ODBC)</include>
592 <include>$(INC_REGEX)</include>
593 <include>$(INC_EXPAT)</include>
594 </template>
595
596 <template id="wx_lib"
597 template="wx_lib_b,wx_3rdparty_includes,msvc_setup_h"/>
598 <template id="wx_base_lib"
599 template="wx_lib_b,wx_3rdparty_includes,msvc_setup_h">
600 <define>wxUSE_GUI=0</define>
601 </template>
602
603 <template id="wx_dll"
604 template="wx_dll_b,wx_3rdparty_dependencies,wx_3rdparty_includes"
605 template_append="msvc_setup_h,wx_append_nomono"/>
606 <template id="wx_base_dll"
607 template="wx_dll_b,wx_3rdparty_dependencies,wx_3rdparty_includes"
608 template_append="msvc_setup_h,wx_append_base_nomono">
609 <define>wxUSE_GUI=0</define>
610 </template>
611
612 <!-- =============================================================== -->
613 <!-- Templates for building wxWidgets plugins: -->
614 <!-- =============================================================== -->
615
616 <if cond="WX_STABLE_BRANCH=='1'">
617 <set var="PLUGIN_VERSION0">
618 <if cond="PLATFORM_UNIX=='1'">$(WX_RELEASE)</if>
619 <if cond="PLATFORM_UNIX=='0'">$(WX_RELEASE_NODOT)</if>
620 </set>
621 </if>
622 <if cond="WX_STABLE_BRANCH=='0'">
623 <set var="PLUGIN_VERSION0">
624 <if cond="PLATFORM_UNIX=='1'">$(WX_VERSION)</if>
625 <if cond="PLATFORM_UNIX=='0'">$(WX_VERSION_NODOT)</if>
626 </set>
627 </if>
628 <set var="PLUGVERDELIM">
629 <if cond="PLATFORM_UNIX=='1'">-</if>
630 <if cond="PLATFORM_UNIX=='0'"></if>
631 </set>
632 <set var="PLUGIN_VERSION">$(PLUGVERDELIM)$(PLUGIN_VERSION0)</set>
633
634 <set var="PLUGINSUFFIX">
635 <if cond="UNICODE=='0' and BUILD=='release'"></if>
636 <if cond="UNICODE=='0' and BUILD=='debug'">d</if>
637 <if cond="UNICODE=='1' and BUILD=='release'">u</if>
638 <if cond="UNICODE=='1' and BUILD=='debug'">ud</if>
639 </set>
640
641 <set var="PLUGINS_INST_DIR" make_var="1">
642 $(LIBDIR)/wx/$(PLUGIN_VERSION0)
643 </set>
644
645 <define-rule name="wx-base-plugin" extends="module">
646 <template>
647 <dllname>
648 $(id)$(PLUGINSUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
649 </dllname>
650 <define>WXUSINGDLL</define>
651 <define>wxUSE_GUI=0</define>
652 <install-to>$(PLUGINS_INST_DIR)</install-to>
653 </template>
654 </define-rule>
655
656 <define-rule name="wx-gui-plugin" extends="module">
657 <template template="wx">
658 <dllname>
659 $(id)_$(PORTNAME)$(WXUNIVNAME)$(PLUGINSUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
660 </dllname>
661 <define>WXUSINGDLL</define>
662 <install-to>$(PLUGINS_INST_DIR)</install-to>
663 </template>
664 </define-rule>
665
666 <!-- =============================================================== -->
667 <!-- Support for wxWidgets samples and contrib: -->
668 <!-- =============================================================== -->
669
670 <!-- Link against one wxWin library. Value must be literal! -->
671 <define-tag name="wx-lib" rules="exe,dll,module">
672 <sys-lib>$(wxwin.libToLink(value))</sys-lib>
673 <ldlibs>$(wxwin.extraLdflags(value))</ldlibs>
674 <if cond="IS_MSVC_PRJ=='1' and MONOLITHIC=='0'">
675 <depends-on-dsp>$(wxwin.makeDspDependency(value))</depends-on-dsp>
676 </if>
677 </define-tag>
678
679
680 <!-- A hack to keep autoconf happy (we pass CPPFLAGS that contain
681 {top_srcdir} from configure, poor bakefile can't know that
682 and won't output top_srcdir = @top_srcdir@ line): -->
683 <set var="VARS_DONT_ELIMINATE" append="1">top_srcdir</set>
684
685
686 </makefile>