[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 052/142] meson: convert chardev directory to Meson (emulator part
From: |
Paolo Bonzini |
Subject: |
[PATCH 052/142] meson: convert chardev directory to Meson (emulator part) |
Date: |
Tue, 28 Jan 2020 18:52:12 +0100 |
Signed-off-by: Marc-André Lureau <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
Makefile.objs | 1 -
Makefile.target | 2 ++
chardev/Makefile.objs | 6 ------
chardev/meson.build | 4 ++++
configure | 2 ++
meson.build | 14 ++++++++++++++
6 files changed, 22 insertions(+), 7 deletions(-)
delete mode 100644 chardev/Makefile.objs
diff --git a/Makefile.objs b/Makefile.objs
index bad4cb450a..32822e3c7e 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -75,7 +75,6 @@ vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
common-obj-$(CONFIG_TPM) += tpm.o
common-obj-y += backends/
-common-obj-y += chardev/
common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS)
diff --git a/Makefile.target b/Makefile.target
index 779a88bf8d..d98e956e42 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -104,6 +104,7 @@ all: $(PROGS) stap
@true
obj-y += $(LIBQEMU)
+
obj-y += trace/
#########################################################
@@ -168,6 +169,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 8049d82077..0000000000
--- a/chardev/Makefile.objs
+++ /dev/null
@@ -1,6 +0,0 @@
-common-obj-y += msmouse.o wctablet.o testdev.o
-common-obj-$(CONFIG_BRLAPI) += baum.o
-baum.o-cflags := $(SDL_CFLAGS)
-baum.o-libs := $(BRLAPI_LIBS)
-
-common-obj-$(CONFIG_SPICE) += spice.o
diff --git a/chardev/meson.build b/chardev/meson.build
index a2e671ddfc..6d5792cde6 100644
--- a/chardev/meson.build
+++ b/chardev/meson.build
@@ -30,3 +30,7 @@ libchardev = static_library('chardev', chardev_ss.sources(),
build_by_default: false)
chardev = declare_dependency(link_whole: libchardev)
+
+softmmu_ss.add(files('msmouse.c', 'wctablet.c', 'testdev.c'))
+softmmu_ss.add(when: ['CONFIG_SDL', 'CONFIG_BRLAPI', sdl, brlapi], if_true:
files('baum.c'))
+softmmu_ss.add(when: ['CONFIG_SPICE', spice], if_true: files('spice.c'))
diff --git a/configure b/configure
index a9919d5c58..1dd48e4f8b 100755
--- a/configure
+++ b/configure
@@ -7083,6 +7083,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 d4f4ccbee7..4c42df980f 100644
--- a/meson.build
+++ b/meson.build
@@ -111,6 +111,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 = declare_dependency()
+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 = declare_dependency()
if config_host.has_key('CONFIG_MPATH')
@@ -140,6 +145,15 @@ libudev = declare_dependency()
if 'CONFIG_LIBUDEV' in config_host
libudev = declare_dependency(link_args: config_host['LIBUDEV_LIBS'].split())
endif
+brlapi = declare_dependency()
+if 'CONFIG_BRLAPI' in config_host
+ brlapi = declare_dependency(link_args: config_host['BRLAPI_LIBS'].split())
+endif
+sdl = declare_dependency()
+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 = declare_dependency()
if 'CONFIG_RBD' in config_host
rbd = declare_dependency(link_args: config_host['RBD_LIBS'].split())
--
2.21.0
- [PATCH 041/142] meson: convert crypto directory to Meson, (continued)
- [PATCH 041/142] meson: convert crypto directory to Meson, Paolo Bonzini, 2020/01/28
- [PATCH 037/142] meson: uncompress edk2 bios, Paolo Bonzini, 2020/01/28
- [PATCH 042/142] meson: convert io directory to Meson, Paolo Bonzini, 2020/01/28
- [PATCH 043/142] meson: convert target/s390x/gen-features.h, Paolo Bonzini, 2020/01/28
- [PATCH 045/142] meson: add macos dependencies, Paolo Bonzini, 2020/01/28
- [PATCH 044/142] meson: infrastructure for building emulators, Paolo Bonzini, 2020/01/28
- [PATCH 046/142] meson: add modules infrastructure, Paolo Bonzini, 2020/01/28
- [PATCH 047/142] meson: convert chardev directory to Meson (tools part), Paolo Bonzini, 2020/01/28
- [PATCH 048/142] meson: convert block, Paolo Bonzini, 2020/01/28
- [PATCH 049/142] meson: qemu-{img,io,nbd}, Paolo Bonzini, 2020/01/28
- [PATCH 052/142] meson: convert chardev directory to Meson (emulator part),
Paolo Bonzini <=
- [PATCH 050/142] meson: qemu-pr-helper, Paolo Bonzini, 2020/01/28
- [PATCH 051/142] configure, Makefile; remove TOOLS and HELPERS-y variable, Paolo Bonzini, 2020/01/28
- [PATCH 053/142] meson: convert audio directory to Meson, Paolo Bonzini, 2020/01/28
- [PATCH 054/142] meson: convert ui directory to Meson, Paolo Bonzini, 2020/01/28
- [PATCH 055/142] meson: convert root directory to Meson, Paolo Bonzini, 2020/01/28
- [PATCH 057/142] meson: convert qom/, Paolo Bonzini, 2020/01/28
- [PATCH 056/142] meson: convert trace/, Paolo Bonzini, 2020/01/28
- [PATCH 058/142] meson: convert block/, Paolo Bonzini, 2020/01/28
- [PATCH 059/142] meson: convert dump/, Paolo Bonzini, 2020/01/28
- [PATCH 060/142] meson: convert monitor directory to Meson, Paolo Bonzini, 2020/01/28