vk: Add SKL support
[mesa.git] / src / vulkan / 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 = . tests
23
24 vulkan_includedir = $(includedir)/vulkan
25
26 vulkan_include_HEADERS = \
27 $(top_srcdir)/include/vulkan/vk_platform.h \
28 $(top_srcdir)/include/vulkan/vulkan.h \
29 $(top_srcdir)/include/vulkan/vulkan_intel.h \
30 $(top_srcdir)/include/vulkan/vk_ext_khr_swapchain.h \
31 $(top_srcdir)/include/vulkan/vk_ext_khr_device_swapchain.h
32
33 lib_LTLIBRARIES = libvulkan.la
34
35 check_LTLIBRARIES = libvulkan-test.la
36
37 PER_GEN_LIBS = \
38 libanv-gen7.la \
39 libanv-gen75.la \
40 libanv-gen8.la \
41 libanv-gen9.la
42
43 noinst_LTLIBRARIES = $(PER_GEN_LIBS)
44
45 # The gallium includes are for the util/u_math.h include from main/macros.h
46
47 AM_CPPFLAGS = \
48 $(INTEL_CFLAGS) \
49 $(VALGRIND_CFLAGS) \
50 $(DEFINES) \
51 -I$(top_srcdir)/include \
52 -I$(top_srcdir)/src \
53 -I$(top_srcdir)/src/glsl/nir \
54 -I$(top_srcdir)/src/mapi \
55 -I$(top_srcdir)/src/mesa \
56 -I$(top_srcdir)/src/mesa/drivers/dri/common \
57 -I$(top_srcdir)/src/mesa/drivers/dri/i965 \
58 -I$(top_srcdir)/src/gallium/auxiliary \
59 -I$(top_srcdir)/src/gallium/include \
60 -I$(top_builddir)/src/vulkan
61
62 libvulkan_la_CFLAGS = \
63 -Wall -Wno-unused-parameter -fvisibility=hidden -O0 -g \
64 -Wstrict-prototypes -Wmissing-prototypes -Wno-override-init
65
66 VULKAN_SOURCES = \
67 anv_allocator.c \
68 anv_cmd_buffer.c \
69 anv_batch_chain.c \
70 anv_descriptor_set.c \
71 anv_device.c \
72 anv_dump.c \
73 anv_entrypoints.c \
74 anv_entrypoints.h \
75 anv_formats.c \
76 anv_image.c \
77 anv_intel.c \
78 anv_meta.c \
79 anv_meta_clear.c \
80 anv_nir_apply_dynamic_offsets.c \
81 anv_nir_apply_pipeline_layout.c \
82 anv_nir_lower_push_constants.c \
83 anv_pass.c \
84 anv_pipeline.c \
85 anv_private.h \
86 anv_query.c \
87 anv_util.c \
88 anv_wsi.c \
89 anv_wsi_x11.c \
90 isl.c \
91 isl_format_layout.c
92
93 BUILT_SOURCES = \
94 anv_entrypoints.h \
95 anv_entrypoints.c \
96 isl_format_layout.c
97
98 libanv_gen7_la_SOURCES = \
99 genX_cmd_buffer.c \
100 gen7_cmd_buffer.c \
101 gen7_pipeline.c \
102 gen7_state.c
103 libanv_gen7_la_CFLAGS = $(libvulkan_la_CFLAGS) -DANV_GENx10=70
104
105 libanv_gen75_la_SOURCES = \
106 genX_cmd_buffer.c \
107 gen7_cmd_buffer.c \
108 gen7_pipeline.c \
109 gen7_state.c
110 libanv_gen75_la_CFLAGS = $(libvulkan_la_CFLAGS) -DANV_GENx10=75
111
112 libanv_gen8_la_SOURCES = \
113 genX_cmd_buffer.c \
114 gen8_cmd_buffer.c \
115 gen8_pipeline.c \
116 gen8_state.c
117 libanv_gen8_la_CFLAGS = $(libvulkan_la_CFLAGS) -DANV_GENx10=80
118
119 libanv_gen9_la_SOURCES = \
120 genX_cmd_buffer.c \
121 gen8_cmd_buffer.c \
122 gen8_pipeline.c \
123 gen8_state.c
124 libanv_gen9_la_CFLAGS = $(libvulkan_la_CFLAGS) -DANV_GENx10=90
125
126 if HAVE_EGL_PLATFORM_WAYLAND
127 BUILT_SOURCES += \
128 wayland-drm-protocol.c \
129 wayland-drm-client-protocol.h
130
131 %-protocol.c : $(top_srcdir)/src/egl/wayland/wayland-drm/%.xml
132 $(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
133
134 %-client-protocol.h : $(top_srcdir)/src/egl/wayland/wayland-drm/%.xml
135 $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
136
137 AM_CPPFLAGS += -I$(top_srcdir)/src/egl/wayland/wayland-drm
138 VULKAN_SOURCES += \
139 wayland-drm-protocol.c \
140 anv_wsi_wayland.c
141 libvulkan_la_CFLAGS += -DHAVE_WAYLAND_PLATFORM
142 endif
143
144 libvulkan_la_SOURCES = \
145 $(VULKAN_SOURCES) \
146 anv_gem.c
147
148 anv_entrypoints.h : anv_entrypoints_gen.py $(vulkan_include_HEADERS)
149 $(AM_V_GEN)cat $(vulkan_include_HEADERS) | $(PYTHON2) $< header > $@
150
151 anv_entrypoints.c : anv_entrypoints_gen.py $(vulkan_include_HEADERS)
152 $(AM_V_GEN)cat $(vulkan_include_HEADERS) | $(PYTHON2) $< code > $@
153
154 isl_format_layout.c: isl_format_layout_gen.bash \
155 isl_format_layout.csv
156 $(AM_V_GEN)$(srcdir)/isl_format_layout_gen.bash \
157 <$(srcdir)/isl_format_layout.csv >$@
158
159 CLEANFILES = $(BUILT_SOURCES)
160
161 libvulkan_la_LIBADD = $(WAYLAND_LIBS) -lxcb -lxcb-dri3 \
162 $(top_builddir)/src/mesa/drivers/dri/i965/libi965_compiler.la \
163 ../mesa/libmesa.la \
164 ../mesa/drivers/dri/common/libdri_test_stubs.la \
165 -lpthread -ldl -lstdc++ \
166 $(PER_GEN_LIBS)
167
168 # Libvulkan with dummy gem. Used for unit tests.
169
170 libvulkan_test_la_SOURCES = \
171 $(VULKAN_SOURCES) \
172 anv_gem_stubs.c
173
174 libvulkan_test_la_CFLAGS = $(libvulkan_la_CFLAGS)
175 libvulkan_test_la_LIBADD = $(libvulkan_la_LIBADD)
176
177 include $(top_srcdir)/install-lib-links.mk