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