vulkan: Combine wsi and util makefiles
authorDylan Baker <dylan@pnwbakers.com>
Fri, 17 Feb 2017 19:57:24 +0000 (11:57 -0800)
committerDylan Baker <dylan@pnwbakers.com>
Wed, 22 Feb 2017 21:12:02 +0000 (13:12 -0800)
Reviewed-by: Matt Turner <mattst88@gmail.com>
configure.ac
src/Makefile.am
src/amd/vulkan/Makefile.am
src/intel/vulkan/Makefile.am
src/vulkan/Makefile.am [new file with mode: 0644]
src/vulkan/Makefile.sources [new file with mode: 0644]
src/vulkan/util/Makefile.am [deleted file]
src/vulkan/util/gen_enum_to_str.py
src/vulkan/wsi/Makefile.am [deleted file]
src/vulkan/wsi/Makefile.sources [deleted file]

index c83a5234da75a99e60b0b06f78effe730478867b..44c788377b25c1684674a5cb403a1eb7031f2d7b 100644 (file)
@@ -2691,8 +2691,7 @@ AC_CONFIG_FILES([Makefile
                src/mesa/main/tests/Makefile
                src/util/Makefile
                src/util/tests/hash_table/Makefile
-               src/vulkan/util/Makefile
-               src/vulkan/wsi/Makefile])
+               src/vulkan/Makefile])
 
 AC_OUTPUT
 
index cbdf378c54b87db34fbff20f7d5f3a009b36dfe7..860be53c013908c6eb7741b807107e0d0ef23b80 100644 (file)
@@ -117,7 +117,7 @@ SUBDIRS += intel/tools
 endif
 
 if HAVE_VULKAN_COMMON
-SUBDIRS += vulkan/util vulkan/wsi
+SUBDIRS += vulkan
 endif
 EXTRA_DIST += vulkan/registry/vk.xml
 
index 66708cb68090c6961415ad53547b0204f48c1701..740f2f92e7b77eca9b28a3adf89fd2f5a844700d 100644 (file)
@@ -92,7 +92,7 @@ libvulkan_common_la_SOURCES = $(VULKAN_SOURCES)
 
 VULKAN_LIB_DEPS += \
        libvulkan_common.la \
-       $(top_builddir)/src/vulkan/wsi/libvulkan_wsi.la \
+       $(top_builddir)/src/vulkan/libvulkan_wsi.la \
        $(top_builddir)/src/amd/common/libamd_common.la \
        $(top_builddir)/src/amd/addrlib/libamdgpu_addrlib.la \
        $(top_builddir)/src/compiler/nir/libnir.la \
index b9b79f44055137d615c186572b3f16d390035662..449188fe1e2ac828a4c1a34b935309c38435e11a 100644 (file)
@@ -127,8 +127,8 @@ libvulkan_common_la_SOURCES = $(VULKAN_SOURCES)
 
 VULKAN_LIB_DEPS += \
        libvulkan_common.la \
-       $(top_builddir)/src/vulkan/util/libvulkan_util.la \
-       $(top_builddir)/src/vulkan/wsi/libvulkan_wsi.la \
+       $(top_builddir)/src/vulkan/libvulkan_util.la \
+       $(top_builddir)/src/vulkan/libvulkan_wsi.la \
        $(top_builddir)/src/mesa/drivers/dri/i965/libi965_compiler.la \
        $(top_builddir)/src/compiler/nir/libnir.la \
        $(top_builddir)/src/util/libmesautil.la \
diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am
new file mode 100644 (file)
index 0000000..fa72d63
--- /dev/null
@@ -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)
diff --git a/src/vulkan/Makefile.sources b/src/vulkan/Makefile.sources
new file mode 100644 (file)
index 0000000..fbb8bfc
--- /dev/null
@@ -0,0 +1,16 @@
+
+VULKAN_WSI_FILES := \
+       wsi/wsi_common.h \
+       wsi/wsi_common_queue.h
+
+VULKAN_WSI_WAYLAND_FILES := \
+       wsi/wsi_common_wayland.c \
+       wsi/wsi_common_wayland.h
+
+VULKAN_WSI_X11_FILES := \
+       wsi/wsi_common_x11.c \
+       wsi/wsi_common_x11.h
+
+VULKAN_UTIL_FILES := \
+       util/vk_enum_to_str.c \
+       util/vk_enum_to_str.h
diff --git a/src/vulkan/util/Makefile.am b/src/vulkan/util/Makefile.am
deleted file mode 100644 (file)
index 87c96d5..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-vulkan_api_xml = $(top_srcdir)/src/vulkan/registry/vk.xml
-
-AM_CPPFLAGS = \
-       -I$(top_srcdir)/include \
-       -I$(top_srcdir)/src
-
-EXTRA_DIST = \
-       gen_enum_to_str.py
-
-BUILT_SOURCES = \
-       vk_enum_to_str.c \
-       vk_enum_to_str.h
-
-vk_enum_to_str.c vk_enum_to_str.h: gen_enum_to_str.py $(vulkan_api_xml)
-       $(AM_V_GEN)$(PYTHON2) $(srcdir)/gen_enum_to_str.py
-
-noinst_LTLIBRARIES = libvulkan_util.la
-
-libvulkan_util_la_SOURCES = \
-       vk_enum_to_str.c \
-       vk_enum_to_str.h
-
index 0564b8e02803686fec0194bd663cdbb4d2f068bb..4b6fdf3b3de59a6ebdf293f4cd9b970e6c82ed7f 100644 (file)
@@ -159,8 +159,8 @@ def xml_parser(filename):
 
 def main():
     enums = xml_parser(VK_XML)
-    for template, file_ in [(C_TEMPLATE, 'vk_enum_to_str.c'),
-                            (H_TEMPLATE, 'vk_enum_to_str.h')]:
+    for template, file_ in [(C_TEMPLATE, 'util/vk_enum_to_str.c'),
+                            (H_TEMPLATE, 'util/vk_enum_to_str.h')]:
         with open(file_, 'wb') as f:
             f.write(template.render(
                 file=os.path.basename(__file__),
diff --git a/src/vulkan/wsi/Makefile.am b/src/vulkan/wsi/Makefile.am
deleted file mode 100644 (file)
index b5ccf98..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-
-include Makefile.sources
-
-vulkan_includedir = $(includedir)/vulkan
-
-noinst_LTLIBRARIES = libvulkan_wsi.la
-
-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)
diff --git a/src/vulkan/wsi/Makefile.sources b/src/vulkan/wsi/Makefile.sources
deleted file mode 100644 (file)
index 50660f9..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-
-VULKAN_WSI_FILES := \
-       wsi_common.h \
-       wsi_common_queue.h
-
-VULKAN_WSI_WAYLAND_FILES := \
-       wsi_common_wayland.c \
-       wsi_common_wayland.h
-
-VULKAN_WSI_X11_FILES := \
-       wsi_common_x11.c \
-       wsi_common_x11.h
\ No newline at end of file