glsl/glcpp: Integrate recent glcpp-test-cr-lf test into "make check"
[mesa.git] / src / glsl / Makefile.am
index 2e161b844b0d7c3c362537aa06dc8c3bcbed6d1b..0ccc81d752d4a4ba060f4e6ddcbca43f8b5b21fa 100644 (file)
@@ -21,6 +21,7 @@
 
 AM_CPPFLAGS = \
        -I$(top_srcdir)/include \
+       -I$(top_srcdir)/src \
        -I$(top_srcdir)/src/mapi \
        -I$(top_srcdir)/src/mesa/ \
        -I$(top_srcdir)/src/glsl/glcpp \
@@ -32,8 +33,9 @@ AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS)
 include Makefile.sources
 
 TESTS = glcpp/tests/glcpp-test                         \
+       glcpp/tests/glcpp-test-cr-lf                    \
+       tests/general-ir-test                           \
        tests/optimization-test                         \
-       tests/ralloc-test                               \
        tests/sampler-types-test                        \
        tests/uniform-initializer-test
 
@@ -45,18 +47,37 @@ noinst_LTLIBRARIES = libglsl.la libglcpp.la
 check_PROGRAMS =                                       \
        glcpp/glcpp                                     \
        glsl_test                                       \
-       tests/ralloc-test                               \
+       tests/general-ir-test                           \
        tests/sampler-types-test                        \
        tests/uniform-initializer-test
 
+noinst_PROGRAMS = glsl_compiler
+
+tests_general_ir_test_SOURCES =                \
+       $(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_SRCDIR)/standalone_scaffolding.cpp \
+       tests/builtin_variable_test.cpp                 \
+       tests/invalidate_locations_test.cpp             \
+       tests/general_ir_test.cpp                       \
+       tests/varyings_test.cpp                         \
+       tests/common.c
+tests_general_ir_test_CFLAGS =                         \
+       $(PTHREAD_CFLAGS)
+tests_general_ir_test_LDADD =                          \
+       $(top_builddir)/src/gtest/libgtest.la           \
+       $(top_builddir)/src/glsl/libglsl.la             \
+       $(PTHREAD_LIBS)
+
 tests_uniform_initializer_test_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   \
        tests/copy_constant_to_storage_tests.cpp        \
        tests/set_uniform_initializer_tests.cpp         \
-       tests/uniform_initializer_utils.cpp
+       tests/uniform_initializer_utils.cpp             \
+       tests/common.c
 tests_uniform_initializer_test_CFLAGS =                        \
        $(PTHREAD_CFLAGS)
 tests_uniform_initializer_test_LDADD =                 \
@@ -64,18 +85,11 @@ tests_uniform_initializer_test_LDADD =                      \
        $(top_builddir)/src/glsl/libglsl.la             \
        $(PTHREAD_LIBS)
 
-tests_ralloc_test_SOURCES =                            \
-       tests/ralloc_test.cpp                           \
-       $(top_builddir)/src/glsl/ralloc.c
-tests_ralloc_test_CFLAGS = $(PTHREAD_CFLAGS)
-tests_ralloc_test_LDADD =                              \
-       $(top_builddir)/src/gtest/libgtest.la           \
-       $(PTHREAD_LIBS)
-
 tests_sampler_types_test_SOURCES =                     \
        $(top_srcdir)/src/mesa/program/prog_hash_table.c\
        $(top_srcdir)/src/mesa/program/symbol_table.c   \
-       tests/sampler_types_test.cpp
+       tests/sampler_types_test.cpp                    \
+       tests/common.c
 tests_sampler_types_test_CFLAGS =                      \
        $(PTHREAD_CFLAGS)
 tests_sampler_types_test_LDADD =                       \
@@ -83,6 +97,8 @@ tests_sampler_types_test_LDADD =                      \
        $(top_builddir)/src/glsl/libglsl.la             \
        $(PTHREAD_LIBS)
 
+libglcpp_la_LIBADD =                                   \
+       $(top_builddir)/src/util/libmesautil.la
 libglcpp_la_SOURCES =                                  \
        glcpp/glcpp-lex.c                               \
        glcpp/glcpp-parse.c                             \
@@ -90,8 +106,11 @@ libglcpp_la_SOURCES =                                       \
 
 glcpp_glcpp_SOURCES =                                  \
        glcpp/glcpp.c                                   \
+       tests/common.c                                  \
        $(top_srcdir)/src/mesa/program/prog_hash_table.c
-glcpp_glcpp_LDADD = libglcpp.la
+glcpp_glcpp_LDADD =                                    \
+       libglcpp.la                                     \
+       -lm
 
 libglsl_la_LIBADD = libglcpp.la
 libglsl_la_SOURCES =                                   \
@@ -99,12 +118,22 @@ libglsl_la_SOURCES =                                       \
        glsl_parser.cpp                                 \
        $(LIBGLSL_FILES)
 
+glsl_compiler_SOURCES = \
+       $(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                                      \
+       $(PTHREAD_LIBS)
+
 glsl_test_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_SRCDIR)/standalone_scaffolding.cpp \
+       tests/common.c \
        test.cpp \
        test_optpass.cpp
 
@@ -147,11 +176,11 @@ glsl_lexer.cpp: glsl_lexer.ll
        $(AM_V_LEX) $(LEX) $(LFLAGS) -o $@ $<
 
 glcpp/glcpp-parse.c glcpp/glcpp-parse.h: glcpp/glcpp-parse.y
-       $(MKDIR_P) $(GLSL_BUILDDIR)/glcpp
+       $(AM_V_at)$(MKDIR_P) glcpp
        $(AM_V_YACC) $(YACC) $(YFLAGS) -o $@ -p "glcpp_parser_" --defines=$(GLSL_BUILDDIR)/glcpp/glcpp-parse.h $<
 
 glcpp/glcpp-lex.c: glcpp/glcpp-lex.l
-       $(MKDIR_P) $(GLSL_BUILDDIR)/glcpp
+       $(AM_V_at)$(MKDIR_P) glcpp
        $(AM_V_LEX) $(LEX) $(LFLAGS) -o $@ $<
 
 # Only the parsers (specifically the header files generated at the same time)