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 24noinst_LTLIBRARIES += nir/libnir.la 25 26nir_libnir_la_LIBADD = \ 27 libcompiler.la 28 29nir_libnir_la_SOURCES = \ 30 $(NIR_FILES) \ 31 $(SPIRV_FILES) \ 32 $(SPIRV_GENERATED_FILES) \ 33 $(NIR_GENERATED_FILES) 34 35nir/nir_builder_opcodes.h: nir/nir_opcodes.py nir/nir_builder_opcodes_h.py 36 $(MKDIR_GEN) 37 $(PYTHON_GEN) $(srcdir)/nir/nir_builder_opcodes_h.py > $@ || ($(RM) $@; false) 38 39nir/nir_constant_expressions.c: nir/nir_opcodes.py nir/nir_constant_expressions.py 40 $(MKDIR_GEN) 41 $(PYTHON_GEN) $(srcdir)/nir/nir_constant_expressions.py > $@ || ($(RM) $@; false) 42 43nir/nir_opcodes.h: nir/nir_opcodes.py nir/nir_opcodes_h.py 44 $(MKDIR_GEN) 45 $(PYTHON_GEN) $(srcdir)/nir/nir_opcodes_h.py > $@ || ($(RM) $@; false) 46 47nir/nir_opcodes.c: nir/nir_opcodes.py nir/nir_opcodes_c.py 48 $(MKDIR_GEN) 49 $(PYTHON_GEN) $(srcdir)/nir/nir_opcodes_c.py > $@ || ($(RM) $@; false) 50 51nir/nir_opt_algebraic.c: nir/nir_opt_algebraic.py nir/nir_algebraic.py 52 $(MKDIR_GEN) 53 $(PYTHON_GEN) $(srcdir)/nir/nir_opt_algebraic.py > $@ || ($(RM) $@; false) 54 55spirv/spirv_info.c: spirv/spirv_info_c.py spirv/spirv.core.grammar.json 56 $(MKDIR_GEN) 57 $(PYTHON_GEN) $(srcdir)/spirv/spirv_info_c.py $(srcdir)/spirv/spirv.core.grammar.json $@ || ($(RM) $@; false) 58 59spirv/vtn_gather_types.c: spirv/vtn_gather_types_c.py spirv/spirv.core.grammar.json 60 $(MKDIR_GEN) 61 $(PYTHON_GEN) $(srcdir)/spirv/vtn_gather_types_c.py $(srcdir)/spirv/spirv.core.grammar.json $@ || ($(RM) $@; false) 62 63noinst_PROGRAMS += spirv2nir 64 65spirv2nir_SOURCES = \ 66 spirv/spirv2nir.c 67 68spirv2nir_CPPFLAGS = \ 69 $(AM_CPPFLAGS) \ 70 -I$(top_builddir)/src/compiler/nir \ 71 -I$(top_srcdir)/src/compiler/nir \ 72 -I$(top_srcdir)/src/compiler/spirv 73 74spirv2nir_LDADD = \ 75 nir/libnir.la \ 76 $(top_builddir)/src/util/libmesautil.la \ 77 -lm \ 78 $(PTHREAD_LIBS) 79 80nodist_EXTRA_spirv2nir_SOURCES = dummy.cpp 81 82check_PROGRAMS += nir/tests/control_flow_tests 83 84nir_tests_control_flow_tests_CPPFLAGS = \ 85 $(AM_CPPFLAGS) \ 86 -I$(top_builddir)/src/compiler/nir \ 87 -I$(top_srcdir)/src/compiler/nir 88 89nir_tests_control_flow_tests_SOURCES = \ 90 nir/tests/control_flow_tests.cpp 91nir_tests_control_flow_tests_CFLAGS = \ 92 $(PTHREAD_CFLAGS) 93nir_tests_control_flow_tests_LDADD = \ 94 $(top_builddir)/src/gtest/libgtest.la \ 95 nir/libnir.la \ 96 $(top_builddir)/src/util/libmesautil.la \ 97 $(PTHREAD_LIBS) 98 99 100TESTS += nir/tests/control_flow_tests 101 102 103BUILT_SOURCES += \ 104 $(NIR_GENERATED_FILES) \ 105 $(SPIRV_GENERATED_FILES) 106 107CLEANFILES += \ 108 $(NIR_GENERATED_FILES) \ 109 $(SPIRV_GENERATED_FILES) 110 111EXTRA_DIST += \ 112 nir/nir_algebraic.py \ 113 nir/nir_builder_opcodes_h.py \ 114 nir/nir_constant_expressions.py \ 115 nir/nir_opcodes.py \ 116 nir/nir_opcodes_c.py \ 117 nir/nir_opcodes_h.py \ 118 nir/nir_opt_algebraic.py \ 119 nir/tests \ 120 nir/README \ 121 spirv/spirv_info_c.py \ 122 spirv/spirv.core.grammar.json \ 123 spirv/vtn_gather_types_c.py \ 124 SConscript.nir 125