Define XML_STATIC in Expat header instead of Expat projects.
[wxWidgets.git] / build / bakefiles / config.bkl
1 <?xml version="1.0" ?>
2 <!-- $Id$ -->
3
4 <makefile>
5
6     <set var="IS_MSVC_PRJ">
7         $(FORMAT in ['msvc6prj','msevc4prj','msvs2003prj','msvs2005prj','msvs2008prj'])
8     </set>
9     <set var="IS_MSVC">
10         $(IS_MSVC_PRJ=='1' or FORMAT=='msvc')
11     </set>
12
13
14     <set var="BUILDING_LIB" overwrite="0">0</set>
15
16     <set var="CPP_DEFAULT_VALUE">
17         <if cond="FORMAT=='borland'">
18             cpp32 -Sr -oCON
19         </if>
20         <if cond="FORMAT=='mingw'">
21             $(DOLLAR)(CC) -E
22         </if>
23         <if cond="FORMAT=='msvc'">
24             $(DOLLAR)(CC) /EP /nologo
25         </if>
26         <if cond="FORMAT=='watcom'">
27             $(DOLLAR)(CC) -p
28         </if>
29     </set>
30     <option name="CPP">
31         <default-value>
32             $(CPP_DEFAULT_VALUE)
33         </default-value>
34         <description>
35             The C preprocessor
36         </description>
37     </option>
38
39     <option name="SHARED">
40         <values>0,1</values>
41         <values-description>,DLL</values-description>
42         <default-value>0</default-value>
43         <description>
44             What type of library to build?
45         </description>
46     </option>
47
48     <if cond="FORMAT!='autoconf'">
49         <option name="TOOLKIT">
50             <values>MSW,GTK</values>
51             <values-description>,GTK+</values-description>
52             <default-value>MSW</default-value>
53             <description>
54                 Used toolkit
55             </description>
56         </option>
57
58         <if cond="FORMAT not in ['autoconf','msvc6prj','msevc4prj','msvs2003prj','msvs2005prj','msvs2008prj']">
59             <option name="TOOLKIT_VERSION">
60                 <values>,2</values>
61                 <values-description>,2</values-description>
62                 <default-value></default-value>
63                 <description>
64                     GTK+ toolkit version
65                 </description>
66             </option>
67         </if>
68
69         <!-- We must make TOOLKIT a constant under MSW -->
70         <if cond="FORMAT in ['borland','mingw','msvc','watcom', 'msvc6prj', 'msvs2003prj', 'msvs2005prj', 'msvs2008prj']">
71             <set var="TOOLKIT">MSW</set>
72         </if>
73     </if>
74
75     <!--
76         Don't include wxUniversal configurations in project files, they
77         confuse people who don't know what "Universal" means and double the
78         number of configurations. If you do need to build wxUniversal, either
79         use the make files or comment out the 3 lines below and rerun
80         bakefile_gen to regenerate the projects with them.
81      -->
82     <if cond="IS_MSVC_PRJ=='1'">
83         <set var="WXUNIV">0</set>
84     </if>
85     <if cond="IS_MSVC_PRJ=='0'">
86         <option name="WXUNIV">
87             <values>0,1</values>
88             <values-description>,Universal</values-description>
89             <default-value>0</default-value>
90             <description>
91                 Build wxUniversal instead of native port?
92             </description>
93         </option>
94     </if>
95
96     <!-- don't include ANSI configuration in project files, it's going to be
97          eventually removed anyway and it only doubles the number of build
98          configs in projects: -->
99     <if cond="IS_MSVC_PRJ=='1'">
100         <set var="UNICODE">1</set>
101     </if>
102     <if cond="IS_MSVC_PRJ=='0'">
103         <option name="UNICODE">
104             <values>0,1</values>
105             <values-description>,Unicode</values-description>
106             <default-value>1</default-value>
107             <description>
108                 Compile Unicode build of wxWidgets?
109             </description>
110         </option>
111     </if>
112
113     <if cond="FORMAT!='autoconf' and FORMAT!='watcom'">
114         <option name="MSLU">
115             <values>0,1</values>
116             <default-value>0</default-value>
117             <description>
118                 Use MSLU library when building Unicode version.
119             </description>
120         </option>
121     </if>
122     <if cond="FORMAT=='autoconf' or FORMAT=='watcom'">
123         <set var="MSLU">0</set>
124     </if>
125
126     <option name="BUILD">
127         <values>debug,release</values>
128         <values-description>Debug,Release</values-description>
129         <default-value>debug</default-value>
130         <description>
131             Type of compiled binaries
132         </description>
133     </option>
134
135     <if cond="FORMAT=='msvc'">
136         <option name="TARGET_CPU">
137             <default-value>$(DOLLAR)(CPU)</default-value>
138             <description>
139 The target processor architecture must be specified when it is not X86.
140 This does not affect the compiler output, so you still need to make sure
141 your environment is set up appropriately with the correct compiler in the
142 PATH. Rather it affects some options passed to some of the common build
143 utilities such as the resource compiler and the linker.
144
145 Accepted values: IA64, X64
146 (AMD64 accepted as synonym for X64 but should not be used any more).
147             </description>
148         </option>
149     </if>
150     <if cond="FORMAT!='msvc'">
151         <set var="TARGET_CPU"/>
152     </if>
153
154     <!--
155         For MSVC enable debug information in all builds: it is needed to be
156         able to debug the crash dumps produced by wxDebugReport and as it
157         generates it in separate PDB files it doesn't cost us much to enable it
158         (except for disk space...).
159      -->
160     <set var="DEBUG_INFO_DEFAULT">
161         <if cond="IS_MSVC=='1'">1</if>
162         <if cond="IS_MSVC=='0'">default</if>
163     </set>
164
165     <option name="DEBUG_INFO">
166         <values>0,1,default</values>
167         <default-value>$(DEBUG_INFO_DEFAULT)</default-value>
168         <description>
169 Should debugging info be included in the executables? The default value
170 "default" means that debug info will be included if BUILD=debug
171 and not included if BUILD=release.
172         </description>
173     </option>
174
175     <option name="DEBUG_FLAG">
176         <values>0,1,default</values>
177         <default-value>1</default-value>
178         <description>
179 Value of wxDEBUG_LEVEL. The default value is the same as 1 and means that all
180 but expensive assert checks are enabled, use 0 to completely remove debugging
181 code.
182         </description>
183     </option>
184
185     <if cond="FORMAT=='msvc'">
186         <option name="DEBUG_RUNTIME_LIBS">
187             <values>0,1,default</values>
188             <default-value>default</default-value>
189             <description>
190 Link against debug (e.g. msvcrtd.dll) or release (msvcrt.dll) RTL?
191 Default is to use debug CRT if and only if BUILD==debug.
192             </description>
193         </option>
194     </if>
195     <if cond="FORMAT!='msvc'">
196         <set var="DEBUG_RUNTIME_LIBS">default</set>
197     </if>
198
199     <set var="MONOLITHIC_DEFAULT">
200         <if cond="FORMAT=='watcom'">1</if>
201         <if cond="FORMAT!='watcom'">0</if>
202     </set>
203     <option name="MONOLITHIC">
204         <values>0,1</values>
205         <values-description>Multilib,Monolithic</values-description>
206         <default-value>$(MONOLITHIC_DEFAULT)</default-value>
207         <description>
208             Multiple libraries or single huge monolithic one?
209         </description>
210     </option>
211
212     <if cond="FORMAT=='autoconf'"> <!-- FIXME - temporary -->
213         <option name="USE_PLUGINS">
214             <values>0,1</values>
215             <default-value>1</default-value>
216             <description>
217                 Build parts of the library as dynamically loadable plugins
218                 (only supported in multilib build)?
219             </description>
220         </option>
221     </if>
222     <if cond="FORMAT!='autoconf'">
223         <set var="USE_PLUGINS">0</set> <!-- FIXME - temporary -->
224     </if>
225
226     <option name="USE_GUI">
227         <values>0,1</values>
228         <values-description>Base,GUI</values-description>
229         <default-value>1</default-value>
230         <description>
231             Build GUI libraries?
232         </description>
233     </option>
234
235     <option name="USE_HTML">
236         <values>0,1</values>
237         <default-value>1</default-value>
238         <description>
239             Build wxHTML library (USE_GUI must be 1)?
240         </description>
241     </option>
242
243     <option name="USE_WEBVIEW">
244         <values>0,1</values>
245         <default-value>1</default-value>
246         <description>
247             Build wxWebView library (USE_GUI must be 1)?
248         </description>
249     </option>
250
251     <option name="USE_MEDIA">
252         <values>0,1</values>
253         <default-value>1</default-value>
254         <description>
255             Build multimedia library (USE_GUI must be 1)?
256         </description>
257     </option>
258
259     <option name="USE_XRC">
260         <values>0,1</values>
261         <default-value>1</default-value>
262         <description>
263             Build wxXRC library (USE_GUI must be 1)?
264         </description>
265     </option>
266
267     <option name="USE_AUI">
268         <values>0,1</values>
269         <default-value>1</default-value>
270         <description>
271             Build wxAUI library (USE_GUI must be 1)?
272         </description>
273     </option>
274
275     <option name="USE_RIBBON">
276         <values>0,1</values>
277         <default-value>1</default-value>
278         <description>
279             Build wxRibbon library (USE_GUI must be 1)?
280         </description>
281     </option>
282
283     <option name="USE_PROPGRID">
284         <values>0,1</values>
285         <default-value>1</default-value>
286         <description>
287             Build wxPropertyGrid library (USE_GUI must be 1)?
288         </description>
289     </option>
290
291     <option name="USE_RICHTEXT">
292         <values>0,1</values>
293         <default-value>1</default-value>
294         <description>
295             Build wxRichTextCtrl library (USE_GUI must be 1)?
296         </description>
297     </option>
298
299     <option name="USE_STC">
300         <values>0,1</values>
301         <default-value>1</default-value>
302         <description>
303             Build wxStyledTextCtrl library (USE_GUI must be 1)?
304         </description>
305     </option>
306
307     <option name="USE_OPENGL">
308         <values>0,1</values>
309         <default-value>1</default-value>
310         <description>
311             Build OpenGL canvas library (USE_GUI must be 1)?
312         </description>
313     </option>
314
315     <!-- currently only VC++ can compile wxDebugReport which is in QA lib -->
316     <set var="USE_QA_DEFAULT">
317         <if cond="FORMAT in ['msvc','msvc6prj','msvs2003prj','msvs2005prj','msvs2008prj']">1</if>
318         <if cond="FORMAT not in ['msvc','msvc6prj','msvs2003prj','msvs2005prj','msvs2008prj']">0</if>
319     </set>
320     <option name="USE_QA">
321         <values>0,1</values>
322         <default-value>$(USE_QA_DEFAULT)</default-value>
323         <description>
324             Build quality assurance classes library (USE_GUI must be 1)?
325         </description>
326     </option>
327
328     <option name="USE_EXCEPTIONS">
329         <values>0,1</values>
330         <default-value>1</default-value>
331         <description>
332             Enable exceptions in compiled code.
333         </description>
334     </option>
335
336     <option name="USE_RTTI">
337         <values>0,1</values>
338         <default-value>1</default-value>
339         <description>
340             Enable run-time type information (RTTI) in compiled code.
341         </description>
342     </option>
343
344     <option name="USE_THREADS">
345         <values>0,1</values>
346         <default-value>1</default-value>
347         <description>
348             Enable threading in compiled code.
349         </description>
350     </option>
351
352     <option name="USE_CAIRO">
353         <values>0,1</values>
354         <default-value>0</default-value>
355         <description>
356             Enable wxCairoContext for platforms other than Linux/GTK.
357         </description>
358     </option>
359
360     <option name="OFFICIAL_BUILD">
361         <values>0,1</values>
362         <default-value>0</default-value>
363         <description>
364             Is this official build by wxWidgets developers?
365         </description>
366     </option>
367     <option name="VENDOR">
368         <default-value>custom</default-value>
369         <description>
370             Use this to name your customized DLLs differently
371         </description>
372     </option>
373     <!-- These basically do what vendor does in the places it didn't. -->
374     <!-- They should all be unified under some suitable descriptor    -->
375     <option name="WX_FLAVOUR">
376         <default-value></default-value>
377     </option>
378     <option name="WX_LIB_FLAVOUR">
379         <default-value></default-value>
380     </option>
381
382     <option name="CFG">
383         <default-value></default-value>
384         <description>
385 Name of your custom configuration. This affects directory
386 where object files are stored as well as the location of
387 compiled .lib files and setup.h under the lib/ toplevel directory.
388         </description>
389     </option>
390
391     <!-- unit tests support: -->
392     <option name="CPPUNIT_CFLAGS">
393         <default-value></default-value>
394         <description>
395 Compiler flags needed to compile test suite in tests directory. If you want
396 to run the tests, set it so that the compiler can find CppUnit headers.
397         </description>
398     </option>
399
400     <option name="CPPUNIT_LIBS">
401         <default-value></default-value>
402         <description>
403 Linker flags needed to link test suite in tests directory. If you want
404 to run the tests, include CppUnit library here.
405         </description>
406     </option>
407
408
409     <!-- ================================================================== -->
410     <!--                             Autoconf                               -->
411     <!-- ================================================================== -->
412
413     <if cond="FORMAT=='autoconf'">
414         <option name="DEREZ"/>
415         <option name="TOOLKIT"/>
416         <option name="TOOLKIT_LOWERCASE"/>
417         <option name="TOOLKIT_VERSION"/>
418         <option name="TOOLCHAIN_NAME"/>
419         <option name="TOOLCHAIN_FULLNAME"/>
420         <option name="EXTRALIBS"/>
421         <option name="EXTRALIBS_XML"/>
422         <option name="EXTRALIBS_HTML"/>
423         <option name="EXTRALIBS_MEDIA"/>
424         <option name="EXTRALIBS_GUI"/>
425         <option name="EXTRALIBS_OPENGL"/>
426         <option name="EXTRALIBS_SDL"/>
427         <option name="CXXWARNINGS"/>
428         <option name="HOST_SUFFIX"/>
429         <option name="DYLIB_RPATH_INSTALL"/>
430         <option name="DYLIB_RPATH_POSTLINK"/>
431         <option name="SAMPLES_RPATH_FLAG"/>
432
433         <!-- see configure.in; it's required by some samples on Mac OS X -->
434         <option name="HEADER_PAD_OPTION"/>
435
436         <set var="TOP_SRCDIR">$(top_srcdir)/</set>
437         <set var="RUNTIME_LIBS">dynamic</set>
438         <set var="WXTOPDIR"/> <!-- to be overridden on bakefile cmd line -->
439
440         <option name="WITH_PLUGIN_SDL">
441             <values>0,1</values>
442         </option>
443
444         <option name="wx_top_builddir"/>
445     </if>
446
447
448     <!-- ================================================================== -->
449     <!--                     windows/dos/os2 compilers                      -->
450     <!-- ================================================================== -->
451
452     <if cond="FORMAT!='autoconf'">
453         <option name="RUNTIME_LIBS">
454             <values>dynamic,static</values>
455             <default-value>dynamic</default-value>
456             <description>
457 Version of C runtime library to use. You can change this to
458 static if SHARED=0, but it is highly recommended to not do
459 it if SHARED=1 unless you know what you are doing.
460             </description>
461         </option>
462
463         <set var="WXTOPDIR"/> <!-- to be overridden on bakefile cmd line -->
464
465         <set var="WIN32_TOOLKIT">
466             <if cond="TOOLKIT=='MSW'">MSW</if>
467             <if cond="TOOLKIT=='GTK'">GTK</if>
468         </set>
469         <set var="WIN32_TOOLKIT_LOWERCASE">
470             <if cond="TOOLKIT=='MSW'">msw</if>
471             <if cond="TOOLKIT=='GTK'">gtk</if>
472         </set>
473
474         <set var="TOOLKIT" overwrite="0">
475             <if cond="FORMAT=='msevc4prj'">WINCE</if>
476             <if cond="FORMAT=='msvs2005prj' and MSVS_PLATFORMS=='pocketpc2003'">WINCE</if>
477             <if cond="FORMAT=='msvs2008prj' and MSVS_PLATFORMS=='pocketpc2003'">WINCE</if>
478             <if cond="FORMAT=='msvs2005prj' and MSVS_PLATFORMS=='win32'">$(WIN32_TOOLKIT)</if>
479             <if cond="FORMAT=='msvs2008prj' and MSVS_PLATFORMS=='win32'">$(WIN32_TOOLKIT)</if>
480             <if cond="FORMAT not in ['msevc4prj','msvs2005prj','msvs2008prj'] and PLATFORM_WIN32=='1'">$(WIN32_TOOLKIT)</if>
481             <if cond="PLATFORM_OS2=='1'">PM</if>
482         </set>
483         <set var="TOOLKIT_LOWERCASE">
484             <if cond="FORMAT=='msevc4prj'">wince</if>
485             <if cond="FORMAT=='msvs2005prj' and MSVS_PLATFORMS=='pocketpc2003'">wince</if>
486             <if cond="FORMAT=='msvs2008prj' and MSVS_PLATFORMS=='pocketpc2003'">wince</if>
487             <if cond="FORMAT=='msvs2005prj' and MSVS_PLATFORMS=='win32'">$(WIN32_TOOLKIT_LOWERCASE)</if>
488             <if cond="FORMAT=='msvs2008prj' and MSVS_PLATFORMS=='win32'">$(WIN32_TOOLKIT_LOWERCASE)</if>
489             <if cond="FORMAT not in ['msevc4prj','msvs2005prj','msvs2008prj'] and PLATFORM_WIN32=='1'">$(WIN32_TOOLKIT_LOWERCASE)</if>
490             <if cond="PLATFORM_OS2=='1'">pm</if>
491         </set>
492         <if cond="FORMAT in ['msvc6prj','msvs2003prj','msvs2005prj','msvs2008prj']">
493             <set var="TOOLKIT_VERSION">
494                 <if cond="PLATFORM_WIN32=='1' and TOOLKIT=='GTK'">2</if>
495             </set>
496         </if>
497         <set var="HOST_SUFFIX"/>
498         <set var="EXTRACFLAGS"/>
499         <set var="EXTRALIBS"/>
500         <set var="EXTRALIBS_XML"/>
501         <set var="EXTRALIBS_HTML"/>
502         <set var="EXTRALIBS_MEDIA"/>
503         <set var="EXTRALIBS_GUI"/>
504         <set var="EXTRALIBS_OPENGL">
505             <if cond="COMPILER=='wat' and TOOLKIT=='MSW'">opengl32.lib glu32.lib</if>
506             <if cond="COMPILER in ['vc','evc']">opengl32.lib glu32.lib</if>
507             <if cond="COMPILER=='gcc'">-lopengl32 -lglu32</if>
508         </set>
509         <set var="EXTRALIBS_SDL"/>
510         <set var="EXTRALIBS_GNOMEPRINT"/>
511
512         <set var="WITH_PLUGIN_SDL">0</set>
513
514         <if cond="BUILDING_LIB=='1'">
515             <set-srcdir>../..</set-srcdir>
516         </if>
517         <set var="TOP_SRCDIR">$(SRCDIR)/$(WXTOPDIR)</set>
518     </if>
519
520     <if cond="FORMAT=='mingw'">
521         <option name="GCC_VERSION">
522             <values>3,2.95</values>
523             <default-value>3</default-value>
524             <description>
525 Set the version of your Mingw installation here.
526     "3" ...... this is for Mingw 2.0 or newer (comes with gcc3)
527     "2.95" ... for Mingw 1.1 or any of the older versions
528             </description>
529         </option>
530         <set var="GCCFLAGS">
531             <if cond="GCC_VERSION=='2.95'">-fvtable-thunks</if>
532         </set>
533         <set var="EXTRACFLAGS">$(GCCFLAGS) -DHAVE_W32API_H</set>
534     </if>
535
536
537     <!-- ================================================================== -->
538     <!--            Project files - hardcode some defaults                  -->
539     <!-- ================================================================== -->
540
541     <if cond="FORMAT_SUPPORTS_CONDITIONS=='0'">
542         <set var="RUNTIME_LIBS">dynamic</set>
543         <set var="OFFICIAL_BUILD">0</set>
544         <set var="USE_AUI">1</set>
545         <set var="USE_RIBBON">1</set>
546         <set var="USE_PROPGRID">1</set>
547         <set var="USE_RICHTEXT">1</set>
548         <set var="USE_STC">1</set>
549         <set var="USE_HTML">1</set>
550         <set var="USE_WEBVIEW">1</set>
551         <set var="USE_MEDIA">1</set>
552         <set var="USE_XRC">1</set>
553         <set var="USE_OPENGL">1</set>
554         <set var="USE_QA">1</set>
555         <set var="MONOLITHIC">0</set>
556         <set var="USE_GUI">1</set>
557         <set var="USE_EXCEPTIONS">1</set>
558         <set var="USE_RTTI">1</set>
559         <set var="USE_THREADS">1</set>
560         <set var="USE_CAIRO">0</set>
561         <set var="DEBUG_INFO">$(DEBUG_INFO_DEFAULT)</set>
562         <set var="DEBUG_FLAG">default</set>
563         <set var="MSLU">0</set>
564     </if>
565
566
567     <!-- DigitalMars make is braindead, it doesn't have conditional
568          processing: -->
569     <if cond="FORMAT=='dmars'">
570         <set var="RUNTIME_LIBS">static</set>
571         <set var="BUILD">debug</set>
572         <set var="SHARED">0</set>
573         <set var="WXUNIV">0</set>
574         <set var="UNICODE">1</set>
575         <!-- Free version does not distribute OpenGL,
576              in commercial distribution better use dmars_smake format -->
577         <set var="USE_OPENGL">0</set>
578     </if>
579
580     <!-- No need for wxUniv on embedded devices (yet): -->
581     <if cond="FORMAT=='msevc4prj' or (FORMAT=='msvs2005prj' and MSVS_PLATFORMS=='pocketpc2003') or (FORMAT=='msvs2008prj' and MSVS_PLATFORMS=='pocketpc2003')">
582         <set var="WXUNIV">0</set>
583         <!-- Uploading debug reports from PDAs seems impractical -->
584         <set var="USE_QA">0</set>
585         <set var="MONOLITHIC">1</set> <!-- sic! -->
586         <set var="USE_OPENGL">0</set> <!-- need OpenGL ES support first -->
587         <!-- RTTI and exceptions need separate cccrtti.lib with eVC4 -->
588         <if cond="FORMAT=='msevc4prj'">
589             <set var="USE_RTTI">0</set>
590             <set var="USE_EXCEPTIONS">0</set>
591         </if>
592     </if>
593
594 </makefile>