From 8223fb176264123c86c0d3eb845973d00fd62cc2 Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 11 Oct 2012 08:30:47 +0200 Subject: xwininfo mesa git update 11 oct 2012 xwininfo: f7b55bdf674fc790e879a2e25ef83925dd8379d6 mesa: 34c58acb59bc0b827e28ef9e89044621ab0b3ee1 --- mesalib/src/mesa/SConscript | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'mesalib/src/mesa/SConscript') diff --git a/mesalib/src/mesa/SConscript b/mesalib/src/mesa/SConscript index 981908217..b7f908a9a 100644 --- a/mesalib/src/mesa/SConscript +++ b/mesalib/src/mesa/SConscript @@ -16,9 +16,8 @@ env.Append(CPPPATH = [ '#/src/mesa', ]) -env.Append(CPPDEFINES = [ - 'FEATURE_GL=1', -]) +enabled_apis = [] +enabled_apis += ['GL'] if env['platform'] == 'windows': env.Append(CPPDEFINES = [ @@ -78,7 +77,6 @@ main_sources = [ 'main/format_pack.c', 'main/format_unpack.c', 'main/framebuffer.c', - 'main/get.c', 'main/getstring.c', 'main/glformats.c', 'main/hash.c', @@ -141,6 +139,10 @@ main_sources = [ 'main/vtxfmt.c', ] +glget_sources = [ + 'main/get.c', +] + math_sources = [ 'math/m_debug_clip.c', 'math/m_debug_norm.c', @@ -321,6 +323,7 @@ common_driver_sources = [ mesa_sources = ( main_sources + + glget_sources + math_sources + program_sources + vbo_sources + @@ -335,7 +338,7 @@ GLAPI = '#src/mapi/glapi/' if env['gles']: - env.Append(CPPDEFINES = ['FEATURE_ES1=1', 'FEATURE_ES2=1']) + enabled_apis += ['ES1', 'ES2'] # generate GLES sources gles_sources = ['main/es1_conversion.c',] @@ -368,6 +371,20 @@ if env['gles']: mesa_sources += gles_sources +env.Append(CPPDEFINES = ["FEATURE_%s=1" % api for api in enabled_apis]) + +get_hash_gen_opts = ' '.join(["-a %s" % api for api in enabled_apis]) + +get_hash_header = env.CodeGenerate( + target = 'main/get_hash.h', + script = 'main/get_hash_generator.py', + source = GLAPI + 'gen/gl_and_es_API.xml', + command = python_cmd + ' $SCRIPT ' + get_hash_gen_opts + + ' -f $SOURCE > $TARGET' +) + +env.Depends(glget_sources, get_hash_header) + # # Assembly sources # -- cgit v1.2.3