summaryrefslogtreecommitdiffstats
path: root/src/vulkan/Makefile.am
blob: 5cdffbf901e6e2410bb9eaeeeb1f707289112dc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
include Makefile.sources

noinst_LTLIBRARIES = libvulkan_wsi.la libvulkan_util.la

vulkan_includedir = $(includedir)/vulkan
vulkan_api_xml = $(top_srcdir)/src/vulkan/registry/vk.xml

MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)

EXTRA_DIST = \
	util/gen_enum_to_str.py

BUILT_SOURCES = \
	util/vk_enum_to_str.c \
	util/vk_enum_to_str.h

util/vk_enum_to_str.c util/vk_enum_to_str.h: util/gen_enum_to_str.py $(vulkan_api_xml)
	$(MKDIR_GEN)
	$(PYTHON_GEN) $(srcdir)/util/gen_enum_to_str.py

libvulkan_util_la_SOURCES = $(VULKAN_UTIL_FILES)

AM_CPPFLAGS = \
	$(DEFINES) \
	-I$(top_srcdir)/include \
	-I$(top_srcdir)/src \
	-I$(top_srcdir)/src/gallium/auxiliary \
	-I$(top_srcdir)/src/gallium/include

AM_CFLAGS = \
	$(LIBDRM_CFLAGS) \
	$(VISIBILITY_CFLAGS)

VULKAN_LIB_DEPS =

VULKAN_WSI_SOURCES = \
	$(VULKAN_WSI_FILES)

if HAVE_PLATFORM_X11
AM_CPPFLAGS += \
	$(XCB_DRI3_CFLAGS) \
	-DVK_USE_PLATFORM_XCB_KHR \
	-DVK_USE_PLATFORM_XLIB_KHR

VULKAN_WSI_SOURCES += $(VULKAN_WSI_X11_FILES)

# FIXME: Use pkg-config for X11-xcb ldflags.
VULKAN_LIB_DEPS += $(XCB_DRI3_LIBS) -lX11-xcb
endif

if HAVE_PLATFORM_WAYLAND
AM_CPPFLAGS += \
	-I$(top_builddir)/src/egl/wayland/wayland-drm \
	-I$(top_srcdir)/src/egl/wayland/wayland-drm \
	$(WAYLAND_CFLAGS) \
	-DVK_USE_PLATFORM_WAYLAND_KHR

VULKAN_WSI_SOURCES += $(VULKAN_WSI_WAYLAND_FILES)

VULKAN_LIB_DEPS += \
	$(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la \
	$(WAYLAND_LIBS)
endif

libvulkan_wsi_la_SOURCES = $(VULKAN_WSI_SOURCES)