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
24 vulkan_includedir = $(includedir)/vulkan
26 vulkan_include_HEADERS = \
27 $(top_srcdir)/include/vulkan/vk_platform.h \
28 $(top_srcdir)/include/vulkan/vulkan.h
30 lib_LTLIBRARIES = libvulkan_radeon.la
32 # The gallium includes are for the util/u_math.h include from main/macros.h
38 -I$(top_srcdir)/include \
39 -I$(top_builddir)/src \
41 -I$(top_srcdir)/src/amd \
42 -I$(top_srcdir)/src/amd/common \
43 -I$(top_builddir)/src/compiler \
44 -I$(top_builddir)/src/compiler/nir \
45 -I$(top_srcdir)/src/compiler \
46 -I$(top_srcdir)/src/mapi \
47 -I$(top_srcdir)/src/mesa \
48 -I$(top_srcdir)/src/mesa/drivers/dri/common \
49 -I$(top_srcdir)/src/gallium/auxiliary \
50 -I$(top_srcdir)/src/gallium/include
52 AM_CFLAGS = $(VISIBILITY_FLAGS) \
57 $(VULKAN_GENERATED_FILES) \
60 VULKAN_LIB_DEPS = $(AMDGPU_LIBS)
66 -DVK_USE_PLATFORM_XCB_KHR \
67 -DVK_USE_PLATFORM_XLIB_KHR
69 VULKAN_SOURCES += $(VULKAN_WSI_X11_FILES)
71 # FIXME: Use pkg-config for X11-xcb ldflags.
72 VULKAN_LIB_DEPS += $(XCB_DRI3_LIBS) -lX11-xcb
76 if HAVE_PLATFORM_WAYLAND
78 -I$(top_builddir)/src/egl/wayland/wayland-drm \
79 -I$(top_srcdir)/src/egl/wayland/wayland-drm \
81 -DVK_USE_PLATFORM_WAYLAND_KHR
83 VULKAN_SOURCES += $(VULKAN_WSI_WAYLAND_FILES)
86 $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la \
90 noinst_LTLIBRARIES = libvulkan_common.la
91 libvulkan_common_la_SOURCES = $(VULKAN_SOURCES)
95 $(top_builddir)/src/amd/common/libamd_common.la \
96 $(top_builddir)/src/compiler/nir/libnir.la \
97 $(top_builddir)/src/util/libmesautil.la \
106 nodist_EXTRA_libvulkan_radeon_la_SOURCES = dummy.cpp
107 libvulkan_radeon_la_SOURCES = $(VULKAN_GEM_FILES)
109 radv_entrypoints.h : radv_entrypoints_gen.py $(vulkan_include_HEADERS)
110 $(AM_V_GEN) cat $(vulkan_include_HEADERS) |\
111 $(PYTHON2) $(srcdir)/radv_entrypoints_gen.py header > $@
113 radv_entrypoints.c : radv_entrypoints_gen.py $(vulkan_include_HEADERS)
114 $(AM_V_GEN) cat $(vulkan_include_HEADERS) |\
115 $(PYTHON2) $(srcdir)/radv_entrypoints_gen.py code > $@
117 .PHONY: radv_timestamp.h
120 @echo "Updating radv_timestamp.h"
121 $(AM_V_GEN) echo "#define RADV_TIMESTAMP \"$(TIMESTAMP_CMD)\"" > $@
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 radv_timestamp.h
131 $(top_srcdir)/include/vulkan/vk_icd.h \
134 radv_entrypoints_gen.py \
135 vk_format_layout.csv \
139 libvulkan_radeon_la_LIBADD = $(VULKAN_LIB_DEPS) $(top_builddir)/src/amd/addrlib/libamdgpu_addrlib.la
141 libvulkan_radeon_la_LDFLAGS = \
152 icdconfdir = @VULKAN_ICD_INSTALL_DIR@
153 icdconf_DATA = radeon_icd.json
154 # The following is used for development purposes, by setting VK_ICD_FILENAMES.
155 noinst_DATA = dev_icd.json
157 dev_icd.json : dev_icd.json.in
159 -e "s#@build_libdir@#${abs_top_builddir}/${LIB_DIR}#" \
160 < $(srcdir)/dev_icd.json.in > $@
162 include $(top_srcdir)/install-lib-links.mk