xref: /openbmc/qemu/chardev/meson.build (revision a68694cd)
1chardev_ss = ss.source_set()
2chardev_ss.add(files(
3  'char-fe.c',
4  'char-file.c',
5  'char-io.c',
6  'char-mux.c',
7  'char-null.c',
8  'char-pipe.c',
9  'char-ringbuf.c',
10  'char-serial.c',
11  'char-socket.c',
12  'char-stdio.c',
13  'char-udp.c',
14  'char.c',
15))
16chardev_ss.add(when: 'CONFIG_POSIX', if_true: files(
17  'char-fd.c',
18  'char-parallel.c',
19  'char-pty.c',
20))
21chardev_ss.add(when: 'CONFIG_WIN32', if_true: files(
22  'char-console.c',
23  'char-win-stdio.c',
24  'char-win.c',
25))
26
27chardev_ss = chardev_ss.apply(config_host, strict: false)
28libchardev = static_library('chardev', chardev_ss.sources() + genh,
29                            name_suffix: 'fa',
30                            build_by_default: false)
31
32chardev = declare_dependency(link_whole: libchardev)
33
34softmmu_ss.add(files('chardev-sysemu.c', 'msmouse.c', 'wctablet.c', 'testdev.c'))
35softmmu_ss.add(when: ['CONFIG_SPICE', spice], if_true: files('spice.c'))
36
37chardev_modules = {}
38
39if config_host.has_key('CONFIG_BRLAPI')
40  module_ss = ss.source_set()
41  module_ss.add(when: [brlapi], if_true: [files('baum.c'), pixman])
42  chardev_modules += { 'baum': module_ss }
43endif
44
45modules += { 'chardev': chardev_modules }
46