1 #######################################################################
7 import platform as _platform
10 #######################################################################
18 default_platform = sys.platform
19 default_platform = _platform_map.get(default_platform, default_platform)
30 if 'PROCESSOR_ARCHITECTURE' in os.environ:
31 default_machine = os.environ['PROCESSOR_ARCHITECTURE']
33 default_machine = _platform.machine()
34 default_machine = _machine_map.get(default_machine, 'generic')
36 if default_platform in ('linux', 'freebsd', 'darwin'):
38 elif default_platform in ('winddk', 'windows', 'wince'):
44 #######################################################################
49 from SCons.Variables.BoolVariable import BoolVariable as BoolOption
51 from SCons.Options.BoolOption import BoolOption
53 from SCons.Variables.EnumVariable import EnumVariable as EnumOption
55 from SCons.Options.EnumOption import EnumOption
56 opts.Add(BoolOption('debug', 'debug build', 'no'))
57 opts.Add(BoolOption('profile', 'profile build', 'no'))
58 opts.Add(BoolOption('quiet', 'quiet command lines', 'yes'))
59 opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine,
60 allowed_values=('generic', 'ppc', 'x86', 'x86_64')))
61 opts.Add(EnumOption('platform', 'target platform', default_platform,
62 allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince')))
63 opts.Add(EnumOption('toolchain', 'compiler toolchain', 'default',
64 allowed_values=('default', 'crossmingw', 'winsdk', 'winddk')))
65 opts.Add(BoolOption('llvm', 'use LLVM', 'no'))
66 opts.Add(BoolOption('dri', 'build DRI drivers', default_dri))