summaryrefslogtreecommitdiffstats
path: root/src/vulkan/Makefile.am
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2017-02-17 11:57:24 -0800
committerDylan Baker <[email protected]>2017-02-22 13:12:02 -0800
commit8e03250fcf4fc5de31e92ca4919959d932888a69 (patch)
treef231bc72a0b738c981a4871f0cd7c82308db38c6 /src/vulkan/Makefile.am
parente9dcb17962f7e58a81c93bae7bd33885675b1043 (diff)
vulkan: Combine wsi and util makefiles
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/vulkan/Makefile.am')
-rw-r--r--src/vulkan/Makefile.am62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am
new file mode 100644
index 00000000000..fa72d63d65f
--- /dev/null
+++ b/src/vulkan/Makefile.am
@@ -0,0 +1,62 @@
+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
+
+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)
+ $(AM_V_GEN)$(PYTHON2) $(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)