2 # Copyright (C) 2015 Intel Corporation
4 # Permission is hereby granted, free of charge, to any person obtaining a
5 # copy of this software and associated documentation files (the "Software"),
6 # to deal in the Software without restriction, including without limitation
7 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 # and/or sell copies of the Software, and to permit persons to whom the
9 # Software is furnished to do so, subject to the following conditions:
11 # The above copyright notice and this permission notice (including the next
12 # paragraph) shall be included in all copies or substantial portions of the
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
23 include Makefile.sources
26 -I$(top_srcdir)/include \
28 -I$(top_srcdir)/src/mapi \
29 -I$(top_srcdir)/src/mesa/ \
30 -I$(top_srcdir)/src/gallium/include \
31 -I$(top_srcdir)/src/gallium/auxiliary \
32 -I$(top_srcdir)/src/gtest/include \
36 $(VISIBILITY_CFLAGS) \
37 $(MSVC2013_COMPAT_CFLAGS)
40 $(VISIBILITY_CXXFLAGS) \
41 $(MSVC2013_COMPAT_CXXFLAGS)
43 noinst_LTLIBRARIES = libcompiler.la
45 libcompiler_la_SOURCES = $(LIBCOMPILER_FILES)
51 EXTRA_DIST = SConscript
54 noinst_LTLIBRARIES += nir/libnir.la
56 nir_libnir_la_CPPFLAGS = \
58 -I$(top_builddir)/src/compiler/nir \
59 -I$(top_srcdir)/src/compiler/nir
61 nir_libnir_la_LIBADD = \
64 nir_libnir_la_SOURCES = \
66 $(NIR_GENERATED_FILES)
68 PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
70 nir/nir_builder_opcodes.h: nir/nir_opcodes.py nir/nir_builder_opcodes_h.py
72 $(PYTHON_GEN) $(srcdir)/nir/nir_builder_opcodes_h.py > $@ || ($(RM) $@; false)
74 nir/nir_constant_expressions.c: nir/nir_opcodes.py nir/nir_constant_expressions.py
76 $(PYTHON_GEN) $(srcdir)/nir/nir_constant_expressions.py > $@ || ($(RM) $@; false)
78 nir/nir_opcodes.h: nir/nir_opcodes.py nir/nir_opcodes_h.py
80 $(PYTHON_GEN) $(srcdir)/nir/nir_opcodes_h.py > $@ || ($(RM) $@; false)
82 nir/nir_opcodes.c: nir/nir_opcodes.py nir/nir_opcodes_c.py
84 $(PYTHON_GEN) $(srcdir)/nir/nir_opcodes_c.py > $@ || ($(RM) $@; false)
86 nir/nir_opt_algebraic.c: nir/nir_opt_algebraic.py nir/nir_algebraic.py
88 $(PYTHON_GEN) $(srcdir)/nir/nir_opt_algebraic.py > $@ || ($(RM) $@; false)
91 check_PROGRAMS += nir/tests/control_flow_tests
93 nir_tests_control_flow_tests_CPPFLAGS = \
95 -I$(top_builddir)/src/compiler/nir \
96 -I$(top_srcdir)/src/compiler/nir
98 nir_tests_control_flow_tests_SOURCES = \
99 nir/tests/control_flow_tests.cpp
100 nir_tests_control_flow_tests_CFLAGS = \
102 nir_tests_control_flow_tests_LDADD = \
103 $(top_builddir)/src/gtest/libgtest.la \
104 $(top_builddir)/src/compiler/nir/libnir.la \
105 $(top_builddir)/src/util/libmesautil.la \
109 TESTS += nir/tests/control_flow_tests
112 BUILT_SOURCES += $(NIR_GENERATED_FILES)
113 CLEANFILES += $(NIR_GENERATED_FILES)
116 nir/nir_algebraic.py \
117 nir/nir_builder_opcodes_h.py \
118 nir/nir_constant_expressions.py \
120 nir/nir_opcodes_c.py \
121 nir/nir_opcodes_h.py \
122 nir/nir_opt_algebraic.py \