1 # Copyright © 2016 Red Hat
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
22 include Makefile.sources
25 $(top_srcdir)/include/vulkan/vk_platform.h \
26 $(top_srcdir)/include/vulkan/vulkan.h
28 lib_LTLIBRARIES = libvulkan_radeon.la
30 # The gallium includes are for the util/u_math.h include from main/macros.h
33 -I$(top_srcdir)/include \
34 -I$(top_builddir)/src \
36 -I$(top_srcdir)/src/vulkan/wsi \
37 -I$(top_builddir)/src/vulkan/util \
38 -I$(top_srcdir)/src/vulkan/util \
39 -I$(top_srcdir)/src/amd \
40 -I$(top_srcdir)/src/amd/common \
41 -I$(top_builddir)/src/compiler \
42 -I$(top_builddir)/src/compiler/nir \
43 -I$(top_srcdir)/src/compiler \
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/gallium/auxiliary \
48 -I$(top_srcdir)/src/gallium/include \
54 $(VISIBILITY_CFLAGS) \
59 $(VULKAN_GENERATED_FILES) \
64 $(top_builddir)/src/vulkan/libvulkan_util.la \
65 $(top_builddir)/src/vulkan/libvulkan_wsi.la \
66 $(top_builddir)/src/amd/common/libamd_common.la \
67 $(top_builddir)/src/amd/addrlib/libamdgpu_addrlib.la \
68 $(top_builddir)/src/compiler/nir/libnir.la \
69 $(top_builddir)/src/util/libmesautil.la \
82 -DVK_USE_PLATFORM_XCB_KHR \
83 -DVK_USE_PLATFORM_XLIB_KHR
85 VULKAN_SOURCES += $(VULKAN_WSI_X11_FILES)
87 VULKAN_LIB_DEPS += $(XCB_DRI3_LIBS)
91 if HAVE_PLATFORM_WAYLAND
93 $(WAYLAND_CLIENT_CFLAGS) \
94 -DVK_USE_PLATFORM_WAYLAND_KHR
96 VULKAN_SOURCES += $(VULKAN_WSI_WAYLAND_FILES)
99 $(WAYLAND_CLIENT_LIBS)
102 noinst_LTLIBRARIES = libvulkan_common.la
103 libvulkan_common_la_SOURCES = $(VULKAN_SOURCES)
105 nodist_EXTRA_libvulkan_radeon_la_SOURCES = dummy.cpp
106 libvulkan_radeon_la_SOURCES = $(VULKAN_GEM_FILES)
108 vulkan_api_xml = $(top_srcdir)/src/vulkan/registry/vk.xml
110 radv_entrypoints.c: radv_entrypoints_gen.py radv_extensions.py $(vulkan_api_xml)
112 $(AM_V_GEN)$(PYTHON2) $(srcdir)/radv_entrypoints_gen.py \
113 --xml $(vulkan_api_xml) --outdir $(builddir)
114 radv_entrypoints.h: radv_entrypoints.c
116 radv_extensions.c: radv_extensions.py \
119 $(AM_V_GEN)$(PYTHON2) $(srcdir)/radv_extensions.py \
120 --xml $(vulkan_api_xml) \
123 vk_format_table.c: vk_format_table.py \
126 $(PYTHON2) $(srcdir)/vk_format_table.py $(srcdir)/vk_format_layout.csv > $@
128 BUILT_SOURCES = $(VULKAN_GENERATED_FILES)
129 CLEANFILES = $(BUILT_SOURCES) dev_icd.json radeon_icd.@host_cpu@.json
131 $(top_srcdir)/include/vulkan/vk_icd.h \
134 radv_entrypoints_gen.py \
136 vk_format_layout.csv \
140 libvulkan_radeon_la_LIBADD = $(VULKAN_LIB_DEPS)
142 libvulkan_radeon_la_LDFLAGS = \
153 icdconfdir = @VULKAN_ICD_INSTALL_DIR@
154 icdconf_DATA = radeon_icd.@host_cpu@.json
155 # The following is used for development purposes, by setting VK_ICD_FILENAMES.
156 noinst_DATA = dev_icd.json
158 dev_icd.json : dev_icd.json.in
160 -e "s#@libvulkan_radeon_path@#${abs_top_builddir}/${LIB_DIR}/libvulkan_radeon.so#" \
161 < $(srcdir)/dev_icd.json.in > $@
163 radeon_icd.@host_cpu@.json : radeon_icd.json.in
165 -e "s#@install_libdir@#${libdir}#" \
166 < $(srcdir)/radeon_icd.json.in > $@
168 include $(top_srcdir)/install-lib-links.mk