1 # Copyright © 2015 Intel Corporation
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
24 vulkan_includedir = $(includedir)/vulkan
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
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
37 lib_LTLIBRARIES = libvulkan_intel.la
39 check_LTLIBRARIES = libvulkan-test.la
47 noinst_LTLIBRARIES = $(PER_GEN_LIBS)
49 # The gallium includes are for the util/u_math.h include from main/macros.h
55 -I$(top_srcdir)/include \
57 -I$(top_srcdir)/src/compiler \
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_srcdir)/src/intel/ \
65 -I$(top_builddir)/src \
66 -I$(top_builddir)/src/compiler \
67 -I$(top_builddir)/src/compiler/nir \
68 -I$(top_builddir)/src/intel
70 libvulkan_intel_la_CFLAGS = $(CFLAGS) -Wno-override-init
76 anv_descriptor_set.c \
90 anv_nir_apply_dynamic_offsets.c \
91 anv_nir_apply_pipeline_layout.c \
92 anv_nir_lower_push_constants.c \
95 anv_pipeline_cache.c \
106 libanv_gen7_la_SOURCES = \
112 libanv_gen7_la_CFLAGS = $(libvulkan_intel_la_CFLAGS) -DGEN_VERSIONx10=70
114 libanv_gen75_la_SOURCES = \
120 libanv_gen75_la_CFLAGS = $(libvulkan_intel_la_CFLAGS) -DGEN_VERSIONx10=75
122 libanv_gen8_la_SOURCES = \
128 libanv_gen8_la_CFLAGS = $(libvulkan_intel_la_CFLAGS) -DGEN_VERSIONx10=80
130 libanv_gen9_la_SOURCES = \
136 libanv_gen9_la_CFLAGS = $(libvulkan_intel_la_CFLAGS) -DGEN_VERSIONx10=90
138 if HAVE_EGL_PLATFORM_WAYLAND
140 wayland-drm-protocol.c \
141 wayland-drm-client-protocol.h
143 %-protocol.c : $(top_srcdir)/src/egl/wayland/wayland-drm/%.xml
144 $(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
146 %-client-protocol.h : $(top_srcdir)/src/egl/wayland/wayland-drm/%.xml
147 $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
149 AM_CPPFLAGS += -I$(top_srcdir)/src/egl/wayland/wayland-drm
151 wayland-drm-protocol.c \
153 libvulkan_intel_la_CFLAGS += -DHAVE_WAYLAND_PLATFORM
156 libvulkan_intel_la_SOURCES = \
160 anv_entrypoints.h : anv_entrypoints_gen.py $(vulkan_include_HEADERS)
161 $(AM_V_GEN) cat $(vulkan_include_HEADERS) | $(CPP) $(VULKAN_ENTRYPOINT_CPPFLAGS) - | $(PYTHON2) $< header > $@
163 anv_entrypoints.c : anv_entrypoints_gen.py $(vulkan_include_HEADERS)
164 $(AM_V_GEN) cat $(vulkan_include_HEADERS) | $(CPP) $(VULKAN_ENTRYPOINT_CPPFLAGS) - | $(PYTHON2) $< code > $@
166 CLEANFILES = $(BUILT_SOURCES)
168 libvulkan_intel_la_LIBADD = $(WAYLAND_LIBS) \
169 -lxcb -lxcb-dri3 -lxcb-present -lxcb-sync -lxshmfence \
170 $(top_builddir)/src/intel/isl/libisl.la \
171 $(top_builddir)/src/mesa/drivers/dri/i965/libi965_compiler.la \
172 $(top_builddir)/src/mesa/libmesa.la \
173 $(top_builddir)/src/mesa/drivers/dri/common/libdri_test_stubs.la \
174 -lpthread -ldl -lstdc++ \
177 libvulkan_intel_la_LDFLAGS = \
178 -module -avoid-version -shared -shrext .so
181 # Generate icd files. It would be nice to just be able to add these to
182 # AC_CONFIG_FILES, but @libdir@ typically expands to '${exec_prefix}/lib64',
183 # which we can't put in the icd file. When running sed from the Makefile we
184 # can use ${libdir}, which expands completely and we avoid putting Makefile
185 # variables in the icd file.
187 icdconfdir=$(sysconfdir)/vulkan/icd.d
188 icdconf_DATA = intel_icd.json
189 noinst_DATA = dev_icd.json
193 -e "s#@build_libdir@#${abs_top_builddir}/${LIB_DIR}#" \
194 -e "s#@install_libdir@#${libdir}#" < $< > $@
197 # Libvulkan with dummy gem. Used for unit tests.
199 libvulkan_test_la_SOURCES = \
203 libvulkan_test_la_CFLAGS = \
204 -I$(top_srcdir)/src/intel/vulkan \
205 $(libvulkan_intel_la_CFLAGS)
207 libvulkan_test_la_LIBADD = $(libvulkan_intel_la_LIBADD)
209 include $(top_srcdir)/install-lib-links.mk
212 $(INSTALL_DATA) -D $(srcdir)/intel_icd.json $(VULKAN_ICD_INSTALL_DIR)/intel_icd.json