aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2019-07-16 19:40:16 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-08-21 06:30:15 -0400
commitde59dda32db56a0126047f74ec817df181f22f4a (patch)
treee43b9dda945ff327cc5f3738b93509b4324cb986
parent3afe7ab0d3f40270cb4dac58a8895ba21a646df6 (diff)
downloadqemu-de59dda32db56a0126047f74ec817df181f22f4a.zip
qemu-de59dda32db56a0126047f74ec817df181f22f4a.tar.gz
qemu-de59dda32db56a0126047f74ec817df181f22f4a.tar.bz2
meson: convert qom directory to Meson (tools part)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--Makefile2
-rw-r--r--Makefile.objs2
-rw-r--r--Makefile.target3
-rw-r--r--meson.build1
-rw-r--r--qom/Makefile.objs3
-rw-r--r--qom/meson.build15
6 files changed, 20 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index bc7647d..4b152e3 100644
--- a/Makefile
+++ b/Makefile
@@ -248,7 +248,6 @@ dummy := $(call unnest-vars,, \
storage-daemon-obj-y \
storage-daemon-obj-m \
crypto-obj-y \
- qom-obj-y \
io-obj-y \
common-obj-y \
common-obj-m)
@@ -269,6 +268,7 @@ $(SOFTMMU_ALL_RULES): $(storage-daemon-obj-y)
$(SOFTMMU_ALL_RULES): $(chardev-obj-y)
$(SOFTMMU_ALL_RULES): $(crypto-obj-y)
$(SOFTMMU_ALL_RULES): $(io-obj-y)
+$(SOFTMMU_ALL_RULES): $(qom-obj-y)
$(SOFTMMU_ALL_RULES): config-all-devices.mak
SOFTMMU_FUZZ_RULES=$(filter %-softmmu/fuzz, $(TARGET_DIRS_RULES))
diff --git a/Makefile.objs b/Makefile.objs
index baf1565..84bfa2a 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -1,6 +1,6 @@
#######################################################################
# Common libraries for tools and emulators
-qom-obj-y = qom/
+qom-obj-y = qom/libqom.fa
#######################################################################
# code used by both qemu system emulation and qemu-img
diff --git a/Makefile.target b/Makefile.target
index 257afc2..1e04551 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -191,13 +191,14 @@ all-obj-y := $(obj-y)
common-obj-m :=
include $(SRC_PATH)/Makefile.objs
+dummy := $(call fix-paths,../,, \
+ qom-obj-y)
dummy := $(call unnest-vars,.., \
authz-obj-y \
block-obj-y \
block-obj-m \
chardev-obj-y \
crypto-obj-y \
- qom-obj-y \
io-obj-y \
common-obj-y \
common-obj-m)
diff --git a/meson.build b/meson.build
index 6384401..658d45c 100644
--- a/meson.build
+++ b/meson.build
@@ -340,6 +340,7 @@ libqemuutil = static_library('qemuutil',
qemuutil = declare_dependency(link_with: libqemuutil,
sources: genh + version_res)
+subdir('qom')
subdir('fsdev')
# Other build targets
diff --git a/qom/Makefile.objs b/qom/Makefile.objs
index 1b45d10..b962904 100644
--- a/qom/Makefile.objs
+++ b/qom/Makefile.objs
@@ -1,5 +1,2 @@
-qom-obj-y = object.o container.o qom-qobject.o
-qom-obj-y += object_interfaces.o
-
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
new file mode 100644
index 0000000..7b2cd51
--- /dev/null
+++ b/qom/meson.build
@@ -0,0 +1,15 @@
+qom_ss = ss.source_set()
+qom_ss.add(files(
+ 'container.c',
+ 'object.c',
+ 'object_interfaces.c',
+ 'qom-qobject.c',
+))
+
+qom_ss = qom_ss.apply(config_host, strict: false)
+libqom = static_library('qom', qom_ss.sources() + genh,
+ dependencies: [qom_ss.dependencies()],
+ link_with: [libqemuutil],
+ name_suffix: 'fa')
+
+qom = declare_dependency(link_whole: libqom)