d1f91a78e0204a837ee932c14c498f37f2ef539f
[mesa.git] / src / intel / isl / Makefile.am
1 # Copyright 2015 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 SUBDIRS = .
23
24
25 ISL_GEN_LIBS = \
26 libisl-gen7.la \
27 libisl-gen75.la \
28 libisl-gen8.la \
29 libisl-gen9.la \
30 $(NULL)
31
32 noinst_LTLIBRARIES = $(ISL_GEN_LIBS) libisl.la
33
34 EXTRA_DIST = tests
35
36 # The gallium includes are for the util/u_math.h include from main/macros.h
37 AM_CPPFLAGS = \
38 $(INTEL_CFLAGS) \
39 $(VALGRIND_CFLAGS) \
40 $(DEFINES) \
41 -I$(top_srcdir)/include \
42 -I$(top_srcdir)/src \
43 -I$(top_srcdir)/src/intel \
44 -I$(top_srcdir)/src/mapi \
45 -I$(top_srcdir)/src/mesa \
46 -I$(top_srcdir)/src/mesa/drivers/dri/common \
47 -I$(top_srcdir)/src/mesa/drivers/dri/i965 \
48 -I$(top_srcdir)/src/gallium/auxiliary \
49 -I$(top_srcdir)/src/gallium/include \
50 -I$(top_builddir)/src \
51 -I$(top_builddir)/src/intel
52
53 libisl_la_CFLAGS = $(CFLAGS) -Wno-override-init
54
55 libisl_la_LIBADD = $(ISL_GEN_LIBS)
56
57 libisl_la_SOURCES = \
58 isl.c \
59 isl.h \
60 isl_format.c \
61 isl_format_layout.c \
62 isl_gen4.c \
63 isl_gen4.h \
64 isl_gen6.c \
65 isl_gen6.h \
66 isl_priv.h \
67 isl_storage_image.c \
68 $(NULL)
69
70 libisl_gen7_la_SOURCES = \
71 isl_gen7.c \
72 isl_gen7.h \
73 isl_surface_state.c \
74 $(NULL)
75 libisl_gen7_la_CFLAGS = $(libisl_la_CFLAGS) -DGEN_VERSIONx10=70
76
77 libisl_gen75_la_SOURCES = \
78 isl_surface_state.c \
79 $(NULL)
80 libisl_gen75_la_CFLAGS = $(libisl_la_CFLAGS) -DGEN_VERSIONx10=75
81
82 libisl_gen8_la_SOURCES = \
83 isl_gen8.c \
84 isl_gen8.h \
85 isl_surface_state.c \
86 $(NULL)
87 libisl_gen8_la_CFLAGS = $(libisl_la_CFLAGS) -DGEN_VERSIONx10=80
88
89 libisl_gen9_la_SOURCES = \
90 isl_gen9.c \
91 isl_gen9.h \
92 isl_surface_state.c \
93 $(NULL)
94 libisl_gen9_la_CFLAGS = $(libisl_la_CFLAGS) -DGEN_VERSIONx10=90
95
96 BUILT_SOURCES = \
97 isl_format_layout.c
98
99 isl_format_layout.c: isl_format_layout_gen.bash \
100 isl_format_layout.csv
101 $(AM_V_GEN)$(srcdir)/isl_format_layout_gen.bash \
102 <$(srcdir)/isl_format_layout.csv >$@
103
104 # ----------------------------------------------------------------------------
105 # Tests
106 # ----------------------------------------------------------------------------
107
108 TESTS = tests/isl_surf_get_image_offset_test
109
110 check_PROGRAMS = $(TESTS)
111
112 # Link tests to lib965_compiler.la for brw_get_device_info().
113 tests_ldadd = \
114 libisl.la \
115 $(top_builddir)/src/mesa/drivers/dri/i965/libi965_compiler.la \
116 -lm
117
118 tests_isl_surf_get_image_offset_test_SOURCES = \
119 tests/isl_surf_get_image_offset_test.c
120 tests_isl_surf_get_image_offset_test_LDADD = $(tests_ldadd)
121
122 # ----------------------------------------------------------------------------
123
124 include $(top_srcdir)/install-lib-links.mk
125
126 EXTRA_DIST = \
127 isl_format_layout_gen.bash \
128 isl_format_layout.csv \
129 README