i965: Implement texture buffer objects on Gen6.
[mesa.git] / src / mesa / SConscript
index da4d9b1857adce102e182e05e822387642de0b37..99bdfad46cda420b841da72955d485923b9f45d6 100644 (file)
@@ -6,6 +6,7 @@ Import('*')
 import filecmp
 import os
 import subprocess
+from sys import executable as python_cmd
 
 env = env.Clone()
 
@@ -58,13 +59,13 @@ main_sources = [
     'main/cpuinfo.c',
     'main/debug.c',
     'main/depth.c',
-    'main/depthstencil.c',
     'main/dlist.c',
     'main/dlopen.c',
     'main/drawpix.c',
     'main/drawtex.c',
     'main/enable.c',
     'main/enums.c',
+    'main/errors.c',
     'main/eval.c',
     'main/execmem.c',
     'main/extensions.c',
@@ -215,6 +216,7 @@ vbo_sources = [
     'vbo/vbo_exec_draw.c',
     'vbo/vbo_exec_eval.c',
     'vbo/vbo_noop.c',
+    'vbo/vbo_primitive_restart.c',
     'vbo/vbo_rebase.c',
     'vbo/vbo_split.c',
     'vbo/vbo_split_copy.c',
@@ -327,8 +329,9 @@ mesa_sources = (
     statetracker_sources
 )
 
+GLAPI = '#src/mapi/glapi/'
+
 if env['gles']:
-    from sys import executable as python_cmd
 
     env.Append(CPPDEFINES = ['FEATURE_ES1=1', 'FEATURE_ES2=1'])
 
@@ -348,7 +351,6 @@ if env['gles']:
     )
 
     # generate GLES headers
-    GLAPI = '#src/mapi/glapi/'
     gles_headers = []
     gles_headers += env.CodeGenerate(
         target = 'main/api_exec_es1_dispatch.h',
@@ -385,7 +387,7 @@ if env['gles']:
 #
 # Assembly sources
 #
-if env['gcc'] and env['platform'] != 'windows':
+if env['gcc'] and env['platform'] not in ('darwin', 'windows'):
     if env['machine'] == 'x86':
         env.Append(CPPDEFINES = [
             'USE_X86_ASM',
@@ -424,14 +426,6 @@ if env['gcc'] and env['platform'] != 'windows':
             'x86-64/x86-64.c',
             'x86-64/xform4.S',
         ]
-    elif env['machine'] == 'ppc':
-        env.Append(CPPDEFINES = [
-            'USE_PPC_ASM',
-            'USE_VMX_ASM',
-        ])
-        mesa_sources += [
-            'ppc/common_ppc.c',
-        ]
     elif env['machine'] == 'sparc':
         mesa_sources += [
             'sparc/sparc.c',
@@ -459,6 +453,16 @@ if env['gcc'] and env['platform'] != 'windows':
         env.Append(CPPPATH = [matypes[0].dir])
 
 
+# The enums.c file is generated from the GL/ES API.xml file
+env.CodeGenerate(
+    target = 'main/enums.c',
+    script = GLAPI + 'gen/gl_enums.py',
+    source = GLAPI + 'gen/gl_and_es_API.xml',
+    command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
+    )
+
+# We also depend on the auto-generated GL API headers
+env.Depends(mesa_sources, glapi_headers)
 
 
 def write_git_sha1_h_file(filename):