import filecmp
import os
import subprocess
+from sys import executable as python_cmd
env = env.Clone()
'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',
'swrast/s_copypix.c',
'swrast/s_context.c',
'swrast/s_depth.c',
- 'swrast/s_depthstencil.c',
'swrast/s_drawpix.c',
'swrast/s_feedback.c',
'swrast/s_fog.c',
'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',
statetracker_sources = [
'state_tracker/st_atom.c',
+ 'state_tracker/st_atom_array.c',
'state_tracker/st_atom_blend.c',
'state_tracker/st_atom_clip.c',
'state_tracker/st_atom_constbuf.c',
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'])
)
# generate GLES headers
- GLAPI = '#src/mapi/glapi/'
gles_headers = []
gles_headers += env.CodeGenerate(
target = 'main/api_exec_es1_dispatch.h',
#
# 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',
'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',
- 'sparc/clip.S',
+ 'sparc/sparc_clip.S',
'sparc/norm.S',
'sparc/xform.S',
]
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):