summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--SConstruct6
-rw-r--r--common.py5
2 files changed, 3 insertions, 8 deletions
diff --git a/SConstruct b/SConstruct
index 8013e7c..6f95d12 100644
--- a/SConstruct
+++ b/SConstruct
@@ -33,18 +33,16 @@ if common.default_platform in ('linux', 'freebsd', 'darwin'):
default_statetrackers = 'mesa'
default_drivers = 'softpipe,failover,i915simple,i965simple'
default_winsys = 'xlib'
- default_dri = 'yes'
elif common.default_platform in ('winddk',):
default_statetrackers = 'none'
default_drivers = 'softpipe,i915simple'
default_winsys = 'none'
- default_dri = 'no'
else:
default_drivers = 'all'
default_winsys = 'all'
- default_dri = 'no'
-opts = common.Options()
+opts = Options('config.py')
+common.AddOptions(opts)
opts.Add(ListOption('statetrackers', 'state_trackers to build', default_statetrackers,
['mesa']))
opts.Add(ListOption('drivers', 'pipe drivers to build', default_drivers,
diff --git a/common.py b/common.py
index b65ed7e..1e5f7da 100644
--- a/common.py
+++ b/common.py
@@ -43,11 +43,9 @@ else:
#######################################################################
# Common options
-def Options():
- from SCons.Options import Options
+def AddOptions(opts):
from SCons.Options.BoolOption import BoolOption
from SCons.Options.EnumOption import EnumOption
- opts = Options('config.py')
opts.Add(BoolOption('debug', 'build debug version', 'no'))
opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine,
allowed_values=('generic', 'x86', 'x86_64')))
@@ -55,7 +53,6 @@ def Options():
allowed_values=('linux', 'cell', 'winddk')))
opts.Add(BoolOption('llvm', 'use LLVM', 'no'))
opts.Add(BoolOption('dri', 'build DRI drivers', default_dri))
- return opts
#######################################################################