blob: 101487df9102ee1d073b5c7c877688a45be9f5cf [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',
Keith Whitwellb2a615e2009-12-23 15:57:06 +000021 'pp/sl_pp_token_util.c',
José Fonseca491f3842009-12-10 16:29:04 +000022 'pp/sl_pp_version.c',
23 'cl/sl_cl_parse.c',
24]
25
26glsl = env.StaticLibrary(
27 target = 'glsl',
28 source = sources,
29)
30
31Export('glsl')
32
33env = env.Clone()
34
35if env['platform'] == 'windows':
36 env.PrependUnique(LIBS = [
37 'user32',
38 ])
39
40env.Prepend(LIBS = [glsl])
41
42env.Program(
43 target = 'purify',
44 source = ['apps/purify.c'],
45)
46
47env.Program(
48 target = 'tokenise',
49 source = ['apps/tokenise.c'],
50)
51
52env.Program(
53 target = 'version',
54 source = ['apps/version.c'],
55)
56
57env.Program(
58 target = 'process',
59 source = ['apps/process.c'],
60)
61
62glsl_compile = env.Program(
63 target = 'compile',
64 source = ['apps/compile.c'],
65)
66
67if env['platform'] == common.default_platform:
68 # Only export the GLSL compiler when building for the host platform
69 Export('glsl_compile')