nir/print: Factor variable name lookup into a helper
[mesa.git] / src / glsl / Makefile.am
index 9a7f33d7134ee574d9d0acd538ec493c73c53e3d..8b0a73b250a768aa48bf40c622e85643a27efb18 100644 (file)
@@ -50,12 +50,14 @@ EXTRA_DIST = tests glcpp/tests README TODO glcpp/README     \
        nir/nir_opcodes_c.py                            \
        nir/nir_opcodes_h.py                            \
        nir/nir_opt_algebraic.py                        \
+       nir/tests                                       \
        SConscript
 
 include Makefile.sources
 
 TESTS = glcpp/tests/glcpp-test                         \
        glcpp/tests/glcpp-test-cr-lf                    \
+        nir/tests/control_flow_tests                   \
        tests/blob-test                                 \
        tests/general-ir-test                           \
        tests/optimization-test                         \
@@ -70,12 +72,13 @@ noinst_LTLIBRARIES = libnir.la libglsl.la libglcpp.la
 check_PROGRAMS =                                       \
        glcpp/glcpp                                     \
        glsl_test                                       \
+       nir/tests/control_flow_tests                    \
        tests/blob-test                                 \
        tests/general-ir-test                           \
        tests/sampler-types-test                        \
        tests/uniform-initializer-test
 
-noinst_PROGRAMS = glsl_compiler
+noinst_PROGRAMS = glsl_compiler spirv2nir
 
 tests_blob_test_SOURCES =                              \
        tests/blob_test.c
@@ -140,18 +143,29 @@ libglsl_la_SOURCES =                                      \
        glsl_parser.cpp                                 \
        glsl_parser.h                                   \
        $(LIBGLSL_FILES)                                \
-       $(NIR_FILES)
+       $(NIR_FILES)                                    \
+       $(NIR_GENERATED_FILES)
+
 
 libnir_la_SOURCES =                                    \
-       glsl_types.cpp                                  \
-       builtin_types.cpp                               \
-       glsl_symbol_table.cpp                           \
-       $(NIR_FILES)
+       $(NIR_FILES)                                    \
+       $(NIR_GENERATED_FILES)
 
 glsl_compiler_SOURCES = \
        $(GLSL_COMPILER_CXX_FILES)
 
 glsl_compiler_LDADD =                                  \
+       libglsl.la                                      \
+       $(top_builddir)/src/libglsl_util.la             \
+       $(top_builddir)/src/util/libmesautil.la         \
+       $(PTHREAD_LIBS)
+
+spirv2nir_SOURCES = \
+       standalone_scaffolding.cpp \
+       standalone_scaffolding.h \
+       nir/spirv2nir.c
+
+spirv2nir_LDADD =                                      \
        libglsl.la                                      \
        $(top_builddir)/src/libglsl_util.la             \
        $(PTHREAD_LIBS)
@@ -226,11 +240,7 @@ BUILT_SOURCES =                                            \
        glsl_lexer.cpp                                  \
        glcpp/glcpp-parse.c                             \
        glcpp/glcpp-lex.c                               \
-       nir/nir_builder_opcodes.h                               \
-       nir/nir_constant_expressions.c                  \
-       nir/nir_opcodes.c                               \
-       nir/nir_opcodes.h                               \
-       nir/nir_opt_algebraic.c
+       $(NIR_GENERATED_FILES)
 CLEANFILES =                                           \
        glcpp/glcpp-parse.h                             \
        glsl_parser.h                                   \
@@ -249,7 +259,7 @@ nir/nir_builder_opcodes.h: nir/nir_opcodes.py nir/nir_builder_opcodes_h.py
        $(MKDIR_GEN)
        $(PYTHON_GEN) $(srcdir)/nir/nir_builder_opcodes_h.py > $@
 
-nir/nir_constant_expressions.c: nir/nir_opcodes.py nir/nir_constant_expressions.py nir/nir_constant_expressions.h
+nir/nir_constant_expressions.c: nir/nir_opcodes.py nir/nir_constant_expressions.py
        $(MKDIR_GEN)
        $(PYTHON_GEN) $(srcdir)/nir/nir_constant_expressions.py > $@
 
@@ -264,3 +274,13 @@ nir/nir_opcodes.c: nir/nir_opcodes.py nir/nir_opcodes_c.py
 nir/nir_opt_algebraic.c: nir/nir_opt_algebraic.py nir/nir_algebraic.py
        $(MKDIR_GEN)
        $(PYTHON_GEN) $(srcdir)/nir/nir_opt_algebraic.py > $@
+
+nir_tests_control_flow_tests_SOURCES =                 \
+       nir/tests/control_flow_tests.cpp
+nir_tests_control_flow_tests_CFLAGS =                  \
+       $(PTHREAD_CFLAGS)
+nir_tests_control_flow_tests_LDADD =                   \
+       $(top_builddir)/src/gtest/libgtest.la           \
+       $(top_builddir)/src/glsl/libnir.la              \
+       $(top_builddir)/src/util/libmesautil.la         \
+       $(PTHREAD_LIBS)