SConscript 1.02 KB
Newer Older
1 2 3 4 5 6 7 8
import common

Import('*')

from sys import executable as python_cmd

env = env.Clone()

9
env.MSVC2013Compat()
10

11 12
env.Prepend(CPPPATH = [
    '#include',
Brian Paul's avatar
Brian Paul committed
13 14 15
    '#src',
    '#src/mapi',
    '#src/mesa',
16 17
    '#src/gallium/include',
    '#src/gallium/auxiliary',
18 19 20
    '#src/util',
])

21 22 23 24 25 26 27
env.CodeGenerate(
    target = 'format_srgb.c',
    script = 'format_srgb.py',
    source = [],
    command = python_cmd + ' $SCRIPT > $TARGET'
)

28 29 30
# parse Makefile.sources
source_lists = env.ParseSourceList('Makefile.sources')

31 32 33 34
mesautil_sources = (
    source_lists['MESA_UTIL_FILES'] +
    source_lists['MESA_UTIL_GENERATED_FILES']
)
35 36 37 38 39 40 41 42

mesautil = env.ConvenienceLibrary(
    target = 'mesautil',
    source = mesautil_sources,
)

env.Alias('mesautil', mesautil)
Export('mesautil')
43 44 45 46 47 48


u_atomic_test = env.Program(
    target = 'u_atomic_test',
    source = ['u_atomic_test.c'],
)
49
env.UnitTest("u_atomic_test", u_atomic_test)
50 51 52 53 54

roundeven_test = env.Program(
    target = 'roundeven_test',
    source = ['roundeven_test.c'],
)
55
env.UnitTest("roundeven_test", roundeven_test)