1848b8605Smrgfrom sys import executable as python_cmd
2848b8605Smrgimport distutils.version
3848b8605Smrg
4848b8605SmrgImport('*')
5848b8605Smrg
6848b8605Smrgif not env['llvm']:
7b8e80941Smrg    print('warning: LLVM disabled: not building llvmpipe')
8848b8605Smrg    Return()
9848b8605Smrg
10848b8605Smrgenv = env.Clone()
11848b8605Smrg
12b8e80941Smrgenv.MSVC2013Compat()
13b8e80941Smrg
14848b8605Smrgllvmpipe = env.ConvenienceLibrary(
15848b8605Smrg	target = 'llvmpipe',
16848b8605Smrg	source = env.ParseSourceList('Makefile.sources', 'C_SOURCES')
17848b8605Smrg	)
18848b8605Smrg
19848b8605Smrgenv.Alias('llvmpipe', llvmpipe)
20848b8605Smrg
21848b8605Smrg
22848b8605Smrgif not env['embedded']:
23848b8605Smrg    env = env.Clone()
24848b8605Smrg
25848b8605Smrg    env.Prepend(LIBS = [llvmpipe, gallium, mesautil])
26848b8605Smrg
27848b8605Smrg    tests = [
28b8e80941Smrg        'arit',
29848b8605Smrg        'format',
30848b8605Smrg        'blend',
31848b8605Smrg        'conv',
32848b8605Smrg        'printf',
33848b8605Smrg    ]
34848b8605Smrg
35848b8605Smrg    for test in tests:
36848b8605Smrg        testname = 'lp_test_' + test
37848b8605Smrg        target = env.Program(
38848b8605Smrg            target = testname,
39848b8605Smrg            source = [testname + '.c', 'lp_test_main.c'],
40848b8605Smrg        )
41b8e80941Smrg        env.UnitTest(testname, target)
42848b8605Smrg
43848b8605SmrgExport('llvmpipe')
44