5cdffbf901e6e2410bb9eaeeeb1f707289112dc1
[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
8 MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
9 PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
10
11 EXTRA_DIST = \
12 util/gen_enum_to_str.py
13
14 BUILT_SOURCES = \
15 util/vk_enum_to_str.c \
16 util/vk_enum_to_str.h
17
18 util/vk_enum_to_str.c util/vk_enum_to_str.h: util/gen_enum_to_str.py $(vulkan_api_xml)
19 $(MKDIR_GEN)
20 $(PYTHON_GEN) $(srcdir)/util/gen_enum_to_str.py
21
22 libvulkan_util_la_SOURCES = $(VULKAN_UTIL_FILES)
23
24 AM_CPPFLAGS = \
25 $(DEFINES) \
26 -I$(top_srcdir)/include \
27 -I$(top_srcdir)/src \
28 -I$(top_srcdir)/src/gallium/auxiliary \
29 -I$(top_srcdir)/src/gallium/include
30
31 AM_CFLAGS = \
32 $(LIBDRM_CFLAGS) \
33 $(VISIBILITY_CFLAGS)
34
35 VULKAN_LIB_DEPS =
36
37 VULKAN_WSI_SOURCES = \
38 $(VULKAN_WSI_FILES)
39
40 if HAVE_PLATFORM_X11
41 AM_CPPFLAGS += \
42 $(XCB_DRI3_CFLAGS) \
43 -DVK_USE_PLATFORM_XCB_KHR \
44 -DVK_USE_PLATFORM_XLIB_KHR
45
46 VULKAN_WSI_SOURCES += $(VULKAN_WSI_X11_FILES)
47
48 # FIXME: Use pkg-config for X11-xcb ldflags.
49 VULKAN_LIB_DEPS += $(XCB_DRI3_LIBS) -lX11-xcb
50 endif
51
52 if HAVE_PLATFORM_WAYLAND
53 AM_CPPFLAGS += \
54 -I$(top_builddir)/src/egl/wayland/wayland-drm \
55 -I$(top_srcdir)/src/egl/wayland/wayland-drm \
56 $(WAYLAND_CFLAGS) \
57 -DVK_USE_PLATFORM_WAYLAND_KHR
58
59 VULKAN_WSI_SOURCES += $(VULKAN_WSI_WAYLAND_FILES)
60
61 VULKAN_LIB_DEPS += \
62 $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la \
63 $(WAYLAND_LIBS)
64 endif
65
66 libvulkan_wsi_la_SOURCES = $(VULKAN_WSI_SOURCES)