summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/SConscript68
-rw-r--r--src/glsl/apps/SConscript36
-rw-r--r--src/glsl/cl/SConscript11
-rw-r--r--src/glsl/pp/SConscript24
4 files changed, 68 insertions, 71 deletions
diff --git a/src/glsl/SConscript b/src/glsl/SConscript
new file mode 100644
index 00000000000..6f1f81b199a
--- /dev/null
+++ b/src/glsl/SConscript
@@ -0,0 +1,68 @@
+import common
+
+Import('*')
+
+env = env.Clone()
+
+sources = [
+ 'pp/sl_pp_context.c',
+ 'pp/sl_pp_define.c',
+ 'pp/sl_pp_dict.c',
+ 'pp/sl_pp_error.c',
+ 'pp/sl_pp_expression.c',
+ 'pp/sl_pp_extension.c',
+ 'pp/sl_pp_if.c',
+ 'pp/sl_pp_line.c',
+ 'pp/sl_pp_macro.c',
+ 'pp/sl_pp_pragma.c',
+ 'pp/sl_pp_process.c',
+ 'pp/sl_pp_purify.c',
+ 'pp/sl_pp_token.c',
+ 'pp/sl_pp_version.c',
+ 'cl/sl_cl_parse.c',
+]
+
+glsl = env.StaticLibrary(
+ target = 'glsl',
+ source = sources,
+)
+
+Export('glsl')
+
+env = env.Clone()
+
+if env['platform'] == 'windows':
+ env.PrependUnique(LIBS = [
+ 'user32',
+ ])
+
+env.Prepend(LIBS = [glsl])
+
+env.Program(
+ target = 'purify',
+ source = ['apps/purify.c'],
+)
+
+env.Program(
+ target = 'tokenise',
+ source = ['apps/tokenise.c'],
+)
+
+env.Program(
+ target = 'version',
+ source = ['apps/version.c'],
+)
+
+env.Program(
+ target = 'process',
+ source = ['apps/process.c'],
+)
+
+glsl_compile = env.Program(
+ target = 'compile',
+ source = ['apps/compile.c'],
+)
+
+if env['platform'] == common.default_platform:
+ # Only export the GLSL compiler when building for the host platform
+ Export('glsl_compile')
diff --git a/src/glsl/apps/SConscript b/src/glsl/apps/SConscript
deleted file mode 100644
index 4c81b3be956..00000000000
--- a/src/glsl/apps/SConscript
+++ /dev/null
@@ -1,36 +0,0 @@
-Import('*')
-
-env = env.Clone()
-
-if env['platform'] == 'windows':
- env.PrependUnique(LIBS = [
- 'user32',
- ])
-
-env.Prepend(LIBS = [glsl, glslcl])
-
-env.Program(
- target = 'purify',
- source = ['purify.c'],
-)
-
-env.Program(
- target = 'tokenise',
- source = ['tokenise.c'],
-)
-
-env.Program(
- target = 'version',
- source = ['version.c'],
-)
-
-env.Program(
- target = 'process',
- source = ['process.c'],
-)
-
-glsl_compile = env.Program(
- target = 'compile',
- source = ['compile.c'],
-)
-Export('glsl_compile')
diff --git a/src/glsl/cl/SConscript b/src/glsl/cl/SConscript
deleted file mode 100644
index 9a4e4c15b6d..00000000000
--- a/src/glsl/cl/SConscript
+++ /dev/null
@@ -1,11 +0,0 @@
-Import('*')
-
-env = env.Clone()
-
-glslcl = env.StaticLibrary(
- target = 'glslcl',
- source = [
- 'sl_cl_parse.c',
- ],
-)
-Export('glslcl')
diff --git a/src/glsl/pp/SConscript b/src/glsl/pp/SConscript
deleted file mode 100644
index 5bd615c8d7f..00000000000
--- a/src/glsl/pp/SConscript
+++ /dev/null
@@ -1,24 +0,0 @@
-Import('*')
-
-env = env.Clone()
-
-glsl = env.StaticLibrary(
- target = 'glsl',
- source = [
- 'sl_pp_context.c',
- 'sl_pp_define.c',
- 'sl_pp_dict.c',
- 'sl_pp_error.c',
- 'sl_pp_expression.c',
- 'sl_pp_extension.c',
- 'sl_pp_if.c',
- 'sl_pp_line.c',
- 'sl_pp_macro.c',
- 'sl_pp_pragma.c',
- 'sl_pp_process.c',
- 'sl_pp_purify.c',
- 'sl_pp_token.c',
- 'sl_pp_version.c',
- ],
-)
-Export('glsl')