Merge branch 'i965g-restart'
[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_version.c',
22 'cl/sl_cl_parse.c',
23 ]
24
25 glsl = env.StaticLibrary(
26 target = 'glsl',
27 source = sources,
28 )
29
30 Export('glsl')
31
32 env = env.Clone()
33
34 if env['platform'] == 'windows':
35 env.PrependUnique(LIBS = [
36 'user32',
37 ])
38
39 env.Prepend(LIBS = [glsl])
40
41 env.Program(
42 target = 'purify',
43 source = ['apps/purify.c'],
44 )
45
46 env.Program(
47 target = 'tokenise',
48 source = ['apps/tokenise.c'],
49 )
50
51 env.Program(
52 target = 'version',
53 source = ['apps/version.c'],
54 )
55
56 env.Program(
57 target = 'process',
58 source = ['apps/process.c'],
59 )
60
61 glsl_compile = env.Program(
62 target = 'compile',
63 source = ['apps/compile.c'],
64 )
65
66 if env['platform'] == common.default_platform:
67 # Only export the GLSL compiler when building for the host platform
68 Export('glsl_compile')