47ef05b01f6da3aa25dd6d03a62b11eabd9b5399
[mesa.git] / src / vulkan / Makefile.am
1 include Makefile.sources
2
3 noinst_LTLIBRARIES = libvulkan_wsi.la libvulkan_util.la
4
5 vulkan_includedir = $(includedir)/vulkan
6 vulkan_api_xml = $(top_srcdir)/src/vulkan/registry/vk.xml
7 vk_android_native_buffer_xml = $(top_srcdir)/src/vulkan/registry/vk_android_native_buffer.xml
8
9 MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
10 PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
11
12 EXTRA_DIST = \
13 $(top_srcdir)/include/vulkan/vk_android_native_buffer.h \
14 util/gen_enum_to_str.py
15
16 VULKAN_UTIL_SOURCES = \
17 $(VULKAN_UTIL_FILES) \
18 $(VULKAN_UTIL_GENERATED_FILES)
19
20 BUILT_SOURCES = \
21 $(VULKAN_UTIL_GENERATED_FILES)
22
23 util/vk_enum_to_str.c util/vk_enum_to_str.h: util/gen_enum_to_str.py \
24 $(vulkan_api_xml) $(vk_android_native_buffer_xml)
25 $(MKDIR_GEN)
26 $(PYTHON_GEN) $(srcdir)/util/gen_enum_to_str.py \
27 --xml $(vulkan_api_xml) \
28 --xml $(vk_android_native_buffer_xml) \
29 --outdir $(top_builddir)/src/vulkan/util
30
31 libvulkan_util_la_SOURCES = $(VULKAN_UTIL_SOURCES)
32
33 AM_CPPFLAGS = \
34 $(DEFINES) \
35 -I$(top_srcdir)/include \
36 -I$(top_srcdir)/src \
37 -I$(top_srcdir)/src/vulkan/util \
38 -I$(top_srcdir)/src/gallium/auxiliary \
39 -I$(top_srcdir)/src/gallium/include
40
41 AM_CFLAGS = \
42 $(LIBDRM_CFLAGS) \
43 $(VISIBILITY_CFLAGS)
44
45 VULKAN_WSI_SOURCES = \
46 $(VULKAN_WSI_FILES)
47
48 if HAVE_PLATFORM_X11
49 AM_CPPFLAGS += \
50 $(XCB_DRI3_CFLAGS) \
51 -DVK_USE_PLATFORM_XCB_KHR \
52 -DVK_USE_PLATFORM_XLIB_KHR
53
54 VULKAN_WSI_SOURCES += $(VULKAN_WSI_X11_FILES)
55 endif
56
57 BUILT_SOURCES += $(VULKAN_WSI_WAYLAND_GENERATED_FILES)
58 CLEANFILES = $(BUILT_SOURCES)
59
60 WL_DRM_XML = $(top_srcdir)/src/egl/wayland/wayland-drm/wayland-drm.xml
61
62 wsi/wayland-drm-protocol.c : $(WL_DRM_XML)
63 $(MKDIR_GEN)
64 $(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
65
66 wsi/wayland-drm-client-protocol.h : $(WL_DRM_XML)
67 $(MKDIR_GEN)
68 $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
69
70 if HAVE_PLATFORM_WAYLAND
71 AM_CPPFLAGS += \
72 -I$(top_builddir)/src/vulkan/wsi \
73 $(WAYLAND_CFLAGS) \
74 -DVK_USE_PLATFORM_WAYLAND_KHR
75
76 VULKAN_WSI_SOURCES += \
77 $(VULKAN_WSI_WAYLAND_FILES) \
78 $(VULKAN_WSI_WAYLAND_GENERATED_FILES)
79
80 endif
81
82 libvulkan_wsi_la_SOURCES = $(VULKAN_WSI_SOURCES)