meson: convert common QMP bits for qemu and qemu-storage-daemon

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2020-08-04 21:14:26 +02:00
parent 708eab42dc
commit ff219dca9f
7 changed files with 27 additions and 12 deletions

View File

@ -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
#######################################################################

View File

@ -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)

View File

@ -475,6 +475,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()
@ -655,6 +656,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')
@ -704,6 +706,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() + genh,
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: '',

View File

@ -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

9
monitor/meson.build Normal file
View File

@ -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'))

View File

@ -1,2 +0,0 @@
common-obj-$(CONFIG_SOFTMMU) += qom-hmp-cmds.o qom-qmp-cmds.o
storage-daemon-obj-y += qom-qmp-cmds.o

View File

@ -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() + genh,
dependencies: [qom_ss.dependencies()],