1 # 2 # Copyright 2012 Jon TURNEY 3 # Copyright (C) 2015 Intel Corporation 4 # 5 # Permission is hereby granted, free of charge, to any person obtaining a 6 # copy of this software and associated documentation files (the "Software"), 7 # to deal in the Software without restriction, including without limitation 8 # the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 # and/or sell copies of the Software, and to permit persons to whom the 10 # Software is furnished to do so, subject to the following conditions: 11 # 12 # The above copyright notice and this permission notice (including the next 13 # paragraph) shall be included in all copies or substantial portions of the 14 # Software. 15 # 16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 22 # IN THE SOFTWARE. 23 24 noinst_LTLIBRARIES += nir/libnir.la 25 26 nir_libnir_la_LIBADD = \ 27 libcompiler.la 28 29 nir_libnir_la_SOURCES = \ 30 $(NIR_FILES) \ 31 $(SPIRV_FILES) \ 32 $(NIR_GENERATED_FILES) 33 34 nir/nir_builder_opcodes.h: nir/nir_opcodes.py nir/nir_builder_opcodes_h.py 35 $(MKDIR_GEN) 36 $(PYTHON_GEN) $(srcdir)/nir/nir_builder_opcodes_h.py > $@ || ($(RM) $@; false) 37 38 nir/nir_constant_expressions.c: nir/nir_opcodes.py nir/nir_constant_expressions.py 39 $(MKDIR_GEN) 40 $(PYTHON_GEN) $(srcdir)/nir/nir_constant_expressions.py > $@ || ($(RM) $@; false) 41 42 nir/nir_opcodes.h: nir/nir_opcodes.py nir/nir_opcodes_h.py 43 $(MKDIR_GEN) 44 $(PYTHON_GEN) $(srcdir)/nir/nir_opcodes_h.py > $@ || ($(RM) $@; false) 45 46 nir/nir_opcodes.c: nir/nir_opcodes.py nir/nir_opcodes_c.py 47 $(MKDIR_GEN) 48 $(PYTHON_GEN) $(srcdir)/nir/nir_opcodes_c.py > $@ || ($(RM) $@; false) 49 50 nir/nir_opt_algebraic.c: nir/nir_opt_algebraic.py nir/nir_algebraic.py 51 $(MKDIR_GEN) 52 $(PYTHON_GEN) $(srcdir)/nir/nir_opt_algebraic.py > $@ || ($(RM) $@; false) 53 54 noinst_PROGRAMS += spirv2nir 55 56 spirv2nir_SOURCES = \ 57 spirv/spirv2nir.c 58 59 spirv2nir_CPPFLAGS = \ 60 $(AM_CPPFLAGS) \ 61 -I$(top_builddir)/src/compiler/nir \ 62 -I$(top_srcdir)/src/compiler/nir \ 63 -I$(top_srcdir)/src/compiler/spirv 64 65 spirv2nir_LDADD = \ 66 nir/libnir.la \ 67 $(top_builddir)/src/util/libmesautil.la \ 68 -lm \ 69 $(PTHREAD_LIBS) 70 71 nodist_EXTRA_spirv2nir_SOURCES = dummy.cpp 72 73 check_PROGRAMS += nir/tests/control_flow_tests 74 75 nir_tests_control_flow_tests_CPPFLAGS = \ 76 $(AM_CPPFLAGS) \ 77 -I$(top_builddir)/src/compiler/nir \ 78 -I$(top_srcdir)/src/compiler/nir 79 80 nir_tests_control_flow_tests_SOURCES = \ 81 nir/tests/control_flow_tests.cpp 82 nir_tests_control_flow_tests_CFLAGS = \ 83 $(PTHREAD_CFLAGS) 84 nir_tests_control_flow_tests_LDADD = \ 85 $(top_builddir)/src/gtest/libgtest.la \ 86 nir/libnir.la \ 87 $(top_builddir)/src/util/libmesautil.la \ 88 $(PTHREAD_LIBS) 89 90 91 TESTS += nir/tests/control_flow_tests 92 93 94 BUILT_SOURCES += $(NIR_GENERATED_FILES) 95 CLEANFILES += $(NIR_GENERATED_FILES) 96 97 EXTRA_DIST += \ 98 nir/nir_algebraic.py \ 99 nir/nir_builder_opcodes_h.py \ 100 nir/nir_constant_expressions.py \ 101 nir/nir_opcodes.py \ 102 nir/nir_opcodes_c.py \ 103 nir/nir_opcodes_h.py \ 104 nir/nir_opt_algebraic.py \ 105 nir/tests \ 106 SConscript.nir 107