1 #######################################################################
8 import platform
as _platform
11 #######################################################################
19 default_platform
= sys
.platform
20 default_platform
= _platform_map
.get(default_platform
, default_platform
)
31 if 'PROCESSOR_ARCHITECTURE' in os
.environ
:
32 default_machine
= os
.environ
['PROCESSOR_ARCHITECTURE']
34 default_machine
= _platform
.machine()
35 default_machine
= _machine_map
.get(default_machine
, 'generic')
37 if 'LLVM' in os
.environ
or subprocess
.call(['llvm-config', '--version'], stdout
=subprocess
.PIPE
) == 0:
42 if default_platform
in ('linux', 'freebsd'):
44 elif default_platform
in ('winddk', 'windows', 'wince', 'darwin'):
50 #######################################################################
55 from SCons
.Variables
.BoolVariable
import BoolVariable
as BoolOption
57 from SCons
.Options
.BoolOption
import BoolOption
59 from SCons
.Variables
.EnumVariable
import EnumVariable
as EnumOption
61 from SCons
.Options
.EnumOption
import EnumOption
62 opts
.Add(BoolOption('debug', 'debug build', 'yes'))
63 opts
.Add(BoolOption('profile', 'profile build', 'no'))
64 opts
.Add(BoolOption('quiet', 'quiet command lines', 'yes'))
65 opts
.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine
,
66 allowed_values
=('generic', 'ppc', 'x86', 'x86_64')))
67 opts
.Add(EnumOption('platform', 'target platform', default_platform
,
68 allowed_values
=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin', 'embedded')))
69 opts
.Add('toolchain', 'compiler toolchain', 'default')
70 opts
.Add(BoolOption('llvm', 'use LLVM', default_llvm
))
71 opts
.Add(BoolOption('dri', 'build DRI drivers', default_dri
))