glsl_compiler: Re-enable building glsl_compiler
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 9 Sep 2013 14:58:08 +0000 (09:58 -0500)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 7 Oct 2013 16:59:23 +0000 (09:59 -0700)
This allows application developers to use Mesa's compiler as a
standalone validator for their shaders.

This is mostly a revert of commit 569f0e4.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/Makefile.am
src/glsl/SConscript

index 2e161b844b0d7c3c362537aa06dc8c3bcbed6d1b..cbf253cb5854b99ded3c808b532107895dbcb56c 100644 (file)
@@ -49,6 +49,8 @@ check_PROGRAMS =                                      \
        tests/sampler-types-test                        \
        tests/uniform-initializer-test
 
+noinst_PROGRAMS = glsl_compiler
+
 tests_uniform_initializer_test_SOURCES =               \
        $(top_srcdir)/src/mesa/main/hash_table.c        \
        $(top_srcdir)/src/mesa/main/imports.c           \
@@ -99,6 +101,15 @@ libglsl_la_SOURCES =                                        \
        glsl_parser.cpp                                 \
        $(LIBGLSL_FILES)
 
+glsl_compiler_SOURCES = \
+       $(top_srcdir)/src/mesa/main/hash_table.c \
+       $(top_srcdir)/src/mesa/main/imports.c \
+       $(top_srcdir)/src/mesa/program/prog_hash_table.c \
+       $(top_srcdir)/src/mesa/program/symbol_table.c \
+       $(GLSL_COMPILER_CXX_FILES)
+
+glsl_compiler_LDADD = libglsl.la
+
 glsl_test_SOURCES = \
        $(top_srcdir)/src/mesa/main/hash_table.c \
        $(top_srcdir)/src/mesa/main/imports.c \
index e386bdfb1b345bb2868a730fab1c40c8a13134bc..fe9d507328b6a5def428bc2c78c2156513c09c24 100644 (file)
@@ -98,11 +98,11 @@ if env['platform'] == 'windows':
 
 env.Prepend(LIBS = [glsl])
 
-glsl2 = env.Program(
-    target = 'glsl2',
+glsl_compiler = env.Program(
+    target = 'glsl_compiler',
     source = compiler_objs,
 )
-env.Alias('glsl2', glsl2)
+env.Alias('glsl_compiler', glsl_compiler)
 
 glcpp = env.Program(
     target = 'glcpp/glcpp',