glsl: Make a function to express a GLSL version ir human-readable form.
[mesa.git] / src / glsl / Makefile.sources
index f2743f750670ce80aa5411ae9f14fbd6250b1d07..5e098fc052cf4e285491d65a96305327c1a7f863 100644 (file)
@@ -1,6 +1,7 @@
 # shared source lists for Makefile, SConscript, and Android.mk
 
-GLSL_SRCDIR ?= .
+GLSL_SRCDIR = $(top_srcdir)/src/glsl
+GLSL_BUILDDIR = $(top_builddir)/src/glsl
 
 # libglcpp
 
@@ -8,16 +9,12 @@ LIBGLCPP_FILES = \
        $(GLSL_SRCDIR)/glcpp/pp.c
 
 LIBGLCPP_GENERATED_FILES = \
-       $(GLSL_SRCDIR)/glcpp/glcpp-lex.c \
-       $(GLSL_SRCDIR)/glcpp/glcpp-parse.c
+       $(GLSL_BUILDDIR)/glcpp/glcpp-lex.c \
+       $(GLSL_BUILDDIR)/glcpp/glcpp-parse.c
 
 # libglsl
 
 LIBGLSL_FILES = \
-       $(GLSL_SRCDIR)/strtod.c \
-       $(GLSL_SRCDIR)/ralloc.c
-
-LIBGLSL_CXX_FILES = \
        $(GLSL_SRCDIR)/ast_expr.cpp \
        $(GLSL_SRCDIR)/ast_function.cpp \
        $(GLSL_SRCDIR)/ast_to_hir.cpp \
@@ -66,6 +63,7 @@ LIBGLSL_CXX_FILES = \
        $(GLSL_SRCDIR)/lower_vec_index_to_swizzle.cpp \
        $(GLSL_SRCDIR)/lower_vector.cpp \
        $(GLSL_SRCDIR)/lower_output_reads.cpp \
+       $(GLSL_SRCDIR)/lower_ubo_reference.cpp \
        $(GLSL_SRCDIR)/opt_algebraic.cpp \
        $(GLSL_SRCDIR)/opt_array_splitting.cpp \
        $(GLSL_SRCDIR)/opt_constant_folding.cpp \
@@ -83,7 +81,9 @@ LIBGLSL_CXX_FILES = \
        $(GLSL_SRCDIR)/opt_structure_splitting.cpp \
        $(GLSL_SRCDIR)/opt_swizzle_swizzle.cpp \
        $(GLSL_SRCDIR)/opt_tree_grafting.cpp \
-       $(GLSL_SRCDIR)/s_expression.cpp
+       $(GLSL_SRCDIR)/s_expression.cpp \
+       $(GLSL_SRCDIR)/strtod.c \
+       $(GLSL_SRCDIR)/ralloc.c
 
 # glsl_compiler
 
@@ -93,7 +93,7 @@ GLSL_COMPILER_CXX_FILES = \
 
 # builtin_compiler
 #
-# This is built before libglsl to generate builtin_funciton.cpp for libglsl.
+# This is built before libglsl to generate builtin_function.cpp for libglsl.
 # For this to work, a dummy version of builtin_function.cpp,
 # builtin_stubs.cpp, is used.
 
@@ -101,10 +101,10 @@ BUILTIN_COMPILER_CXX_FILES = \
        $(GLSL_SRCDIR)/builtin_stubs.cpp
 
 BUILTIN_COMPILER_GENERATED_CXX_FILES = \
-       $(GLSL_SRCDIR)/glsl_lexer.cc \
-       $(GLSL_SRCDIR)/glsl_parser.cc
+       $(GLSL_BUILDDIR)/glsl_lexer.cc \
+       $(GLSL_BUILDDIR)/glsl_parser.cc
 
 # libglsl generated sources
 LIBGLSL_GENERATED_CXX_FILES = \
-       $(GLSL_SRCDIR)/$(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
-       $(GLSL_SRCDIR)/builtin_function.cpp
+       $(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
+       $(GLSL_BUILDDIR)/builtin_function.cpp