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
22ISL_GEN_LIBS =                                           \
23	isl/libisl-gen4.la                               \
24	isl/libisl-gen5.la                               \
25	isl/libisl-gen6.la                               \
26	isl/libisl-gen7.la                               \
27	isl/libisl-gen75.la                              \
28	isl/libisl-gen8.la                               \
29	isl/libisl-gen9.la                               \
30	$(NULL)
31
32noinst_LTLIBRARIES += $(ISL_GEN_LIBS) isl/libisl.la
33
34isl_libisl_la_LIBADD = $(ISL_GEN_LIBS)
35isl_libisl_la_SOURCES = $(ISL_FILES) $(ISL_GENERATED_FILES)
36
37isl_libisl_gen4_la_SOURCES = $(ISL_GEN4_FILES)
38isl_libisl_gen4_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=40
39
40isl_libisl_gen5_la_SOURCES = $(ISL_GEN5_FILES)
41isl_libisl_gen5_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=50
42
43isl_libisl_gen6_la_SOURCES = $(ISL_GEN6_FILES)
44isl_libisl_gen6_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=60
45
46isl_libisl_gen7_la_SOURCES = $(ISL_GEN7_FILES)
47isl_libisl_gen7_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=70
48
49isl_libisl_gen75_la_SOURCES = $(ISL_GEN75_FILES)
50isl_libisl_gen75_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=75
51
52isl_libisl_gen8_la_SOURCES = $(ISL_GEN8_FILES)
53isl_libisl_gen8_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=80
54
55isl_libisl_gen9_la_SOURCES = $(ISL_GEN9_FILES)
56isl_libisl_gen9_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=90
57
58BUILT_SOURCES += $(ISL_GENERATED_FILES)
59
60isl/isl_format_layout.c: isl/gen_format_layout.py \
61                         isl/isl_format_layout.csv
62	$(MKDIR_GEN)
63	$(PYTHON_GEN) $(srcdir)/isl/gen_format_layout.py \
64	    --csv $(srcdir)/isl/isl_format_layout.csv --out $@
65
66# ----------------------------------------------------------------------------
67#  Tests
68# ----------------------------------------------------------------------------
69
70check_PROGRAMS += isl/tests/isl_surf_get_image_offset_test
71
72TESTS += $(check_PROGRAMS)
73
74isl_tests_isl_surf_get_image_offset_test_LDADD = \
75	common/libintel_common.la \
76	isl/libisl.la \
77	$(top_builddir)/src/mesa/drivers/dri/i965/libi965_compiler.la \
78	-lm
79
80# ----------------------------------------------------------------------------
81
82EXTRA_DIST += \
83	isl/gen_format_layout.py \
84	isl/isl_format_layout.csv \
85	isl/README
86