summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/SConscript
blob: 8188156afc2f736620faaf765a1f5dd0eb81a31a (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()

env.MSVC2013Compat()

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 = [
        'arit',
        'format',
        'blend',
        'conv',
        'printf',
    ]

    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')