[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 068/150] meson: convert chardev directory to Meson (emulator part
From: |
Paolo Bonzini |
Subject: |
[PATCH 068/150] meson: convert chardev directory to Meson (emulator part) |
Date: |
Fri, 14 Aug 2020 05:12:04 -0400 |
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
Makefile.objs | 2 --
Makefile.target | 2 ++
chardev/Makefile.objs | 10 ----------
chardev/meson.build | 11 +++++++++++
configure | 2 ++
meson.build | 14 ++++++++++++++
6 files changed, 29 insertions(+), 12 deletions(-)
delete mode 100644 chardev/Makefile.objs
diff --git a/Makefile.objs b/Makefile.objs
index eeaa0cfa82..e43526fe5f 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -87,8 +87,6 @@ common-obj-y += dma-helpers.o
common-obj-$(CONFIG_TPM) += tpm.o
common-obj-y += backends/
-common-obj-y += chardev/
-common-obj-m += chardev/
common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS)
diff --git a/Makefile.target b/Makefile.target
index c0575da132..c8c4b70162 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -104,6 +104,7 @@ all: $(PROGS) stap
@true
obj-y += $(LIBQEMU)
+
obj-y += trace/
#########################################################
@@ -167,6 +168,7 @@ LIBS := $(LIBS) @../block.syms @../qemu.syms
ifneq ($(CONFIG_MODULES),y)
LIBS := $(LIBS)
endif
+LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS)
# Hardware support
ifeq ($(TARGET_NAME), sparc64)
diff --git a/chardev/Makefile.objs b/chardev/Makefile.objs
deleted file mode 100644
index 6662d0df41..0000000000
--- a/chardev/Makefile.objs
+++ /dev/null
@@ -1,10 +0,0 @@
-chardev-obj-$(CONFIG_SOFTMMU) += chardev-sysemu.o
-common-obj-$(CONFIG_SOFTMMU) += msmouse.o wctablet.o testdev.o
-
-ifeq ($(CONFIG_BRLAPI),y)
-common-obj-m += baum.o
-baum.o-cflags := $(SDL_CFLAGS)
-baum.o-libs := $(BRLAPI_LIBS)
-endif
-
-common-obj-$(CONFIG_SPICE) += spice.o
diff --git a/chardev/meson.build b/chardev/meson.build
index a2e671ddfc..2122505599 100644
--- a/chardev/meson.build
+++ b/chardev/meson.build
@@ -30,3 +30,14 @@ libchardev = static_library('chardev', chardev_ss.sources(),
build_by_default: false)
chardev = declare_dependency(link_whole: libchardev)
+
+softmmu_ss.add(files('chardev-sysemu.c', 'msmouse.c', 'wctablet.c',
'testdev.c'))
+softmmu_ss.add(when: ['CONFIG_SPICE', spice], if_true: files('spice.c'))
+
+chardev_modules = []
+
+if config_host.has_key('CONFIG_BRLAPI') and config_host.has_key('CONFIG_SDL')
+ chardev_modules += [['baum', files('baum.c'), [sdl, brlapi]]]
+endif
+
+modules += { 'chardev': chardev_modules }
diff --git a/configure b/configure
index 8a3c7aab4b..88f3fb861d 100755
--- a/configure
+++ b/configure
@@ -7344,6 +7344,8 @@ if test "$zlib" != "no" ; then
fi
if test "$spice" = "yes" ; then
echo "CONFIG_SPICE=y" >> $config_host_mak
+ echo "SPICE_CFLAGS=$spice_cflags" >> $config_host_mak
+ echo "SPICE_LIBS=$spice_libs" >> $config_host_mak
fi
if test "$smartcard" = "yes" ; then
diff --git a/meson.build b/meson.build
index 8aff811b9b..3dd1443fa8 100644
--- a/meson.build
+++ b/meson.build
@@ -143,6 +143,11 @@ if 'CONFIG_XKBCOMMON' in config_host
xkbcommon = declare_dependency(compile_args:
config_host['XKBCOMMON_CFLAGS'].split(),
link_args:
config_host['XKBCOMMON_LIBS'].split())
endif
+spice = not_found
+if 'CONFIG_SPICE' in config_host
+ spice = declare_dependency(compile_args: config_host['SPICE_CFLAGS'].split(),
+ link_args: config_host['SPICE_LIBS'].split())
+endif
rt = cc.find_library('rt', required: false)
libmpathpersist = not_found
if config_host.has_key('CONFIG_MPATH')
@@ -177,6 +182,15 @@ libudev = not_found
if 'CONFIG_LIBUDEV' in config_host
libudev = declare_dependency(link_args: config_host['LIBUDEV_LIBS'].split())
endif
+brlapi = not_found
+if 'CONFIG_BRLAPI' in config_host
+ brlapi = declare_dependency(link_args: config_host['BRLAPI_LIBS'].split())
+endif
+sdl = not_found
+if 'CONFIG_SDL' in config_host
+ sdl = declare_dependency(compile_args: config_host['SDL_CFLAGS'].split(),
+ link_args: config_host['SDL_LIBS'].split())
+endif
rbd = not_found
if 'CONFIG_RBD' in config_host
rbd = declare_dependency(link_args: config_host['RBD_LIBS'].split())
--
2.26.2
- [PATCH 057/150] meson: convert authz directory to Meson, (continued)
- [PATCH 057/150] meson: convert authz directory to Meson, Paolo Bonzini, 2020/08/14
- [PATCH 058/150] meson: convert crypto directory to Meson, Paolo Bonzini, 2020/08/14
- [PATCH 051/150] meson: generate hxtool files, Paolo Bonzini, 2020/08/14
- [PATCH 055/150] meson: convert check-qapi-schema, Paolo Bonzini, 2020/08/14
- [PATCH 056/150] meson: convert qom directory to Meson (tools part), Paolo Bonzini, 2020/08/14
- [PATCH 060/150] meson: convert target/s390x/gen-features.h, Paolo Bonzini, 2020/08/14
- [PATCH 063/150] meson: convert chardev directory to Meson (tools part), Paolo Bonzini, 2020/08/14
- [PATCH 065/150] meson: qemu-{img,io,nbd}, Paolo Bonzini, 2020/08/14
- [PATCH 061/150] meson: infrastructure for building emulators, Paolo Bonzini, 2020/08/14
- [PATCH 062/150] meson: add modules infrastructure, Paolo Bonzini, 2020/08/14
- [PATCH 068/150] meson: convert chardev directory to Meson (emulator part),
Paolo Bonzini <=
- [PATCH 069/150] meson: convert tests/qtest to meson, Paolo Bonzini, 2020/08/14
- [PATCH 066/150] meson: qemu-pr-helper, Paolo Bonzini, 2020/08/14
- [PATCH 064/150] meson: convert block, Paolo Bonzini, 2020/08/14
- [PATCH 067/150] configure, Makefile; remove TOOLS and HELPERS-y variable, Paolo Bonzini, 2020/08/14
- [PATCH 072/150] meson: convert root directory to Meson, Paolo Bonzini, 2020/08/14
- [PATCH 076/150] meson: convert common QMP bits for qemu and qemu-storage-daemon, Paolo Bonzini, 2020/08/14
- [PATCH 075/150] meson: convert dump/, Paolo Bonzini, 2020/08/14
- [PATCH 073/150] meson: convert most of softmmu/, Paolo Bonzini, 2020/08/14
- [PATCH 079/150] meson: convert migration directory to Meson, Paolo Bonzini, 2020/08/14
- [PATCH 078/150] meson: convert replay directory to Meson, Paolo Bonzini, 2020/08/14