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