[libvirt PATCH 138/351] meson: src: build libvirt_driver_esx.a static library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/esx/Makefile.inc.am | 70 -----------------------------------------
 src/esx/meson.build     | 57 +++++++++++++++++++++++++++++++++
 src/meson.build         |  1 +
 3 files changed, 58 insertions(+), 70 deletions(-)
 create mode 100644 src/esx/meson.build

diff --git a/src/esx/Makefile.inc.am b/src/esx/Makefile.inc.am
index 89e7b18d344..2e776d1ebec 100644
--- a/src/esx/Makefile.inc.am
+++ b/src/esx/Makefile.inc.am
@@ -1,77 +1,7 @@
 # vim: filetype=automake
 
-ESX_DRIVER_SOURCES = \
-	esx/esx_private.h \
-	esx/esx_driver.c \
-	esx/esx_driver.h \
-	esx/esx_interface_driver.c \
-	esx/esx_interface_driver.h \
-	esx/esx_network_driver.c \
-	esx/esx_network_driver.h \
-	esx/esx_storage_driver.c \
-	esx/esx_storage_driver.h \
-	esx/esx_storage_backend_vmfs.c \
-	esx/esx_storage_backend_vmfs.h \
-	esx/esx_storage_backend_iscsi.c \
-	esx/esx_storage_backend_iscsi.h \
-	esx/esx_stream.c \
-	esx/esx_stream.h \
-	esx/esx_util.c \
-	esx/esx_util.h \
-	esx/esx_vi.c \
-	esx/esx_vi.h \
-	esx/esx_vi_methods.c \
-	esx/esx_vi_methods.h \
-	esx/esx_vi_types.c \
-	esx/esx_vi_types.h \
-	$(NULL)
-
-ESX_DRIVER_GENERATED = \
-	esx/esx_vi_methods.generated.c \
-	esx/esx_vi_methods.generated.h \
-	esx/esx_vi_methods.generated.macro \
-	esx/esx_vi_types.generated.c \
-	esx/esx_vi_types.generated.h \
-	esx/esx_vi_types.generated.typedef \
-	esx/esx_vi_types.generated.typeenum \
-	esx/esx_vi_types.generated.typetostring \
-	esx/esx_vi_types.generated.typefromstring \
-	esx/esx_vi.generated.c \
-	esx/esx_vi.generated.h \
-	$(NULL)
-
-ESX_GENERATED_STAMP = .esx_vi_generator.stamp
-
-DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(ESX_DRIVER_SOURCES))
-
-$(ESX_DRIVER_GENERATED): $(ESX_GENERATED_STAMP)
-
-$(ESX_GENERATED_STAMP): $(srcdir)/esx/esx_vi_generator.input \
-                         $(top_srcdir)/scripts/esx_vi_generator.py
-	$(AM_V_GEN) $(RUNUTF8) $(PYTHON) \
-		$(top_srcdir)/scripts/esx_vi_generator.py \
-		$(srcdir) $(builddir) && touch $@
-
 if WITH_ESX
 USED_SYM_FILES += $(srcdir)/libvirt_esx.syms
 else ! WITH_ESX
 SYM_FILES += $(srcdir)/libvirt_esx.syms
 endif ! WITH_ESX
-
-
-if WITH_ESX
-noinst_LTLIBRARIES += libvirt_driver_esx.la
-libvirt_la_BUILT_LIBADD += libvirt_driver_esx.la
-libvirt_driver_esx_la_CFLAGS = \
-	$(CURL_CFLAGS) \
-	-I$(srcdir)/conf \
-	-I$(builddir)/esx \
-	-I$(srcdir)/vmx \
-	$(AM_CFLAGS) \
-	$(NULL)
-libvirt_driver_esx_la_LDFLAGS = $(AM_LDFLAGS)
-libvirt_driver_esx_la_LIBADD = $(CURL_LIBS)
-libvirt_driver_esx_la_SOURCES = $(ESX_DRIVER_SOURCES)
-libvirt_driver_esx_la_DEPENDENCIES = $(ESX_DRIVER_GENERATED)
-
-endif WITH_ESX
diff --git a/src/esx/meson.build b/src/esx/meson.build
new file mode 100644
index 00000000000..6d7e2311bff
--- /dev/null
+++ b/src/esx/meson.build
@@ -0,0 +1,57 @@
+esx_sources = [
+  'esx_driver.c',
+  'esx_interface_driver.c',
+  'esx_network_driver.c',
+  'esx_storage_driver.c',
+  'esx_storage_backend_vmfs.c',
+  'esx_storage_backend_iscsi.c',
+  'esx_stream.c',
+  'esx_util.c',
+  'esx_vi.c',
+  'esx_vi_methods.c',
+  'esx_vi_types.c',
+]
+
+esx_gen_sources = custom_target(
+  'virtesxgen',
+  input: [
+    'esx_vi_generator.input',
+  ],
+  output: [
+    'esx_vi.generated.c',
+    'esx_vi.generated.h',
+    'esx_vi_methods.generated.c',
+    'esx_vi_methods.generated.h',
+    'esx_vi_methods.generated.macro',
+    'esx_vi_types.generated.c',
+    'esx_vi_types.generated.h',
+    'esx_vi_types.generated.typedef',
+    'esx_vi_types.generated.typeenum',
+    'esx_vi_types.generated.typefromstring',
+    'esx_vi_types.generated.typetostring',
+  ],
+  command: [
+    meson_python_prog,
+    esx_vi_generator_prog,
+    meson.source_root() / 'src',
+    meson.build_root() / 'src',
+  ],
+)
+
+if conf.has('WITH_ESX')
+  esx_lib = static_library(
+    'virt_driver_esx',
+    [
+      esx_sources,
+      esx_gen_sources[1],
+    ],
+    dependencies: [
+      curl_dep,
+      src_dep,
+    ],
+    include_directories: [
+      conf_inc_dir,
+      vmx_inc_dir,
+    ],
+  )
+endif
diff --git a/src/meson.build b/src/meson.build
index 84e810edfd2..794c717f136 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -87,4 +87,5 @@ subdir('vmx')
 
 subdir('admin')
 
+subdir('esx')
 subdir('vmware')
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux