Merge remote-tracking branch 'public/master' into vulkan
[mesa.git] / src / compiler / Makefile.nir.am
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_CPPFLAGS = \
27 $(AM_CPPFLAGS) \
28 -I$(top_builddir)/src/compiler/nir \
29 -I$(top_srcdir)/src/compiler/nir
30
31 nir_libnir_la_LIBADD = \
32 libcompiler.la
33
34 nir_libnir_la_SOURCES = \
35 $(NIR_FILES) \
36 $(SPIRV_FILES) \
37 $(NIR_GENERATED_FILES)
38
39 PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
40
41 nir/nir_builder_opcodes.h: nir/nir_opcodes.py nir/nir_builder_opcodes_h.py
42 $(MKDIR_GEN)
43 $(PYTHON_GEN) $(srcdir)/nir/nir_builder_opcodes_h.py > $@ || ($(RM) $@; false)
44
45 nir/nir_constant_expressions.c: nir/nir_opcodes.py nir/nir_constant_expressions.py
46 $(MKDIR_GEN)
47 $(PYTHON_GEN) $(srcdir)/nir/nir_constant_expressions.py > $@ || ($(RM) $@; false)
48
49 nir/nir_opcodes.h: nir/nir_opcodes.py nir/nir_opcodes_h.py
50 $(MKDIR_GEN)
51 $(PYTHON_GEN) $(srcdir)/nir/nir_opcodes_h.py > $@ || ($(RM) $@; false)
52
53 nir/nir_opcodes.c: nir/nir_opcodes.py nir/nir_opcodes_c.py
54 $(MKDIR_GEN)
55 $(PYTHON_GEN) $(srcdir)/nir/nir_opcodes_c.py > $@ || ($(RM) $@; false)
56
57 nir/nir_opt_algebraic.c: nir/nir_opt_algebraic.py nir/nir_algebraic.py
58 $(MKDIR_GEN)
59 $(PYTHON_GEN) $(srcdir)/nir/nir_opt_algebraic.py > $@ || ($(RM) $@; false)
60
61
62 check_PROGRAMS += nir/tests/control_flow_tests
63
64 nir_tests_control_flow_tests_CPPFLAGS = \
65 $(AM_CPPFLAGS) \
66 -I$(top_builddir)/src/compiler/nir \
67 -I$(top_srcdir)/src/compiler/nir
68
69 nir_tests_control_flow_tests_SOURCES = \
70 nir/tests/control_flow_tests.cpp
71 nir_tests_control_flow_tests_CFLAGS = \
72 $(PTHREAD_CFLAGS)
73 nir_tests_control_flow_tests_LDADD = \
74 $(top_builddir)/src/gtest/libgtest.la \
75 nir/libnir.la \
76 $(top_builddir)/src/util/libmesautil.la \
77 $(PTHREAD_LIBS)
78
79
80 TESTS += nir/tests/control_flow_tests
81
82
83 BUILT_SOURCES += $(NIR_GENERATED_FILES)
84 CLEANFILES += $(NIR_GENERATED_FILES)
85
86 EXTRA_DIST += \
87 nir/nir_algebraic.py \
88 nir/nir_builder_opcodes_h.py \
89 nir/nir_constant_expressions.py \
90 nir/nir_opcodes.py \
91 nir/nir_opcodes_c.py \
92 nir/nir_opcodes_h.py \
93 nir/nir_opt_algebraic.py \
94 nir/tests