summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/SConscript
blob: 07c420e138d5d4676f769739533439aae4bb9d2f (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Import('*')

from sys import executable as python_cmd

env.Append(CPPPATH = [
    'indices',
    'util',
])

env.CodeGenerate(
    target = 'indices/u_indices_gen.c', 
    script = 'indices/u_indices_gen.py', 
    source = [],
    command = python_cmd + ' $SCRIPT > $TARGET'
)

env.CodeGenerate(
    target = 'indices/u_unfilled_gen.c', 
    script = 'indices/u_unfilled_gen.py', 
    source = [],
    command = python_cmd + ' $SCRIPT > $TARGET'
)

env.CodeGenerate(
    target = 'util/u_format_srgb.c', 
    script = 'util/u_format_srgb.py', 
    source = [],
    command = python_cmd + ' $SCRIPT > $TARGET'
)

env.CodeGenerate(
    target = 'util/u_format_table.c',
    script = '#src/gallium/auxiliary/util/u_format_table.py',
    source = ['#src/gallium/auxiliary/util/u_format.csv'],
    command = python_cmd + ' $SCRIPT $SOURCE > $TARGET'
)

env.CodeGenerate(
    target = 'util/u_half.c',
    script = 'util/u_half.py',
    source = [],
    command = python_cmd + ' $SCRIPT > $TARGET'
)

env.Depends('util/u_format_table.c', [
    '#src/gallium/auxiliary/util/u_format_parse.py',
    'util/u_format_pack.py', 
])

source = env.ParseSourceList('Makefile.sources', [
    'C_SOURCES',
    'GENERATED_SOURCES'
])

if env['llvm']:
    source += env.ParseSourceList('Makefile.sources', [
        'GALLIVM_SOURCES',
        'GALLIVM_CPP_SOURCES'
    ])

    if env['toolchain'] == 'crossmingw':
        # compile lp_bld_misc.cpp without -gstabs option
        source = env.compile_without_gstabs(source, "gallivm/lp_bld_misc.cpp")

gallium = env.ConvenienceLibrary(
    target = 'gallium',
    source = source,
)

env.Alias('gallium', gallium)

Export('gallium')