util: add BITSET_LAST_BIT() helper
[mesa.git] / src / util / SConscript
index 582592c203f28b2aaade9445e2bbb4f61c3d061a..f0437694347f423f2925a5ce623ef16144372188 100644 (file)
@@ -2,10 +2,6 @@ import common
 
 Import('*')
 
-SConscript([
-   'xmlpool',
-])
-
 from sys import executable as python_cmd
 
 env = env.Clone()
@@ -21,6 +17,7 @@ env.Prepend(CPPPATH = [
     '#src/gallium/include',
     '#src/gallium/auxiliary',
     '#src/util',
+    '#src/util/format',
 ])
 
 env.CodeGenerate(
@@ -30,20 +27,34 @@ 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')
 
 mesautil_sources = (
     source_lists['MESA_UTIL_FILES'] +
-    source_lists['MESA_UTIL_GENERATED_FILES'] +
-    source_lists['XMLCONFIG_FILES']
+    source_lists['MESA_UTIL_GENERATED_FILES']
 )
 
 mesautilenv = env.Clone()
 
-mesautilenv.AppendUnique(LIBS = [
-    'expat',
-])
+if env['dri']:
+    mesautil_sources += source_lists['XMLCONFIG_FILES']
+
+    mesautilenv.AppendUnique(LIBS = [
+        'expat',
+    ])
 
 mesautil = mesautilenv.ConvenienceLibrary(
     target = 'mesautil',
@@ -65,3 +76,10 @@ roundeven_test = env.Program(
     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)