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