llvmpipe: consolidate C sources list into Makefile.sources
[mesa.git] / src / gallium / drivers / llvmpipe / SConscript
1 from sys import executable as python_cmd
2 import distutils.version
3
4 Import('*')
5
6 if not env['llvm']:
7 print 'warning: LLVM disabled: not building llvmpipe'
8 Return()
9
10 env = env.Clone()
11
12 llvmpipe = env.ConvenienceLibrary(
13 target = 'llvmpipe',
14 source = env.ParseSourceList('Makefile.sources', 'C_SOURCES')
15 )
16
17 env.Alias('llvmpipe', llvmpipe)
18
19
20 if not env['embedded']:
21 env = env.Clone()
22
23 env.Prepend(LIBS = [llvmpipe] + gallium)
24
25 tests = [
26 'format',
27 'blend',
28 'conv',
29 'printf',
30 ]
31
32 if not env['msvc']:
33 tests.append('arit')
34
35 for test in tests:
36 testname = 'lp_test_' + test
37 target = env.Program(
38 target = testname,
39 source = [testname + '.c', 'lp_test_main.c'],
40 )
41 env.InstallProgram(target)
42
43 # http://www.scons.org/wiki/UnitTests
44 alias = env.Alias(testname, [target], target[0].abspath)
45 AlwaysBuild(alias)
46
47 Export('llvmpipe')