[libvirt PATCH 164/351] meson: src: build libvirt_driver_qemu_impl.a static library

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

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/meson.build                      |   1 +
 src/qemu/Makefile.inc.am             | 106 ---------------------------
 src/{ => qemu}/libvirt_qemu_probes.d |   0
 src/qemu/meson.build                 |  95 ++++++++++++++++++++++++
 4 files changed, 96 insertions(+), 106 deletions(-)
 rename src/{ => qemu}/libvirt_qemu_probes.d (100%)
 create mode 100644 src/qemu/meson.build

diff --git a/src/meson.build b/src/meson.build
index 66af0e3051c..bfc60fc967e 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -154,6 +154,7 @@ subdir('hyperv')
 subdir('libxl')
 subdir('lxc')
 subdir('openvz')
+subdir('qemu')
 subdir('test')
 subdir('vmware')
 
diff --git a/src/qemu/Makefile.inc.am b/src/qemu/Makefile.inc.am
index 5aee568ed90..3d703d15d33 100644
--- a/src/qemu/Makefile.inc.am
+++ b/src/qemu/Makefile.inc.am
@@ -1,90 +1,9 @@
 # vim: filetype=automake
 
-QEMU_DRIVER_SOURCES = \
-	qemu/qemu_agent.c \
-	qemu/qemu_agent.h \
-	qemu/qemu_alias.c \
-	qemu/qemu_alias.h \
-	qemu/qemu_block.c \
-	qemu/qemu_block.h \
-	qemu/qemu_blockjob.c \
-	qemu/qemu_blockjob.h \
-	qemu/qemu_capabilities.c \
-	qemu/qemu_capabilities.h \
-	qemu/qemu_command.c \
-	qemu/qemu_command.h \
-	qemu/qemu_dbus.c \
-	qemu/qemu_dbus.h \
-	qemu/qemu_domain.c \
-	qemu/qemu_domain.h \
-	qemu/qemu_domainjob.c \
-	qemu/qemu_domainjob.h \
-	qemu/qemu_domain_address.c \
-	qemu/qemu_domain_address.h \
-	qemu/qemu_cgroup.c \
-	qemu/qemu_cgroup.h \
-	qemu/qemu_extdevice.c \
-	qemu/qemu_extdevice.h \
-	qemu/qemu_firmware.c \
-	qemu/qemu_firmware.h \
-	qemu/qemu_hostdev.c \
-	qemu/qemu_hostdev.h \
-	qemu/qemu_hotplug.c \
-	qemu/qemu_hotplug.h \
-	qemu/qemu_conf.c \
-	qemu/qemu_conf.h \
-	qemu/qemu_interop_config.c \
-	qemu/qemu_interop_config.h \
-	qemu/qemu_process.c \
-	qemu/qemu_process.h \
-	qemu/qemu_processpriv.h \
-	qemu/qemu_migration.c \
-	qemu/qemu_migration.h \
-	qemu/qemu_migration_cookie.c \
-	qemu/qemu_migration_cookie.h \
-	qemu/qemu_migration_params.c \
-	qemu/qemu_migration_params.h \
-	qemu/qemu_migration_paramspriv.h \
-	qemu/qemu_monitor.c \
-	qemu/qemu_monitor.h \
-	qemu/qemu_monitor_priv.h \
-	qemu/qemu_monitor_text.c \
-	qemu/qemu_monitor_text.h \
-	qemu/qemu_monitor_json.c \
-	qemu/qemu_monitor_json.h \
-	qemu/qemu_driver.c \
-	qemu/qemu_driver.h \
-	qemu/qemu_interface.c \
-	qemu/qemu_interface.h \
-	qemu/qemu_capspriv.h \
-	qemu/qemu_security.c \
-	qemu/qemu_security.h \
-	qemu/qemu_qapi.c \
-	qemu/qemu_qapi.h \
-	qemu/qemu_slirp.c \
-	qemu/qemu_slirp.h \
-	qemu/qemu_tpm.c \
-	qemu/qemu_tpm.h \
-	qemu/qemu_vhost_user.c \
-	qemu/qemu_vhost_user.h \
-	qemu/qemu_vhost_user_gpu.c \
-	qemu/qemu_vhost_user_gpu.h \
-	qemu/qemu_virtiofs.c \
-	qemu/qemu_virtiofs.h \
-	qemu/qemu_checkpoint.c \
-	qemu/qemu_checkpoint.h \
-	qemu/qemu_backup.c \
-	qemu/qemu_backup.h \
-	qemu/qemu_validate.c \
-	qemu/qemu_validate.h \
-	$(NULL)
-
-
 DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(QEMU_DRIVER_SOURCES))
 STATEFUL_DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(QEMU_DRIVER_SOURCES))
 
 if WITH_QEMU
-noinst_LTLIBRARIES += libvirt_driver_qemu_impl.la
 libvirt_driver_qemu_la_SOURCES =
 libvirt_driver_qemu_la_LIBADD = \
 	libvirt_driver_qemu_impl.la \
@@ -94,33 +13,8 @@ libvirt_driver_qemu_la_LIBADD = \
 mod_LTLIBRARIES += libvirt_driver_qemu.la
 libvirt_driver_qemu_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
 
-libvirt_driver_qemu_impl_la_CFLAGS = \
-	$(GNUTLS_CFLAGS) \
-	$(LIBNL_CFLAGS) \
-	$(SELINUX_CFLAGS) \
-	$(XDR_CFLAGS) \
-	-I$(srcdir)/access \
-	-I$(builddir)/access \
-	-I$(srcdir)/conf \
-	-I$(srcdir)/hypervisor \
-	$(AM_CFLAGS) \
-	$(NULL)
-libvirt_driver_qemu_impl_la_LDFLAGS = $(AM_LDFLAGS)
-libvirt_driver_qemu_impl_la_LIBADD = \
-	$(CAPNG_LIBS) \
-	$(GNUTLS_LIBS) \
-	$(LIBNL_LIBS) \
-	$(SELINUX_LIBS) \
-	$(LIBXML_LIBS) \
-	$(NULL)
-libvirt_driver_qemu_impl_la_SOURCES = $(QEMU_DRIVER_SOURCES)
-
 if WITH_DTRACE_PROBES
 libvirt_driver_qemu_la_LIBADD += libvirt_qemu_probes.lo
-nodist_libvirt_driver_qemu_la_SOURCES = libvirt_qemu_probes.h
-
-tapset_DATA += libvirt_qemu_probes.stp
-
 endif WITH_DTRACE_PROBES
 
 sbin_PROGRAMS += virtqemud
diff --git a/src/libvirt_qemu_probes.d b/src/qemu/libvirt_qemu_probes.d
similarity index 100%
rename from src/libvirt_qemu_probes.d
rename to src/qemu/libvirt_qemu_probes.d
diff --git a/src/qemu/meson.build b/src/qemu/meson.build
new file mode 100644
index 00000000000..14b700558df
--- /dev/null
+++ b/src/qemu/meson.build
@@ -0,0 +1,95 @@
+qemu_driver_sources = [
+  'qemu_agent.c',
+  'qemu_alias.c',
+  'qemu_backup.c',
+  'qemu_block.c',
+  'qemu_blockjob.c',
+  'qemu_capabilities.c',
+  'qemu_cgroup.c',
+  'qemu_checkpoint.c',
+  'qemu_command.c',
+  'qemu_conf.c',
+  'qemu_dbus.c',
+  'qemu_domain.c',
+  'qemu_domain_address.c',
+  'qemu_domainjob.c',
+  'qemu_driver.c',
+  'qemu_extdevice.c',
+  'qemu_firmware.c',
+  'qemu_hostdev.c',
+  'qemu_hotplug.c',
+  'qemu_interface.c',
+  'qemu_interop_config.c',
+  'qemu_migration.c',
+  'qemu_migration_cookie.c',
+  'qemu_migration_params.c',
+  'qemu_monitor.c',
+  'qemu_monitor_json.c',
+  'qemu_monitor_text.c',
+  'qemu_process.c',
+  'qemu_qapi.c',
+  'qemu_security.c',
+  'qemu_slirp.c',
+  'qemu_tpm.c',
+  'qemu_validate.c',
+  'qemu_vhost_user.c',
+  'qemu_vhost_user_gpu.c',
+  'qemu_virtiofs.c',
+]
+
+qemu_dtrace_gen_headers = []
+qemu_dtrace_gen_objects = []
+
+if conf.has('WITH_DTRACE_PROBES')
+  infile = 'libvirt_qemu_probes.d'
+  out_h = 'libvirt_qemu_probes.h'
+  out_o = 'libvirt_qemu_probes.o'
+  out_stp = 'libvirt_qemu_probes.stp'
+
+  qemu_dtrace_gen_headers += custom_target(
+    out_h,
+    input: infile,
+    output: out_h,
+    command: [ dtrace_prog, '-o', '@OUTPUT@', '-h', '-s', '@INPUT@' ],
+  )
+
+  qemu_dtrace_gen_objects += custom_target(
+    out_o,
+    input: infile,
+    output: out_o,
+    command: [ dtrace_prog, '-o', '@OUTPUT@', '-G', '-s', '@INPUT@' ],
+  )
+
+  qemu_dtrace_gen_stp = custom_target(
+    out_stp,
+    input: infile,
+    output: out_stp,
+    command: [ meson_python_prog, dtrace2systemtap_prog, bindir, sbindir, libdir, '@INPUT@' ],
+    capture: true,
+    install: conf.has('WITH_QEMU'),
+    install_dir: systemtap_dir,
+  )
+endif
+
+if conf.has('WITH_QEMU')
+  qemu_driver_impl = static_library(
+    'virt_driver_qemu_impl',
+    [
+      qemu_driver_sources,
+      qemu_dtrace_gen_headers,
+    ],
+    dependencies: [
+      access_dep,
+      capng_dep,
+      gnutls_dep,
+      libnl_dep,
+      selinux_dep,
+      src_dep,
+      xdr_dep,
+    ],
+    include_directories: [
+      conf_inc_dir,
+      hypervisor_inc_dir,
+    ],
+  )
+endif
-- 
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