i965: Move the back-end compiler to src/intel/compiler
[mesa.git] / src / intel / Makefile.compiler.am
1 # Copyright 2015-2016 Intel Corporation
2 #
3 # Permission is hereby granted, free of charge, to any person obtaining a
4 # copy of this software and associated documentation files (the "Software"),
5 # to deal in the Software without restriction, including without limitation
6 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 # and/or sell copies of the Software, and to permit persons to whom the
8 # Software is furnished to do so, subject to the following conditions:
9 #
10 # The above copyright notice and this permission notice (including the next
11 # paragraph) shall be included in all copies or substantial portions of the
12 # Software.
13 #
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 # IN THE SOFTWARE.
21
22 noinst_LTLIBRARIES += compiler/libintel_compiler.la
23
24 compiler_libintel_compiler_la_CPPFLAGS = \
25 -I$(top_builddir)/src/intel/compiler \
26 -I$(top_srcdir)/src/intel/compiler \
27 $(AM_CPPFLAGS)
28
29 compiler_libintel_compiler_la_SOURCES = \
30 $(COMPILER_FILES) \
31 $(COMPILER_GENERATED_FILES)
32
33 BUILT_SOURCES += $(COMPILER_GENERATED_FILES)
34
35 compiler/brw_nir_trig_workarounds.c: compiler/brw_nir_trig_workarounds.py \
36 $(top_srcdir)/src/compiler/nir/nir_algebraic.py
37 $(MKDIR_GEN)
38 $(AM_V_GEN) PYTHONPATH=$(top_srcdir)/src/compiler/nir $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/compiler/brw_nir_trig_workarounds.py > $@ || ($(RM) $@; false)
39
40 EXTRA_DIST += \
41 compiler/brw_nir_trig_workarounds.py
42
43 # ----------------------------------------------------------------------------
44 # Tests
45 # ----------------------------------------------------------------------------
46
47 TEST_LIBS = \
48 compiler/libintel_compiler.la \
49 common/libintel_common.la \
50 $(top_builddir)/src/compiler/nir/libnir.la \
51 $(top_builddir)/src/util/libmesautil.la \
52 $(top_builddir)/src/intel/isl/libisl.la \
53 $(PTHREAD_LIBS) \
54 $(DLOPEN_LIBS)
55
56 COMPILER_TESTS = \
57 compiler/test_fs_cmod_propagation \
58 compiler/test_fs_copy_propagation \
59 compiler/test_fs_saturate_propagation \
60 compiler/test_eu_compact \
61 compiler/test_eu_validate \
62 compiler/test_vf_float_conversions \
63 compiler/test_vec4_cmod_propagation \
64 compiler/test_vec4_copy_propagation \
65 compiler/test_vec4_register_coalesce
66
67 TESTS += $(COMPILER_TESTS)
68 check_PROGRAMS += $(COMPILER_TESTS)
69
70 compiler_test_fs_cmod_propagation_SOURCES = \
71 compiler/test_fs_cmod_propagation.cpp
72 compiler_test_fs_cmod_propagation_LDADD = \
73 $(top_builddir)/src/gtest/libgtest.la \
74 $(TEST_LIBS)
75
76 compiler_test_fs_copy_propagation_SOURCES = \
77 compiler/test_fs_copy_propagation.cpp
78 compiler_test_fs_copy_propagation_LDADD = \
79 $(top_builddir)/src/gtest/libgtest.la \
80 $(TEST_LIBS)
81
82 compiler_test_fs_saturate_propagation_SOURCES = \
83 compiler/test_fs_saturate_propagation.cpp
84 compiler_test_fs_saturate_propagation_LDADD = \
85 $(top_builddir)/src/gtest/libgtest.la \
86 $(TEST_LIBS)
87
88 compiler_test_vf_float_conversions_SOURCES = \
89 compiler/test_vf_float_conversions.cpp
90 compiler_test_vf_float_conversions_LDADD = \
91 $(top_builddir)/src/gtest/libgtest.la \
92 $(TEST_LIBS)
93
94 compiler_test_vec4_register_coalesce_SOURCES = \
95 compiler/test_vec4_register_coalesce.cpp
96 compiler_test_vec4_register_coalesce_LDADD = \
97 $(top_builddir)/src/gtest/libgtest.la \
98 $(TEST_LIBS)
99
100 compiler_test_vec4_copy_propagation_SOURCES = \
101 compiler/test_vec4_copy_propagation.cpp
102 compiler_test_vec4_copy_propagation_LDADD = \
103 $(top_builddir)/src/gtest/libgtest.la \
104 $(TEST_LIBS)
105
106 compiler_test_vec4_cmod_propagation_SOURCES = \
107 compiler/test_vec4_cmod_propagation.cpp
108 compiler_test_vec4_cmod_propagation_LDADD = \
109 $(top_builddir)/src/gtest/libgtest.la \
110 $(TEST_LIBS)
111
112 compiler_test_eu_compact_SOURCES = \
113 compiler/test_eu_compact.c
114 nodist_EXTRA_compiler_test_eu_compact_SOURCES = dummy.cpp
115 compiler_test_eu_compact_LDADD = $(TEST_LIBS)
116
117 compiler_test_eu_validate_SOURCES = \
118 compiler/test_eu_validate.cpp
119 compiler_test_eu_validate_LDADD = \
120 $(top_builddir)/src/gtest/libgtest.la \
121 $(TEST_LIBS)