env.Prepend(CPPPATH = [
'#include',
+ xmlpool_options.dir.dir, # Dir to generated xmlpool/options.h
'#src',
'#src/mapi',
'#src/mesa',
'#src/gallium/include',
'#src/gallium/auxiliary',
'#src/util',
+ '#src/util/format',
])
env.CodeGenerate(
command = python_cmd + ' $SCRIPT > $TARGET'
)
+env.CodeGenerate(
+ target = 'format/u_format_table.c',
+ script = 'format/u_format_table.py',
+ source = ['format/u_format.csv'],
+ command = python_cmd + ' $SCRIPT $SOURCE > $TARGET'
+)
+
+env.Depends('format/u_format_table.c', [
+ 'format/u_format_parse.py',
+ 'format/u_format_pack.py',
+])
+
# parse Makefile.sources
source_lists = env.ParseSourceList('Makefile.sources')
source_lists['MESA_UTIL_GENERATED_FILES']
)
-# XXX We don't yet have scons support for detecting any of the various
-# HAVE_SHA1_* definitions, so for now simply disable the shader cache.
-if False:
- mesautil_sources += source_lists['MESA_UTIL_SHADER_CACHE_FILES']
+mesautilenv = env.Clone()
-mesautil = env.ConvenienceLibrary(
+if env['dri']:
+ mesautil_sources += source_lists['XMLCONFIG_FILES']
+
+ mesautilenv.AppendUnique(LIBS = [
+ 'expat',
+ ])
+
+mesautil = mesautilenv.ConvenienceLibrary(
target = 'mesautil',
source = mesautil_sources,
)
source = ['roundeven_test.c'],
)
env.UnitTest("roundeven_test", roundeven_test)
+
+env.Prepend(LIBS = [mesautil])
+mesa_sha1_test = env.Program(
+ target = 'mesa-sha1_test',
+ source = ['mesa-sha1_test.c'],
+)
+env.UnitTest("mesa-sha1_test", mesa_sha1_test)