[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 027/150] contrib/libvhost-user: convert to Meson
From: |
Paolo Bonzini |
Subject: |
[PATCH 027/150] contrib/libvhost-user: convert to Meson |
Date: |
Mon, 17 Aug 2020 16:35:20 +0200 |
Since libqemuutil.a has been converted to Meson, the conversion is
straightforward.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
Makefile | 16 +++++-----------
Makefile.objs | 1 -
contrib/libvhost-user/Makefile.objs | 1 -
contrib/libvhost-user/meson.build | 3 +++
meson.build | 8 ++++++++
5 files changed, 16 insertions(+), 13 deletions(-)
delete mode 100644 contrib/libvhost-user/Makefile.objs
create mode 100644 contrib/libvhost-user/meson.build
diff --git a/Makefile b/Makefile
index 973e932869..2dee3e89a4 100644
--- a/Makefile
+++ b/Makefile
@@ -307,7 +307,6 @@ dummy := $(call unnest-vars,, \
ivshmem-server-obj-y \
virtiofsd-obj-y \
rdmacm-mux-obj-y \
- libvhost-user-obj-y \
vhost-user-scsi-obj-y \
vhost-user-blk-obj-y \
vhost-user-input-obj-y \
@@ -432,11 +431,6 @@ $(BUILD_DIR)/version.o: $(SRC_PATH)/version.rc
config-host.h
Makefile: $(version-obj-y)
-######################################################################
-# Build libraries
-
-libvhost-user.a: $(libvhost-user-obj-y)
-
######################################################################
COMMON_LDADDS = libqemuutil.a
@@ -535,9 +529,9 @@ ivshmem-client$(EXESUF): $(ivshmem-client-obj-y)
$(COMMON_LDADDS)
ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS)
$(call LINK, $^)
endif
-vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) libvhost-user.a
$(COMMON_LDADDS)
+vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y)
contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS)
$(call LINK, $^)
-vhost-user-blk$(EXESUF): $(vhost-user-blk-obj-y) libvhost-user.a
$(COMMON_LDADDS)
+vhost-user-blk$(EXESUF): $(vhost-user-blk-obj-y)
contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS)
$(call LINK, $^)
rdmacm-mux$(EXESUF): LIBS += "-libumad"
@@ -546,16 +540,16 @@ rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS)
# relies on Linux-specific syscalls
ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy)
-virtiofsd$(EXESUF): $(virtiofsd-obj-y) libvhost-user.a $(COMMON_LDADDS)
+virtiofsd$(EXESUF): $(virtiofsd-obj-y) contrib/libvhost-user/libvhost-user.a
$(COMMON_LDADDS)
$(call LINK, $^)
endif
-vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y) libvhost-user.a
$(COMMON_LDADDS)
+vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y)
contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS)
$(call LINK, $^)
ifdef CONFIG_VHOST_USER_INPUT
ifdef CONFIG_LINUX
-vhost-user-input$(EXESUF): $(vhost-user-input-obj-y) libvhost-user.a
$(COMMON_LDADDS)
+vhost-user-input$(EXESUF): $(vhost-user-input-obj-y)
contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS)
$(call LINK, $^)
# build by default, do not install
diff --git a/Makefile.objs b/Makefile.objs
index e5c9077517..9489864967 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -106,7 +106,6 @@ qga-vss-dll-obj-y = qga/
elf2dmp-obj-y = contrib/elf2dmp/
ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/
ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/
-libvhost-user-obj-y = contrib/libvhost-user/
vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS)
vhost-user-scsi.o-libs := $(LIBISCSI_LIBS)
vhost-user-scsi-obj-y = contrib/vhost-user-scsi/
diff --git a/contrib/libvhost-user/Makefile.objs
b/contrib/libvhost-user/Makefile.objs
deleted file mode 100644
index ef3778edd4..0000000000
--- a/contrib/libvhost-user/Makefile.objs
+++ /dev/null
@@ -1 +0,0 @@
-libvhost-user-obj-y += libvhost-user.o libvhost-user-glib.o
diff --git a/contrib/libvhost-user/meson.build
b/contrib/libvhost-user/meson.build
new file mode 100644
index 0000000000..e68dd1a581
--- /dev/null
+++ b/contrib/libvhost-user/meson.build
@@ -0,0 +1,3 @@
+libvhost_user = static_library('vhost-user',
+ files('libvhost-user.c',
'libvhost-user-glib.c'),
+ build_by_default: false)
diff --git a/meson.build b/meson.build
index d70c98bd9c..00a519edc6 100644
--- a/meson.build
+++ b/meson.build
@@ -239,6 +239,14 @@ libqemuutil = static_library('qemuutil',
qemuutil = declare_dependency(link_with: libqemuutil,
sources: genh + version_res)
+# Other build targets
+
+if have_tools
+ if 'CONFIG_VHOST_USER' in config_host
+ subdir('contrib/libvhost-user')
+ endif
+endif
+
summary_info = {}
summary_info += {'Install prefix': config_host['prefix']}
summary_info += {'BIOS directory': config_host['qemu_datadir']}
--
2.26.2
- [PATCH 016/150] configure: generate Meson cross file, (continued)
- [PATCH 016/150] configure: generate Meson cross file, Paolo Bonzini, 2020/08/17
- [PATCH 017/150] build-sys hack: link with whole .fa archives, Paolo Bonzini, 2020/08/17
- [PATCH 015/150] configure: integrate Meson in the build system, Paolo Bonzini, 2020/08/17
- [PATCH 020/150] meson: enable pie, Paolo Bonzini, 2020/08/17
- [PATCH 018/150] build-sys: add meson submodule, Paolo Bonzini, 2020/08/17
- [PATCH 022/150] meson: add sparse support, Paolo Bonzini, 2020/08/17
- [PATCH 019/150] meson: move summary to meson.build, Paolo Bonzini, 2020/08/17
- [PATCH 021/150] meson: use coverage option, Paolo Bonzini, 2020/08/17
- [PATCH 023/150] meson: add testsuite Makefile generator, Paolo Bonzini, 2020/08/17
- [PATCH 025/150] meson: add remaining generated tcg trace helpers, Paolo Bonzini, 2020/08/17
- [PATCH 027/150] contrib/libvhost-user: convert to Meson,
Paolo Bonzini <=
- [PATCH 028/150] tools/virtiofsd: convert to Meson, Paolo Bonzini, 2020/08/17
- [PATCH 024/150] libqemuutil, qapi, trace: convert to meson, Paolo Bonzini, 2020/08/17
- [PATCH 026/150] meson: add version.o, Paolo Bonzini, 2020/08/17
- [PATCH 029/150] contrib/vhost-user-blk: convert to Meson, Paolo Bonzini, 2020/08/17
- [PATCH 030/150] vhost-user-scsi: add compatibility for libiscsi 1.9.0, Paolo Bonzini, 2020/08/17
- [PATCH 032/150] contrib/rdmacm-mux: convert to Meson, Paolo Bonzini, 2020/08/17
- [PATCH 031/150] contrib/vhost-user-scsi: convert to Meson, Paolo Bonzini, 2020/08/17
- [PATCH 036/150] contrib/elf2dmp: convert to meson, Paolo Bonzini, 2020/08/17
- [PATCH 033/150] contrib/vhost-user-input: convert to meson, Paolo Bonzini, 2020/08/17
- [PATCH 034/150] contrib/vhost-user-gpu: convert to meson, Paolo Bonzini, 2020/08/17