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