1 # Copyright (C) 2015 Intel Corporation. All Rights Reserved.
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:
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
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
22 include Makefile.sources
23 include $(top_srcdir)/src/gallium/Automake.inc
25 AM_CXXFLAGS = $(GALLIUM_DRIVER_CFLAGS) $(SWR_CXX11_CXXFLAGS)
27 noinst_LTLIBRARIES = libmesaswr.la
29 libmesaswr_la_SOURCES = $(LOADER_SOURCES)
32 -fno-strict-aliasing \
33 $(GALLIUM_DRIVER_CFLAGS) \
35 $(SWR_CXX11_CXXFLAGS) \
36 -I$(builddir)/rasterizer/scripts \
37 -I$(builddir)/rasterizer/jitter \
38 -I$(builddir)/rasterizer/archrast \
39 -I$(srcdir)/rasterizer \
40 -I$(srcdir)/rasterizer/core \
41 -I$(srcdir)/rasterizer/scripts \
42 -I$(srcdir)/rasterizer/jitter \
43 -I$(srcdir)/rasterizer/archrast
47 $(ARCHRAST_CXX_SOURCES) \
48 $(COMMON_CXX_SOURCES) \
50 $(JITTER_CXX_SOURCES) \
51 $(MEMORY_CXX_SOURCES) \
56 rasterizer/scripts/gen_knobs.cpp \
57 rasterizer/scripts/gen_knobs.h \
58 rasterizer/jitter/state_llvm.h \
59 rasterizer/jitter/builder_x86.h \
60 rasterizer/jitter/builder_x86.cpp \
61 rasterizer/archrast/gen_ar_event.h \
62 rasterizer/archrast/gen_ar_event.cpp \
63 rasterizer/archrast/gen_ar_eventhandler.h \
64 rasterizer/archrast/gen_ar_eventhandlerfile.h
66 MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
67 PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
68 swr_context_llvm.h: rasterizer/jitter/scripts/gen_llvm_types.py swr_context.h
70 $(srcdir)/rasterizer/jitter/scripts/gen_llvm_types.py \
71 --input $(srcdir)/swr_context.h \
72 --output swr_context_llvm.h
74 rasterizer/scripts/gen_knobs.cpp: rasterizer/scripts/gen_knobs.py rasterizer/scripts/knob_defs.py rasterizer/scripts/templates/knobs.template
77 $(srcdir)/rasterizer/scripts/gen_knobs.py \
78 --input $(srcdir)/rasterizer/scripts/templates/knobs.template \
79 --output rasterizer/scripts/gen_knobs.cpp \
82 rasterizer/scripts/gen_knobs.h: rasterizer/scripts/gen_knobs.py rasterizer/scripts/knob_defs.py rasterizer/scripts/templates/knobs.template
85 $(srcdir)/rasterizer/scripts/gen_knobs.py \
86 --input $(srcdir)/rasterizer/scripts/templates/knobs.template \
87 --output rasterizer/scripts/gen_knobs.h \
90 rasterizer/jitter/state_llvm.h: rasterizer/jitter/scripts/gen_llvm_types.py rasterizer/core/state.h
93 $(srcdir)/rasterizer/jitter/scripts/gen_llvm_types.py \
94 --input $(srcdir)/rasterizer/core/state.h \
95 --output rasterizer/jitter/state_llvm.h
97 rasterizer/jitter/builder_gen.h: rasterizer/jitter/scripts/gen_llvm_ir_macros.py
100 $(srcdir)/rasterizer/jitter/scripts/gen_llvm_ir_macros.py \
101 --input $(LLVM_INCLUDEDIR)/llvm/IR/IRBuilder.h \
102 --output rasterizer/jitter/builder_gen.h \
105 rasterizer/jitter/builder_gen.cpp: rasterizer/jitter/scripts/gen_llvm_ir_macros.py
108 $(srcdir)/rasterizer/jitter/scripts/gen_llvm_ir_macros.py \
109 --input $(LLVM_INCLUDEDIR)/llvm/IR/IRBuilder.h \
110 --output rasterizer/jitter/builder_gen.cpp \
113 rasterizer/jitter/builder_x86.h: rasterizer/jitter/scripts/gen_llvm_ir_macros.py
116 $(srcdir)/rasterizer/jitter/scripts/gen_llvm_ir_macros.py \
117 --output rasterizer/jitter/builder_x86.h \
120 rasterizer/jitter/builder_x86.cpp: rasterizer/jitter/scripts/gen_llvm_ir_macros.py
123 $(srcdir)/rasterizer/jitter/scripts/gen_llvm_ir_macros.py \
124 --output rasterizer/jitter/builder_x86.cpp \
127 rasterizer/archrast/gen_ar_event.h: rasterizer/scripts/gen_archrast.py rasterizer/scripts/templates/ar_event_h.template rasterizer/archrast/events.proto
130 $(srcdir)/rasterizer/scripts/gen_archrast.py \
131 --proto $(srcdir)/rasterizer/archrast/events.proto \
132 --output rasterizer/archrast/gen_ar_event.h \
135 rasterizer/archrast/gen_ar_event.cpp: rasterizer/scripts/gen_archrast.py rasterizer/scripts/templates/ar_event_cpp.template rasterizer/archrast/events.proto
138 $(srcdir)/rasterizer/scripts/gen_archrast.py \
139 --proto $(srcdir)/rasterizer/archrast/events.proto \
140 --output rasterizer/archrast/gen_ar_event.cpp \
143 rasterizer/archrast/gen_ar_eventhandler.h: rasterizer/scripts/gen_archrast.py rasterizer/scripts/templates/ar_eventhandler_h.template rasterizer/archrast/events.proto
146 $(srcdir)/rasterizer/scripts/gen_archrast.py \
147 --proto $(srcdir)/rasterizer/archrast/events.proto \
148 --output rasterizer/archrast/gen_ar_eventhandler.h \
151 rasterizer/archrast/gen_ar_eventhandlerfile.h: rasterizer/scripts/gen_archrast.py rasterizer/scripts/templates/ar_eventhandlerfile_h.template rasterizer/archrast/events.proto
154 $(srcdir)/rasterizer/scripts/gen_archrast.py \
155 --proto $(srcdir)/rasterizer/archrast/events.proto \
156 --output rasterizer/archrast/gen_ar_eventhandlerfile.h \
157 --gen_eventhandlerfile_h
160 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
161 $(top_builddir)/src/mesa/libmesagallium.la \
173 # XXX: As we cannot use BUILT_SOURCES (the files will end up in the dist
174 # tarball) just annotate the dependency directly.
175 # As the single direct user of builder_gen.h is a header (builder.h) trace all
176 # the translusive users (one that use the latter header).
177 rasterizer/jitter/blend_jit.cpp: rasterizer/jitter/builder_gen.h
178 rasterizer/jitter/builder.cpp: rasterizer/jitter/builder_gen.h
179 rasterizer/jitter/builder_gen.cpp: rasterizer/jitter/builder_gen.h
180 rasterizer/jitter/builder_x86.cpp: rasterizer/jitter/builder_gen.h
181 rasterizer/jitter/builder_misc.cpp: rasterizer/jitter/builder_gen.h
182 rasterizer/jitter/fetch_jit.cpp: rasterizer/jitter/builder_gen.h
183 rasterizer/jitter/streamout_jit.cpp: rasterizer/jitter/builder_gen.h
184 swr_shader.cpp: rasterizer/jitter/builder_gen.h
187 rasterizer/jitter/builder_gen.h \
188 rasterizer/jitter/builder_gen.cpp
190 # XXX: Due to the funky dependencies above, the builder_x86.cpp file gets
191 # generated (copied) into builddir when building from release tarball.
192 # Add a temporary workaround to remove it, until the above issue is resolved.
194 ( test $(top_srcdir) != $(top_builddir) && \
195 rm $(builddir)/rasterizer/jitter/builder_x86.cpp ) || true
197 lib_LTLIBRARIES = libswrAVX.la libswrAVX2.la
199 libswrAVX_la_CXXFLAGS = \
200 $(SWR_AVX_CXXFLAGS) \
201 -DKNOB_ARCH=KNOB_ARCH_AVX \
204 libswrAVX_la_SOURCES = \
207 # XXX: Don't ship these generated sources for now, since they are specific
208 # to the LLVM version they are generated from. Thus a release tarball
209 # containing the said files, generated against eg. LLVM 3.8 will fail to build
210 # on systems with other versions of LLVM eg. 3.7 or 3.6.
211 # Move these back to BUILT_SOURCES once that is resolved.
212 nodist_libswrAVX_la_SOURCES = \
213 rasterizer/jitter/builder_gen.h \
214 rasterizer/jitter/builder_gen.cpp
216 libswrAVX_la_LIBADD = \
219 libswrAVX_la_LDFLAGS = \
222 libswrAVX2_la_CXXFLAGS = \
223 $(SWR_AVX2_CXXFLAGS) \
224 -DKNOB_ARCH=KNOB_ARCH_AVX2 \
227 libswrAVX2_la_SOURCES = \
230 # XXX: Don't ship these generated sources for now, since they are specific
231 # to the LLVM version they are generated from. Thus a release tarball
232 # containing the said files, generated against eg. LLVM 3.8 will fail to build
233 # on systems with other versions of LLVM eg. 3.7 or 3.6.
234 # Move these back to BUILT_SOURCES once that is resolved.
235 nodist_libswrAVX2_la_SOURCES = \
236 rasterizer/jitter/builder_gen.h \
237 rasterizer/jitter/builder_gen.cpp
239 libswrAVX2_la_LIBADD = \
242 libswrAVX2_la_LDFLAGS = \
245 include $(top_srcdir)/install-gallium-links.mk
248 rasterizer/archrast/events.proto \
249 rasterizer/jitter/scripts/gen_llvm_ir_macros.py \
250 rasterizer/jitter/scripts/gen_llvm_types.py \
251 rasterizer/scripts/gen_archrast.py \
252 rasterizer/scripts/gen_knobs.py \
253 rasterizer/scripts/knob_defs.py \
254 rasterizer/scripts/mako/ast.py \
255 rasterizer/scripts/mako/_ast_util.py \
256 rasterizer/scripts/mako/cache.py \
257 rasterizer/scripts/mako/cmd.py \
258 rasterizer/scripts/mako/codegen.py \
259 rasterizer/scripts/mako/compat.py \
260 rasterizer/scripts/mako/exceptions.py \
261 rasterizer/scripts/mako/filters.py \
262 rasterizer/scripts/mako/__init__.py \
263 rasterizer/scripts/mako/lexer.py \
264 rasterizer/scripts/mako/lookup.py \
265 rasterizer/scripts/mako/parsetree.py \
266 rasterizer/scripts/mako/pygen.py \
267 rasterizer/scripts/mako/pyparser.py \
268 rasterizer/scripts/mako/runtime.py \
269 rasterizer/scripts/mako/template.py \
270 rasterizer/scripts/mako/util.py \
271 rasterizer/scripts/templates/knobs.template \
272 rasterizer/scripts/templates/ar_event_h.template \
273 rasterizer/scripts/templates/ar_event_cpp.template \
274 rasterizer/scripts/templates/ar_eventhandler_h.template \
275 rasterizer/scripts/templates/ar_eventhandlerfile_h.template