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