aboutsummaryrefslogtreecommitdiff
path: root/chardev
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-07-29 15:40:07 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-08-21 06:30:19 -0400
commit2634733c6bfcb803a6b8f107a8ed1f3c598b0a47 (patch)
tree40f1ef0b450be1c1bb1c955194d408e16246e7e0 /chardev
parentc3a0ee847a571095fa3c81c4c5352f85f42d9fb6 (diff)
meson: convert chardev directory to Meson (emulator part)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'chardev')
-rw-r--r--chardev/Makefile.objs10
-rw-r--r--chardev/meson.build13
2 files changed, 13 insertions, 10 deletions
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 9d99025a14..02f914d6c0 100644
--- a/chardev/meson.build
+++ b/chardev/meson.build
@@ -30,3 +30,16 @@ libchardev = static_library('chardev', chardev_ss.sources() + genh,
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')
+ module_ss = ss.source_set()
+ module_ss.add(when: [sdl, brlapi], if_true: files('baum.c'))
+ chardev_modules += { 'brlapi': module_ss }
+endif
+
+modules += { 'chardev': chardev_modules }