summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/SConscript
blob: 1bea61151c6580287cef5bc8b4992394a4512252 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
from sys import executable as python_cmd
import distutils.version

Import('*')

if not env['llvm']:
    print 'warning: LLVM disabled: not building llvmpipe'
    Return()

env = env.Clone()

llvmpipe = env.ConvenienceLibrary(
	target = 'llvmpipe',
	source = env.ParseSourceList('Makefile.sources', 'C_SOURCES')
	)

env.Alias('llvmpipe', llvmpipe)


if not env['embedded']:
    env = env.Clone()

    env.Prepend(LIBS = [llvmpipe, gallium, mesautil])

    tests = [
        'format',
        'blend',
        'conv',
        'printf',
    ]

    if not env['msvc']:
        tests.append('arit')

    for test in tests:
        testname = 'lp_test_' + test
        target = env.Program(
            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')