X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=SConstruct;h=a22b9483da04dd9c649d17e0f31ef70646144484;hb=67fc3ace65419b0865253e3ef54b20abbca1dfb5;hp=549ff647eaccd2954f519f2dbd1740912de596df;hpb=5b6ea6bfc80fe96755ca4569048b59baa561f22a;p=mesa.git diff --git a/SConstruct b/SConstruct index 549ff647eac..a22b9483da0 100644 --- a/SConstruct +++ b/SConstruct @@ -29,31 +29,36 @@ import common ####################################################################### # Configuration options +default_statetrackers = 'mesa' + if common.default_platform in ('linux', 'freebsd', 'darwin'): - default_statetrackers = 'all' - default_drivers = 'softpipe,failover,i915simple,i965simple' + default_drivers = 'softpipe,failover,i915simple,i965simple,trace' default_winsys = 'xlib' elif common.default_platform in ('winddk',): - default_statetrackers = 'all' - default_drivers = 'softpipe,i915simple' + default_drivers = 'softpipe,i915simple,trace' default_winsys = 'all' else: - default_statetrackers = 'all' default_drivers = 'all' default_winsys = 'all' opts = Options('config.py') common.AddOptions(opts) -opts.Add(ListOption('statetrackers', 'state_trackers to build', default_statetrackers, - ['mesa'])) +opts.Add(ListOption('statetrackers', 'state trackers to build', default_statetrackers, + ['mesa', 'python'])) opts.Add(ListOption('drivers', 'pipe drivers to build', default_drivers, - ['softpipe', 'failover', 'i915simple', 'i965simple', 'cell'])) + ['softpipe', 'failover', 'i915simple', 'i965simple', 'cell', 'trace', 'r300'])) opts.Add(ListOption('winsys', 'winsys drivers to build', default_winsys, - ['xlib', 'intel', 'gdi'])) + ['xlib', 'intel', 'gdi', 'amd'])) + +opts.Add(EnumOption('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0'))) env = Environment( - options = opts, - ENV = os.environ) + options = opts, + tools = ['gallium'], + toolpath = ['#scons'], + ENV = os.environ, +) + Help(opts.GenerateHelpText(env)) # replicate options values in local variables @@ -65,12 +70,14 @@ platform = env['platform'] # derived options x86 = machine == 'x86' +ppc = machine == 'ppc' gcc = platform in ('linux', 'freebsd', 'darwin') msvc = platform in ('windows', 'winddk') Export([ 'debug', 'x86', + 'ppc', 'dri', 'llvm', 'platform', @@ -81,25 +88,6 @@ Export([ ####################################################################### # Environment setup -# -# TODO: put the compiler specific settings in separate files -# TODO: auto-detect as much as possible - -if platform == 'winddk': - env.Tool('winddk', ['scons']) - - env.Append(CPPPATH = [ - env['SDK_INC_PATH'], - env['DDK_INC_PATH'], - env['WDM_INC_PATH'], - env['CRT_INC_PATH'], - ]) - -if platform == 'wince': - env.Tool('evc', ['scons']) - -common.generate(env) - # Includes env.Append(CPPPATH = [ @@ -110,13 +98,6 @@ env.Append(CPPPATH = [ ]) -# x86 assembly -if x86: - if gcc: - env.Append(CFLAGS = '-m32') - env.Append(CXXFLAGS = '-m32') - - # Posix if platform in ('posix', 'linux', 'freebsd', 'darwin'): env.Append(CPPDEFINES = [ @@ -152,7 +133,7 @@ if dri: # LLVM if llvm: # See also http://www.scons.org/wiki/UsingPkgConfig - env.ParseConfig('llvm-config --cflags --ldflags --libs') + env.ParseConfig('llvm-config --cflags --ldflags --libs backend bitreader engine ipo') env.Append(CPPDEFINES = ['MESA_LLVM']) # Force C++ linkage env['LINK'] = env['CXX'] @@ -181,6 +162,6 @@ Export('env') SConscript( 'src/SConscript', - build_dir = common.make_build_dir(env), + variant_dir = env['build'], duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html )