Merge branch 'gallium-noconstbuf'
[mesa.git] / src / glsl / SConscript
1 import common
2
3 Import('*')
4
5 env = env.Clone()
6
7 sources = [
8 'pp/sl_pp_context.c',
9 'pp/sl_pp_define.c',
10 'pp/sl_pp_dict.c',
11 'pp/sl_pp_error.c',
12 'pp/sl_pp_expression.c',
13 'pp/sl_pp_extension.c',
14 'pp/sl_pp_if.c',
15 'pp/sl_pp_line.c',
16 'pp/sl_pp_macro.c',
17 'pp/sl_pp_pragma.c',
18 'pp/sl_pp_process.c',
19 'pp/sl_pp_purify.c',
20 'pp/sl_pp_token.c',
21 'pp/sl_pp_token_util.c',
22 'pp/sl_pp_version.c',
23 'cl/sl_cl_parse.c',
24 ]
25
26 glsl = env.ConvenienceLibrary(
27 target = 'glsl',
28 source = sources,
29 )
30
31 Export('glsl')
32
33 env = env.Clone()
34
35 if env['platform'] == 'windows':
36 env.PrependUnique(LIBS = [
37 'user32',
38 ])
39
40 env.Prepend(LIBS = [glsl])
41
42 env.Program(
43 target = 'purify',
44 source = ['apps/purify.c'],
45 )
46
47 env.Program(
48 target = 'tokenise',
49 source = ['apps/tokenise.c'],
50 )
51
52 env.Program(
53 target = 'version',
54 source = ['apps/version.c'],
55 )
56
57 env.Program(
58 target = 'process',
59 source = ['apps/process.c'],
60 )
61
62 glsl_compile = env.Program(
63 target = 'compile',
64 source = ['apps/compile.c'],
65 )
66
67 if env['platform'] == common.default_platform:
68 # Only export the GLSL compiler when building for the host platform
69 Export('glsl_compile')