egl: if a surface type isn't defined let's default to EGL_WINDOW_BIT
[mesa.git] / SConstruct
index 8c8a82b38ec9725e7a0937bb487162066b5fdf40..7f9a2225427a5cb66f36221d407954dccb764a01 100644 (file)
@@ -29,32 +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,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(
-       MSVS_VERSION = '7.1',
-       options = opts, 
-       ENV = os.environ)
+       options = opts,
+       tools = ['gallium'],
+       toolpath = ['#scons'],  
+       ENV = os.environ,
+)
+
 Help(opts.GenerateHelpText(env))
 
 # replicate options values in local variables
@@ -66,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',
@@ -82,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 = [
@@ -111,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 = [
@@ -153,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']
@@ -182,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
 )