[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 034/132] meson: convert qom directory to Meson
From: |
Paolo Bonzini |
Subject: |
[PATCH 034/132] meson: convert qom directory to Meson |
Date: |
Thu, 12 Dec 2019 13:51:18 +0100 |
From: Marc-André Lureau <address@hidden>
Signed-off-by: Marc-André Lureau <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
Makefile | 2 +-
Makefile.objs | 4 ++--
Makefile.target | 3 ++-
meson.build | 1 +
qom/Makefile.objs | 3 ---
qom/meson.build | 15 +++++++++++++++
tests/Makefile.include | 2 +-
7 files changed, 22 insertions(+), 8 deletions(-)
create mode 100644 qom/meson.build
diff --git a/Makefile b/Makefile
index b880265..9e9b2cf 100644
--- a/Makefile
+++ b/Makefile
@@ -202,7 +202,6 @@ dummy := $(call unnest-vars,, \
block-obj-y \
block-obj-m \
crypto-obj-y \
- qom-obj-y \
io-obj-y \
common-obj-y \
common-obj-m)
@@ -222,6 +221,7 @@ $(SOFTMMU_ALL_RULES): $(block-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
.PHONY: $(TARGET_DIRS_RULES)
diff --git a/Makefile.objs b/Makefile.objs
index 38e3604..b695319 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -24,9 +24,9 @@ block-obj-m = block/
crypto-obj-y = crypto/
#######################################################################
-# qom-obj-y is code used by both qemu system emulation and qemu-img
+# libraries built entirely from meson
-qom-obj-y = qom/
+qom-obj-y = qom/libqom.fa
#######################################################################
# io-obj-y is code used by both qemu system emulation and qemu-img
diff --git a/Makefile.target b/Makefile.target
index 1f19d68..df3b14a 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -176,13 +176,14 @@ dummy := $(call unnest-vars,,obj-y)
all-obj-y := $(obj-y)
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 00c0767..36094fe 100644
--- a/meson.build
+++ b/meson.build
@@ -271,6 +271,7 @@ libqemuutil = static_library('qemuutil',
qemuutil = declare_dependency(link_with: libqemuutil,
sources: version_res)
+subdir('qom')
subdir('fsdev')
# Other build targets
diff --git a/qom/Makefile.objs b/qom/Makefile.objs
index f9d7735..fc1248e 100644
--- a/qom/Makefile.objs
+++ b/qom/Makefile.objs
@@ -1,4 +1 @@
-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
diff --git a/qom/meson.build b/qom/meson.build
new file mode 100644
index 0000000..3c41ed3
--- /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(),
+ dependencies: [qom_ss.dependencies()],
+ link_with: [libqemuutil],
+ name_suffix: 'fa')
+
+qom = declare_dependency(link_whole: libqom)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 9fd6a48..659f087 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -498,7 +498,7 @@ QEMU_CFLAGS += -I$(SRC_PATH)/tests
# Deps that are common to various different sets of tests below
test-util-obj-y = libqemuutil.a
-test-qom-obj-y = $(qom-obj-y) $(test-util-obj-y)
+test-qom-obj-y = qom/libqom.fa $(test-util-obj-y)
test-qapi-obj-y = tests/test-qapi-types.o \
tests/include/test-qapi-types-sub-module.o \
tests/test-qapi-types-sub-sub-module.o \
--
1.8.3.1
- [PATCH 009/132] libqemuutil: convert to meson, (continued)
- [PATCH 009/132] libqemuutil: convert to meson, Paolo Bonzini, 2019/12/12
- [PATCH 027/132] meson: keymap-gen, Paolo Bonzini, 2019/12/12
- [PATCH 029/132] meson: generate shader headers, Paolo Bonzini, 2019/12/12
- [PATCH 026/132] meson: add virtfs-proxy-helper, Paolo Bonzini, 2019/12/12
- [PATCH 028/132] meson: generate qemu-version.h, Paolo Bonzini, 2019/12/12
- [PATCH 030/132] meson: generate hxtool files, Paolo Bonzini, 2019/12/12
- [PATCH 031/132] meson: configure 50-qemu-gpu.json, Paolo Bonzini, 2019/12/12
- [PATCH 032/132] meson: uncompress edk2 bios, Paolo Bonzini, 2019/12/12
- [PATCH 033/132] build-sys hack: link with whole .fa archives, Paolo Bonzini, 2019/12/12
- [PATCH 035/132] meson: convert authz directory to Meson, Paolo Bonzini, 2019/12/12
- [PATCH 034/132] meson: convert qom directory to Meson,
Paolo Bonzini <=
- [PATCH 036/132] meson: convert crypto directory to Meson, Paolo Bonzini, 2019/12/12
- [PATCH 037/132] meson: convert io directory to Meson, Paolo Bonzini, 2019/12/12
- [PATCH 039/132] meson: add macos dependencies, Paolo Bonzini, 2019/12/12
- [PATCH 038/132] meson: infrastructure for building emulators, Paolo Bonzini, 2019/12/12
- [PATCH 041/132] meson: convert chardev directory to Meson (tools part), Paolo Bonzini, 2019/12/12
- [PATCH 043/132] meson: qemu-{img,io,nbd}, Paolo Bonzini, 2019/12/12
- [PATCH 042/132] meson: convert block, Paolo Bonzini, 2019/12/12
- [PATCH 044/132] meson: qemu-pr-helper, Paolo Bonzini, 2019/12/12
- [PATCH 040/132] meson: add modules infrastructure, Paolo Bonzini, 2019/12/12
- [PATCH 045/132] configure, Makefile; remove TOOLS and HELPERS-y variable, Paolo Bonzini, 2019/12/12