X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fllvmpipe%2FSConscript;h=20500fd834ff41121c9bebae8c8f8b95999c18e3;hb=155139059ba588da1161eaa692515cacdead9f4e;hp=13c1a13e87ab4971e9b7be4354789fa01485fdca;hpb=3ce4375912c8ea488460e593e07c5bb15b92dca9;p=mesa.git diff --git a/src/gallium/drivers/llvmpipe/SConscript b/src/gallium/drivers/llvmpipe/SConscript index 13c1a13e87a..20500fd834f 100644 --- a/src/gallium/drivers/llvmpipe/SConscript +++ b/src/gallium/drivers/llvmpipe/SConscript @@ -1,70 +1,23 @@ -Import('*') +from sys import executable as python_cmd +import distutils.version -env = env.Clone() +Import('*') -env.Tool('llvm') -if not env.has_key('LLVM_VERSION'): - print 'warning: LLVM not found: not building llvmpipe' +if not env['llvm']: + print 'warning: LLVM disabled: not building llvmpipe' Return() -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' -) - -# XXX: Our dependency scanner only finds depended modules in relative dirs. -env.Depends('lp_tile_soa.c', [ - '#src/gallium/auxiliary/util/u_format_parse.py', - '#src/gallium/auxiliary/util/u_format_pack.py', - '#src/gallium/auxiliary/util/u_format_access.py', -]) +env = env.Clone() llvmpipe = env.ConvenienceLibrary( target = 'llvmpipe', - source = [ - 'lp_buffer.c', - 'lp_clear.c', - 'lp_context.c', - 'lp_draw_arrays.c', - 'lp_fence.c', - 'lp_flush.c', - 'lp_jit.c', - 'lp_perf.c', - 'lp_query.c', - 'lp_rast.c', - 'lp_rast_tri.c', - 'lp_scene.c', - 'lp_scene_queue.c', - 'lp_screen.c', - 'lp_setup.c', - 'lp_setup_line.c', - 'lp_setup_point.c', - 'lp_setup_tri.c', - 'lp_setup_vbuf.c', - 'lp_state_blend.c', - 'lp_state_clip.c', - 'lp_state_derived.c', - 'lp_state_fs.c', - 'lp_state_rasterizer.c', - 'lp_state_sampler.c', - 'lp_state_surface.c', - 'lp_state_vertex.c', - 'lp_state_vs.c', - 'lp_surface.c', - 'lp_tex_sample_llvm.c', - 'lp_texture.c', - 'lp_tile_image.c', - 'lp_tile_soa.c', - ]) + source = env.ParseSourceList('Makefile.sources', 'C_SOURCES') + ) +env.Alias('llvmpipe', llvmpipe) -if env['platform'] != 'embedded': + +if not env['embedded']: env = env.Clone() env.Prepend(LIBS = [llvmpipe] + gallium) @@ -73,13 +26,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')