On 13/04/16 18:19, Emil Velikov wrote:
From: Jose Fonseca <jfons...@vmware.com>

Emil Velikov:
  - Attribute the src/{glsl,compiler}/nir move
  - Flesh out to separate SConscript

Signed-off-by: Emil Velikov <emil.veli...@collabora.com>
---
  src/compiler/SConscript     |  1 +
  src/compiler/SConscript.nir | 74 +++++++++++++++++++++++++++++++++++++++++++++
  2 files changed, 75 insertions(+)
  create mode 100644 src/compiler/SConscript.nir

diff --git a/src/compiler/SConscript b/src/compiler/SConscript
index 8969d82..10c79c4 100644
--- a/src/compiler/SConscript
+++ b/src/compiler/SConscript
@@ -22,3 +22,4 @@ compiler = env.ConvenienceLibrary(
  Export('compiler')

  SConscript('SConscript.glsl')
+SConscript('SConscript.nir')
diff --git a/src/compiler/SConscript.nir b/src/compiler/SConscript.nir
new file mode 100644
index 0000000..d82d126
--- /dev/null
+++ b/src/compiler/SConscript.nir
@@ -0,0 +1,74 @@
+import common
+
+Import('*')
+
+from sys import executable as python_cmd
+
+env = env.Clone()
+
+env.MSVC2013Compat()
+
+env.Prepend(CPPPATH = [
+    '#include',
+    '#src',
+    '#src/mapi',
+    '#src/mesa',
+    '#src/gallium/include',
+    '#src/gallium/auxiliary',
+    '#src/compiler/nir',
+])
+
+# Make generated headers reachable from the include path.
+env.Prepend(CPPPATH = [Dir('.').abspath, Dir('nir').abspath])
+
+# nir generated sources
+
+nir_builder_opcodes_h = env.CodeGenerate(
+    target = 'nir/nir_builder_opcodes.h',
+    script = 'nir/nir_builder_opcodes_h.py',
+    source = [],
+    command = python_cmd + ' $SCRIPT > $TARGET'
+)
+
+env.CodeGenerate(
+    target = 'nir/nir_constant_expressions.c',
+    script = 'nir/nir_constant_expressions.py',
+    source = [],
+    command = python_cmd + ' $SCRIPT > $TARGET'
+)
+
+env.CodeGenerate(
+    target = 'nir/nir_opcodes.h',
+    script = 'nir/nir_opcodes_h.py',
+    source = [],
+    command = python_cmd + ' $SCRIPT > $TARGET'
+)
+
+env.CodeGenerate(
+    target = 'nir/nir_opcodes.c',
+    script = 'nir/nir_opcodes_c.py',
+    source = [],
+    command = python_cmd + ' $SCRIPT > $TARGET'
+)
+
+env.CodeGenerate(
+    target = 'nir/nir_opt_algebraic.c',
+    script = 'nir/nir_opt_algebraic.py',
+    source = [],
+    command = python_cmd + ' $SCRIPT > $TARGET'
+)
+
+# parse Makefile.sources
+source_lists = env.ParseSourceList('Makefile.sources')
+
+nir_sources = source_lists['NIR_FILES']
+nir_sources += source_lists['NIR_GENERATED_FILES']
+
+nir = env.ConvenienceLibrary(
+    target = 'nir',
+    source = nir_sources,
+)
+
+env.Alias('nir', nir)
+Export('nir')
+


Series looks great FWIW (thought I'm a biased reviewer here.) Thanks for updating it.

Reviewed-by: Jose Fonseca <jfons...@vmware.com>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to