1e3778df8d563d37d9cef4caa299ea08e17c6abd
[mesa.git] / src / compiler / Makefile.am
1 #
2 # Copyright (C) 2015 Intel Corporation
3 #
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:
10 #
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
13 # Software.
14 #
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
21 # IN THE SOFTWARE.
22
23 include Makefile.sources
24
25 AM_CPPFLAGS = \
26 -I$(top_srcdir)/include \
27 -I$(top_srcdir)/src \
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 \
33 $(DEFINES)
34
35 AM_CFLAGS = \
36 $(VISIBILITY_CFLAGS) \
37 $(MSVC2013_COMPAT_CFLAGS)
38
39 AM_CXXFLAGS = \
40 $(VISIBILITY_CXXFLAGS) \
41 $(MSVC2013_COMPAT_CXXFLAGS)
42
43 noinst_LTLIBRARIES = libcompiler.la
44
45 libcompiler_la_SOURCES = $(LIBCOMPILER_FILES)
46
47 check_PROGRAMS =
48 TESTS =
49 BUILT_SOURCES =
50 CLEANFILES =
51 EXTRA_DIST = SConscript
52
53
54 noinst_LTLIBRARIES += nir/libnir.la
55
56 nir_libnir_la_CPPFLAGS = \
57 $(AM_CPPFLAGS) \
58 -I$(top_builddir)/src/compiler/nir \
59 -I$(top_srcdir)/src/compiler/nir
60
61 nir_libnir_la_LIBADD = \
62 libcompiler.la
63
64 nir_libnir_la_SOURCES = \
65 $(NIR_FILES) \
66 $(NIR_GENERATED_FILES)
67
68 PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
69
70 nir/nir_builder_opcodes.h: nir/nir_opcodes.py nir/nir_builder_opcodes_h.py
71 $(MKDIR_GEN)
72 $(PYTHON_GEN) $(srcdir)/nir/nir_builder_opcodes_h.py > $@ || ($(RM) $@; false)
73
74 nir/nir_constant_expressions.c: nir/nir_opcodes.py nir/nir_constant_expressions.py
75 $(MKDIR_GEN)
76 $(PYTHON_GEN) $(srcdir)/nir/nir_constant_expressions.py > $@ || ($(RM) $@; false)
77
78 nir/nir_opcodes.h: nir/nir_opcodes.py nir/nir_opcodes_h.py
79 $(MKDIR_GEN)
80 $(PYTHON_GEN) $(srcdir)/nir/nir_opcodes_h.py > $@ || ($(RM) $@; false)
81
82 nir/nir_opcodes.c: nir/nir_opcodes.py nir/nir_opcodes_c.py
83 $(MKDIR_GEN)
84 $(PYTHON_GEN) $(srcdir)/nir/nir_opcodes_c.py > $@ || ($(RM) $@; false)
85
86 nir/nir_opt_algebraic.c: nir/nir_opt_algebraic.py nir/nir_algebraic.py
87 $(MKDIR_GEN)
88 $(PYTHON_GEN) $(srcdir)/nir/nir_opt_algebraic.py > $@ || ($(RM) $@; false)
89
90
91 check_PROGRAMS += nir/tests/control_flow_tests
92
93 nir_tests_control_flow_tests_CPPFLAGS = \
94 $(AM_CPPFLAGS) \
95 -I$(top_builddir)/src/compiler/nir \
96 -I$(top_srcdir)/src/compiler/nir
97
98 nir_tests_control_flow_tests_SOURCES = \
99 nir/tests/control_flow_tests.cpp
100 nir_tests_control_flow_tests_CFLAGS = \
101 $(PTHREAD_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 \
106 $(PTHREAD_LIBS)
107
108
109 TESTS += nir/tests/control_flow_tests
110
111
112 BUILT_SOURCES += $(NIR_GENERATED_FILES)
113 CLEANFILES += $(NIR_GENERATED_FILES)
114
115 EXTRA_DIST += \
116 nir/nir_algebraic.py \
117 nir/nir_builder_opcodes_h.py \
118 nir/nir_constant_expressions.py \
119 nir/nir_opcodes.py \
120 nir/nir_opcodes_c.py \
121 nir/nir_opcodes_h.py \
122 nir/nir_opt_algebraic.py \
123 nir/tests \
124 nir/Makefile.sources