[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 021/142] contrib/vhost-user-gpu: convert to meson
From: |
Paolo Bonzini |
Subject: |
[PATCH 021/142] contrib/vhost-user-gpu: convert to meson |
Date: |
Tue, 28 Jan 2020 18:51:41 +0100 |
From: Marc-André Lureau <address@hidden>
Signed-off-by: Marc-André Lureau <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
Makefile | 5 -----
Makefile.objs | 1 -
contrib/vhost-user-gpu/Makefile.objs | 10 ----------
contrib/vhost-user-gpu/meson.build | 5 +++++
meson.build | 15 +++++++++++++++
5 files changed, 20 insertions(+), 16 deletions(-)
delete mode 100644 contrib/vhost-user-gpu/Makefile.objs
create mode 100644 contrib/vhost-user-gpu/meson.build
diff --git a/Makefile b/Makefile
index 8b999e7f42..5c000b2a2f 100644
--- a/Makefile
+++ b/Makefile
@@ -186,7 +186,6 @@ HELPERS-y =
HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) =
qemu-bridge-helper$(EXESUF)
ifeq ($(CONFIG_LINUX)$(CONFIG_VIRGL)$(CONFIG_GBM)$(CONFIG_TOOLS),yyyy)
-HELPERS-y += vhost-user-gpu$(EXESUF)
vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json
endif
@@ -289,7 +288,6 @@ dummy := $(call unnest-vars,, \
elf2dmp-obj-y \
ivshmem-client-obj-y \
ivshmem-server-obj-y \
- vhost-user-gpu-obj-y \
qga-vss-dll-obj-y \
block-obj-y \
block-obj-m \
@@ -497,9 +495,6 @@ ivshmem-server$(EXESUF): $(ivshmem-server-obj-y)
$(COMMON_LDADDS)
$(call LINK, $^)
endif
-vhost-user-gpu$(EXESUF): $(vhost-user-gpu-obj-y)
contrib/libvhost-user/libvhost-user.a $(COMMON_LDADDS)
- $(call LINK, $^)
-
module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak
$(call quiet-command,$(PYTHON) $< $@ \
$(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \
diff --git a/Makefile.objs b/Makefile.objs
index aa5ca99c28..2f375be444 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -108,6 +108,5 @@ 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/
-vhost-user-gpu-obj-y = contrib/vhost-user-gpu/
######################################################################
diff --git a/contrib/vhost-user-gpu/Makefile.objs
b/contrib/vhost-user-gpu/Makefile.objs
deleted file mode 100644
index 6170c919e4..0000000000
--- a/contrib/vhost-user-gpu/Makefile.objs
+++ /dev/null
@@ -1,10 +0,0 @@
-vhost-user-gpu-obj-y = main.o virgl.o vugbm.o
-
-main.o-cflags := $(PIXMAN_CFLAGS) $(GBM_CFLAGS)
-main.o-libs := $(PIXMAN_LIBS)
-
-virgl.o-cflags := $(VIRGL_CFLAGS) $(GBM_CFLAGS)
-virgl.o-libs := $(VIRGL_LIBS)
-
-vugbm.o-cflags := $(GBM_CFLAGS)
-vugbm.o-libs := $(GBM_LIBS)
diff --git a/contrib/vhost-user-gpu/meson.build
b/contrib/vhost-user-gpu/meson.build
new file mode 100644
index 0000000000..8778aa79de
--- /dev/null
+++ b/contrib/vhost-user-gpu/meson.build
@@ -0,0 +1,5 @@
+if 'CONFIG_VIRGL' in config_host and 'CONFIG_GBM' in config_host
+ executable('vhost-user-gpu', files('main.c', 'virgl.c', 'vugbm.c'),
+ link_with: libvhost_user,
+ dependencies: [qemuutil, pixman, gbm, virgl])
+endif
diff --git a/meson.build b/meson.build
index f56f8b3897..6613eae7e2 100644
--- a/meson.build
+++ b/meson.build
@@ -52,11 +52,23 @@ if 'CONFIG_GNUTLS' in config_host
gnutls = declare_dependency(compile_args:
config_host['GNUTLS_CFLAGS'].split(),
link_args: config_host['GNUTLS_LIBS'].split())
endif
+pixman = declare_dependency(compile_args: config_host['PIXMAN_CFLAGS'].split(),
+ link_args: config_host['PIXMAN_LIBS'].split())
libiscsi = declare_dependency()
if 'CONFIG_LIBISCSI' in config_host
libiscsi = declare_dependency(compile_args:
config_host['LIBISCSI_CFLAGS'].split(),
link_args:
config_host['LIBISCSI_LIBS'].split())
endif
+gbm = declare_dependency()
+if 'CONFIG_GBM' in config_host
+ gbm = declare_dependency(compile_args: config_host['GBM_CFLAGS'].split(),
+ link_args: config_host['GBM_LIBS'].split())
+endif
+virgl = declare_dependency()
+if 'CONFIG_VIRGL' in config_host
+ virgl = declare_dependency(compile_args: config_host['VIRGL_CFLAGS'].split(),
+ link_args: config_host['VIRGL_LIBS'].split())
+endif
target_dirs = config_host['TARGET_DIRS'].split()
have_user = false
@@ -201,6 +213,9 @@ if have_tools
if 'CONFIG_VHOST_USER' in config_host
subdir('contrib/libvhost-user')
subdir('contrib/vhost-user-blk')
+ if 'CONFIG_LINUX' in config_host
+ subdir('contrib/vhost-user-gpu')
+ endif
subdir('contrib/vhost-user-input')
subdir('contrib/vhost-user-scsi')
endif
--
2.21.0
- [PATCH 011/142] meson: use coverage option, (continued)
- [PATCH 011/142] meson: use coverage option, Paolo Bonzini, 2020/01/28
- [PATCH 012/142] meson: add testsuite Makefile generator, Paolo Bonzini, 2020/01/28
- [PATCH 014/142] meson: add remaining generated tcg trace helpers, Paolo Bonzini, 2020/01/28
- [PATCH 016/142] contrib/libvhost-user: convert to Meson, Paolo Bonzini, 2020/01/28
- [PATCH 015/142] meson: add version.o, Paolo Bonzini, 2020/01/28
- [PATCH 017/142] contrib/vhost-user-blk: convert to Meson, Paolo Bonzini, 2020/01/28
- [PATCH 018/142] contrib/vhost-user-scsi: convert to Meson, Paolo Bonzini, 2020/01/28
- [PATCH 019/142] contrib/rdmacm-mux: convert to Meson, Paolo Bonzini, 2020/01/28
- [PATCH 020/142] contrib/vhost-user-input: convert to meson, Paolo Bonzini, 2020/01/28
- [PATCH 013/142] libqemuutil: convert to meson, Paolo Bonzini, 2020/01/28
- [PATCH 021/142] contrib/vhost-user-gpu: convert to meson,
Paolo Bonzini <=
- [PATCH 022/142] contrib/ivshmem: convert to meson, Paolo Bonzini, 2020/01/28
- [PATCH 023/142] contrib/elf2dmp: convert to meson, Paolo Bonzini, 2020/01/28
- [PATCH 024/142] meson: convert qemu-ga, Paolo Bonzini, 2020/01/28
- [PATCH 025/142] meson: convert vss-win32, Paolo Bonzini, 2020/01/28
- [PATCH 026/142] meson: add msi generation, Paolo Bonzini, 2020/01/28
- [PATCH 027/142] meson: convert dummy Windows qga/qemu-ga target, Paolo Bonzini, 2020/01/28
- [PATCH 028/142] meson: add qemu-bridge-helper, Paolo Bonzini, 2020/01/28
- [PATCH 029/142] meson: add qemu-keymap, Paolo Bonzini, 2020/01/28
- [PATCH 030/142] meson: add qemu-edid, Paolo Bonzini, 2020/01/28
- [PATCH 031/142] meson: add virtfs-proxy-helper, Paolo Bonzini, 2020/01/28