# shared source lists for Makefile, SConscript, and Android.mk
-GLSL_SRCDIR ?= .
+GLSL_SRCDIR = $(top_srcdir)/src/glsl
+GLSL_BUILDDIR = $(top_builddir)/src/glsl
# libglcpp
$(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 \
$(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 \
$(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
# 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.
$(GLSL_SRCDIR)/builtin_stubs.cpp
BUILTIN_COMPILER_GENERATED_CXX_FILES = \
- $(GLSL_SRCDIR)/glsl_lexer.cpp \
- $(GLSL_SRCDIR)/glsl_parser.cpp
+ $(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