[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 075/150] meson: convert common QMP bits for qemu and qemu-storage
From: |
Paolo Bonzini |
Subject: |
[PATCH 075/150] meson: convert common QMP bits for qemu and qemu-storage-daemon |
Date: |
Mon, 17 Aug 2020 16:36:08 +0200 |
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
Makefile.objs | 8 +++++---
Makefile.target | 1 -
meson.build | 10 ++++++++++
monitor/Makefile.objs | 6 ------
monitor/meson.build | 9 +++++++++
qom/Makefile.objs | 2 --
qom/meson.build | 3 +++
7 files changed, 27 insertions(+), 12 deletions(-)
delete mode 100644 monitor/Makefile.objs
create mode 100644 monitor/meson.build
delete mode 100644 qom/Makefile.objs
diff --git a/Makefile.objs b/Makefile.objs
index 6657a6cce3..d7826c1e5c 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -37,10 +37,11 @@ endif # CONFIG_SOFTMMU or CONFIG_TOOLS
# storage-daemon-obj-y is code used by qemu-storage-daemon (these objects are
# used for system emulation, too, but specified separately there)
-storage-daemon-obj-y = block/ monitor/ qapi/ qom/ storage-daemon/
+storage-daemon-obj-y = block/ qapi/ qom/ storage-daemon/
storage-daemon-obj-y += blockdev.o blockdev-nbd.o iothread.o job-qmp.o
storage-daemon-obj-$(CONFIG_WIN32) += os-win32.o
storage-daemon-obj-$(CONFIG_POSIX) += os-posix.o
+storage-daemon-obj-y += libqmp.fa
######################################################################
# Target independent part of system emulation. The long term path is to
@@ -48,8 +49,7 @@ storage-daemon-obj-$(CONFIG_POSIX) += os-posix.o
# single QEMU executable should support all CPUs and machines.
ifeq ($(CONFIG_SOFTMMU),y)
-common-obj-y = monitor/
-common-obj-y += net/
+common-obj-y = net/
common-obj-$(CONFIG_LINUX) += fsdev/
common-obj-y += accel/
@@ -83,6 +83,8 @@ common-obj-y += backends/
common-obj-y += qapi/
+common-obj-y += libqmp.fa
+
endif # CONFIG_SOFTMMU
#######################################################################
diff --git a/Makefile.target b/Makefile.target
index c8f7a6c04b..54a9ef1330 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -157,7 +157,6 @@ ifdef CONFIG_SOFTMMU
obj-y += softmmu/
obj-y += gdbstub.o
obj-y += hw/
-obj-y += monitor/
obj-y += qapi/
obj-y += migration/ram.o
LIBS := $(libs_softmmu) $(LIBS)
diff --git a/meson.build b/meson.build
index e28937dee2..d7d10cbbaf 100644
--- a/meson.build
+++ b/meson.build
@@ -471,6 +471,7 @@ stub_ss = ss.source_set()
trace_ss = ss.source_set()
block_ss = ss.source_set()
blockdev_ss = ss.source_set()
+qmp_ss = ss.source_set()
common_ss = ss.source_set()
softmmu_ss = ss.source_set()
user_ss = ss.source_set()
@@ -651,6 +652,7 @@ softmmu_ss.add(when: ['CONFIG_FDT', fdt], if_true:
[files('device_tree.c')])
common_ss.add(files('cpus-common.c'))
subdir('softmmu')
+subdir('monitor')
# needed for fuzzing binaries
subdir('tests/qtest/libqos')
@@ -700,6 +702,14 @@ block = declare_dependency(link_whole: [libblock],
link_args: '@block.syms',
dependencies: [crypto, io])
+qmp_ss = qmp_ss.apply(config_host, strict: false)
+libqmp = static_library('qmp', qmp_ss.sources(),
+ dependencies: qmp_ss.dependencies(),
+ name_suffix: 'fa',
+ build_by_default: false)
+
+qmp = declare_dependency(link_whole: [libqmp])
+
foreach m : block_mods + softmmu_mods
shared_module(m.name(),
name_prefix: '',
diff --git a/monitor/Makefile.objs b/monitor/Makefile.objs
deleted file mode 100644
index a8533c9dd7..0000000000
--- a/monitor/Makefile.objs
+++ /dev/null
@@ -1,6 +0,0 @@
-obj-y += misc.o
-common-obj-y += monitor.o qmp.o hmp.o
-common-obj-y += qmp-cmds.o qmp-cmds-control.o
-common-obj-y += hmp-cmds.o
-
-storage-daemon-obj-y += monitor.o qmp.o qmp-cmds-control.o
diff --git a/monitor/meson.build b/monitor/meson.build
new file mode 100644
index 0000000000..0484a64341
--- /dev/null
+++ b/monitor/meson.build
@@ -0,0 +1,9 @@
+qmp_ss.add(files('monitor.c', 'qmp.c', 'qmp-cmds-control.c'))
+
+softmmu_ss.add(files(
+ 'hmp-cmds.c',
+ 'hmp.c',
+ 'qmp-cmds.c',
+))
+
+specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files('misc.c'))
diff --git a/qom/Makefile.objs b/qom/Makefile.objs
deleted file mode 100644
index b9629045e6..0000000000
--- a/qom/Makefile.objs
+++ /dev/null
@@ -1,2 +0,0 @@
-common-obj-$(CONFIG_SOFTMMU) += qom-hmp-cmds.o qom-qmp-cmds.o
-storage-daemon-obj-y += qom-qmp-cmds.o
diff --git a/qom/meson.build b/qom/meson.build
index 4af044d858..35815f6c04 100644
--- a/qom/meson.build
+++ b/qom/meson.build
@@ -7,6 +7,9 @@ qom_ss.add(files(
'qom-qobject.c',
))
+qmp_ss.add(files('qom-qmp-cmds.c'))
+softmmu_ss.add(files('qom-hmp-cmds.c'))
+
qom_ss = qom_ss.apply(config_host, strict: false)
libqom = static_library('qom', qom_ss.sources(),
dependencies: [qom_ss.dependencies()],
--
2.26.2
- [PATCH 067/150] meson: convert chardev directory to Meson (emulator part), (continued)
- [PATCH 067/150] meson: convert chardev directory to Meson (emulator part), Paolo Bonzini, 2020/08/17
- [PATCH 070/150] meson: convert ui directory to Meson, Paolo Bonzini, 2020/08/17
- [PATCH 061/150] meson: add modules infrastructure, Paolo Bonzini, 2020/08/17
- [PATCH 060/150] meson: infrastructure for building emulators, Paolo Bonzini, 2020/08/17
- [PATCH 062/150] meson: convert chardev directory to Meson (tools part), Paolo Bonzini, 2020/08/17
- [PATCH 072/150] meson: convert most of softmmu/, Paolo Bonzini, 2020/08/17
- [PATCH 071/150] meson: convert root directory to Meson, Paolo Bonzini, 2020/08/17
- [PATCH 074/150] meson: convert dump/, Paolo Bonzini, 2020/08/17
- [PATCH 073/150] meson: convert trace/, Paolo Bonzini, 2020/08/17
- [PATCH 068/150] meson: convert tests/qtest to meson, Paolo Bonzini, 2020/08/17
- [PATCH 075/150] meson: convert common QMP bits for qemu and qemu-storage-daemon,
Paolo Bonzini <=
- [PATCH 076/150] meson: convert qemu-storage-daemon, Paolo Bonzini, 2020/08/17
- [PATCH 077/150] meson: convert replay directory to Meson, Paolo Bonzini, 2020/08/17
- [PATCH 078/150] meson: convert migration directory to Meson, Paolo Bonzini, 2020/08/17
- [PATCH 079/150] meson: convert net directory to Meson, Paolo Bonzini, 2020/08/17
- [PATCH 081/150] meson: convert fsdev/, Paolo Bonzini, 2020/08/17
- [PATCH 080/150] meson: convert backends directory to Meson, Paolo Bonzini, 2020/08/17
- [PATCH 083/150] meson: convert qapi-specific to meson, Paolo Bonzini, 2020/08/17
- [PATCH 082/150] meson: convert disas directory to Meson, Paolo Bonzini, 2020/08/17
- [PATCH 084/150] meson: convert hw/xen, Paolo Bonzini, 2020/08/17
- [PATCH 085/150] meson: convert hw/core, Paolo Bonzini, 2020/08/17