[Mesa-dev] [PATCH v2 2/2] vulkan: Combine wsi and util makefiles

Dylan Baker dylan at pnwbakers.com
Fri Feb 17 22:16:16 UTC 2017


cc: Matt Turner <mattst88 at gmail.com>
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>

v2: - add this patch
---
 configure.ac                       |  3 +--
 src/Makefile.am                    |  2 +-
 src/intel/vulkan/Makefile.am       |  4 ++--
 src/vulkan/{wsi => }/Makefile.am   | 16 ++++++++++++++--
 src/vulkan/Makefile.sources        | 16 ++++++++++++++++
 src/vulkan/util/Makefile.am        | 22 ----------------------
 src/vulkan/util/gen_enum_to_str.py |  4 ++--
 src/vulkan/wsi/Makefile.sources    | 12 ------------
 8 files changed, 36 insertions(+), 43 deletions(-)
 rename src/vulkan/{wsi => }/Makefile.am (70%)
 create mode 100644 src/vulkan/Makefile.sources
 delete mode 100644 src/vulkan/util/Makefile.am
 delete mode 100644 src/vulkan/wsi/Makefile.sources

diff --git a/configure.ac b/configure.ac
index c83a5234da..44c788377b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
 
diff --git a/src/Makefile.am b/src/Makefile.am
index cbdf378c54..860be53c01 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -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
 
diff --git a/src/intel/vulkan/Makefile.am b/src/intel/vulkan/Makefile.am
index 54bf0f5de1..8089762610 100644
--- a/src/intel/vulkan/Makefile.am
+++ b/src/intel/vulkan/Makefile.am
@@ -126,8 +126,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/wsi/Makefile.am b/src/vulkan/Makefile.am
similarity index 70%
rename from src/vulkan/wsi/Makefile.am
rename to src/vulkan/Makefile.am
index a71279947a..df84cfd71d 100644
--- a/src/vulkan/wsi/Makefile.am
+++ b/src/vulkan/Makefile.am
@@ -1,9 +1,21 @@
-
 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
 
-noinst_LTLIBRARIES = libvulkan_wsi.la
+libvulkan_util_la_SOURCES = $(VULKAN_UTIL_FILES)
 
 AM_CPPFLAGS = \
 	$(DEFINES) \
diff --git a/src/vulkan/Makefile.sources b/src/vulkan/Makefile.sources
new file mode 100644
index 0000000000..fbb8bfc51d
--- /dev/null
+++ b/src/vulkan/Makefile.sources
@@ -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
index 87c96d5e5b..0000000000
--- a/src/vulkan/util/Makefile.am
+++ /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
-
diff --git a/src/vulkan/util/gen_enum_to_str.py b/src/vulkan/util/gen_enum_to_str.py
index 0564b8e028..4b6fdf3b3d 100644
--- a/src/vulkan/util/gen_enum_to_str.py
+++ b/src/vulkan/util/gen_enum_to_str.py
@@ -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.sources b/src/vulkan/wsi/Makefile.sources
deleted file mode 100644
index 50660f9a54..0000000000
--- a/src/vulkan/wsi/Makefile.sources
+++ /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
-- 
2.11.1



More information about the mesa-dev mailing list