blob: 6f1f81b199af9aad2f2a02a5f425d19047a6bfaa [file] [log] [blame]
José Fonseca491f3842009-12-10 16:29:04 +00001import common
2
3Import('*')
4
5env = env.Clone()
6
7sources = [
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
25glsl = env.StaticLibrary(
26 target = 'glsl',
27 source = sources,
28)
29
30Export('glsl')
31
32env = env.Clone()
33
34if env['platform'] == 'windows':
35 env.PrependUnique(LIBS = [
36 'user32',
37 ])
38
39env.Prepend(LIBS = [glsl])
40
41env.Program(
42 target = 'purify',
43 source = ['apps/purify.c'],
44)
45
46env.Program(
47 target = 'tokenise',
48 source = ['apps/tokenise.c'],
49)
50
51env.Program(
52 target = 'version',
53 source = ['apps/version.c'],
54)
55
56env.Program(
57 target = 'process',
58 source = ['apps/process.c'],
59)
60
61glsl_compile = env.Program(
62 target = 'compile',
63 source = ['apps/compile.c'],
64)
65
66if env['platform'] == common.default_platform:
67 # Only export the GLSL compiler when building for the host platform
68 Export('glsl_compile')