llvmpipe: implement the new can_create_resource() function
[mesa.git] / src / gallium / drivers / llvmpipe / SConscript
index 2911cf2179a59074bf63998fa84fa154a3dde8f6..cea44a786797bf0aee104a8e1f0d08c111cb8264 100644 (file)
@@ -1,3 +1,6 @@
+from sys import executable as python_cmd
+import distutils.version
+
 Import('*')
 
 if not env['llvm']:
@@ -6,15 +9,13 @@ if not env['llvm']:
 
 env = env.Clone()
 
-env.Tool('udis86')
-
 env.Append(CPPPATH = ['.'])
 
 env.CodeGenerate(
        target = 'lp_tile_soa.c',
        script = 'lp_tile_soa.py',
        source = ['#src/gallium/auxiliary/util/u_format.csv'],
-       command = 'python $SCRIPT $SOURCE > $TARGET'
+       command = python_cmd + ' $SCRIPT $SOURCE > $TARGET'
 )
 
 # XXX: Our dependency scanner only finds depended modules in relative dirs.
@@ -23,10 +24,15 @@ env.Depends('lp_tile_soa.c', [
     '#src/gallium/auxiliary/util/u_format_pack.py', 
 ])
 
+
+lp_tile_soa_os = env.SharedObject('lp_tile_soa.c')
+
+
 llvmpipe = env.ConvenienceLibrary(
        target = 'llvmpipe',
        source = [
                'lp_bld_alpha.c',
+               'lp_bld_blend.c',
                'lp_bld_blend_aos.c',
                'lp_bld_blend_logicop.c',
                'lp_bld_blend_soa.c',
@@ -38,9 +44,11 @@ llvmpipe = env.ConvenienceLibrary(
                'lp_fence.c',
                'lp_flush.c',
                'lp_jit.c',
+               'lp_memory.c',
                'lp_perf.c',
                'lp_query.c',
                'lp_rast.c',
+               'lp_rast_debug.c',
                'lp_rast_tri.c',
                'lp_scene.c',
                'lp_scene_queue.c',
@@ -54,8 +62,11 @@ llvmpipe = env.ConvenienceLibrary(
                'lp_state_clip.c',
                'lp_state_derived.c',
                'lp_state_fs.c',
+               'lp_state_setup.c',
+               'lp_state_gs.c',
                'lp_state_rasterizer.c',
                'lp_state_sampler.c',
+                'lp_state_so.c',
                'lp_state_surface.c',
                'lp_state_vertex.c',
                'lp_state_vs.c',
@@ -63,11 +74,13 @@ llvmpipe = env.ConvenienceLibrary(
                'lp_tex_sample.c',
                'lp_texture.c',
                'lp_tile_image.c',
-               'lp_tile_soa.c',
+        lp_tile_soa_os,
        ])
 
+env.Alias('llvmpipe', llvmpipe)
+
 
-if env['platform'] != 'embedded':
+if not env['embedded']:
     env = env.Clone()
 
     env.Prepend(LIBS = [llvmpipe] + gallium)
@@ -76,13 +89,22 @@ if env['platform'] != 'embedded':
         'format',
         'blend',
         'conv',
+        'printf',
     ]
 
+    if not env['msvc']:
+        tests.append('arit')
+
     for test in tests:
+        testname = 'lp_test_' + test
         target = env.Program(
-            target = 'lp_test_' + test,
-            source = ['lp_test_' + test + '.c', 'lp_test_main.c'],
+            target = testname,
+            source = [testname + '.c', 'lp_test_main.c'],
         )
         env.InstallProgram(target)
+        
+        # http://www.scons.org/wiki/UnitTests
+        alias = env.Alias(testname, [target], target[0].abspath)
+        AlwaysBuild(alias)
 
-    Export('llvmpipe')
+Export('llvmpipe')