xref: /openbmc/qemu/util/meson.build (revision dd84028f)
1util_ss.add(files('osdep.c', 'cutils.c', 'unicode.c', 'qemu-timer-common.c'))
2util_ss.add(files('thread-context.c'), numa)
3if not config_host_data.get('CONFIG_ATOMIC64')
4  util_ss.add(files('atomic64.c'))
5endif
6util_ss.add(when: 'CONFIG_LINUX', if_true: files('async-teardown.c'))
7util_ss.add(when: 'CONFIG_POSIX', if_true: files('aio-posix.c'))
8util_ss.add(when: 'CONFIG_POSIX', if_true: files('fdmon-poll.c'))
9if config_host_data.get('CONFIG_EPOLL_CREATE1')
10  util_ss.add(files('fdmon-epoll.c'))
11endif
12util_ss.add(when: linux_io_uring, if_true: files('fdmon-io_uring.c'))
13util_ss.add(when: 'CONFIG_POSIX', if_true: files('compatfd.c'))
14util_ss.add(when: 'CONFIG_POSIX', if_true: files('event_notifier-posix.c'))
15util_ss.add(when: 'CONFIG_POSIX', if_true: files('mmap-alloc.c'))
16freebsd_dep = []
17if targetos == 'freebsd'
18  freebsd_dep = util
19endif
20util_ss.add(when: 'CONFIG_POSIX', if_true: [files('oslib-posix.c'), freebsd_dep])
21util_ss.add(when: 'CONFIG_POSIX', if_true: files('qemu-thread-posix.c'))
22util_ss.add(when: 'CONFIG_POSIX', if_true: files('memfd.c'))
23util_ss.add(when: 'CONFIG_WIN32', if_true: files('aio-win32.c'))
24util_ss.add(when: 'CONFIG_WIN32', if_true: files('event_notifier-win32.c'))
25util_ss.add(when: 'CONFIG_WIN32', if_true: files('oslib-win32.c'))
26util_ss.add(when: 'CONFIG_WIN32', if_true: files('qemu-thread-win32.c'))
27util_ss.add(when: 'CONFIG_WIN32', if_true: winmm)
28util_ss.add(when: 'CONFIG_WIN32', if_true: pathcch)
29util_ss.add(when: 'HAVE_GLIB_WITH_SLICE_ALLOCATOR', if_true: files('qtree.c'))
30util_ss.add(files('envlist.c', 'path.c', 'module.c'))
31util_ss.add(files('host-utils.c'))
32util_ss.add(files('bitmap.c', 'bitops.c'))
33util_ss.add(files('fifo8.c'))
34util_ss.add(files('cacheflush.c'))
35util_ss.add(files('error.c', 'error-report.c'))
36util_ss.add(files('qemu-print.c'))
37util_ss.add(files('id.c'))
38util_ss.add(files('qemu-config.c', 'notify.c'))
39util_ss.add(files('qemu-option.c', 'qemu-progress.c'))
40util_ss.add(files('keyval.c'))
41util_ss.add(files('crc32c.c'))
42util_ss.add(files('uuid.c'))
43util_ss.add(files('getauxval.c'))
44util_ss.add(files('rcu.c'))
45if have_membarrier
46  util_ss.add(files('sys_membarrier.c'))
47endif
48util_ss.add(files('log.c'))
49util_ss.add(files('qdist.c'))
50util_ss.add(files('qht.c'))
51util_ss.add(files('qsp.c'))
52util_ss.add(files('range.c'))
53util_ss.add(files('stats64.c'))
54util_ss.add(files('systemd.c'))
55util_ss.add(files('transactions.c'))
56util_ss.add(when: 'CONFIG_POSIX', if_true: files('drm.c'))
57util_ss.add(files('guest-random.c'))
58util_ss.add(files('yank.c'))
59util_ss.add(files('int128.c'))
60util_ss.add(files('memalign.c'))
61util_ss.add(files('interval-tree.c'))
62util_ss.add(files('lockcnt.c'))
63
64if have_user
65  util_ss.add(files('selfmap.c'))
66endif
67
68if have_system
69  util_ss.add(files('crc-ccitt.c'))
70  util_ss.add(when: gio, if_true: files('dbus.c'))
71  util_ss.add(when: 'CONFIG_LINUX', if_true: files('userfaultfd.c'))
72endif
73
74if have_block or have_ga
75  util_ss.add(files('aiocb.c', 'async.c'))
76  util_ss.add(files('base64.c'))
77  util_ss.add(files('main-loop.c'))
78  util_ss.add(files('qemu-coroutine.c', 'qemu-coroutine-lock.c', 'qemu-coroutine-io.c'))
79  util_ss.add(files('coroutine-@0@.c'.format(config_host['CONFIG_COROUTINE_BACKEND'])))
80  util_ss.add(files('thread-pool.c', 'qemu-timer.c'))
81  util_ss.add(files('qemu-sockets.c'))
82endif
83if have_block
84  util_ss.add(files('aio-wait.c'))
85  util_ss.add(files('buffer.c'))
86  util_ss.add(files('bufferiszero.c'))
87  util_ss.add(files('hbitmap.c'))
88  util_ss.add(files('hexdump.c'))
89  util_ss.add(files('iova-tree.c'))
90  util_ss.add(files('iov.c', 'uri.c'))
91  util_ss.add(files('nvdimm-utils.c'))
92  util_ss.add(when: 'CONFIG_LINUX', if_true: [
93    files('vhost-user-server.c'), vhost_user
94  ])
95  util_ss.add(files('block-helpers.c'))
96  util_ss.add(files('qemu-coroutine-sleep.c'))
97  util_ss.add(files('qemu-co-shared-resource.c'))
98  util_ss.add(files('qemu-co-timeout.c'))
99  util_ss.add(files('readline.c'))
100  util_ss.add(files('throttle.c'))
101  util_ss.add(files('timed-average.c'))
102  if config_host_data.get('CONFIG_INOTIFY1')
103    util_ss.add(files('filemonitor-inotify.c'))
104  else
105    util_ss.add(files('filemonitor-stub.c'))
106  endif
107  util_ss.add(when: 'CONFIG_LINUX', if_true: files('vfio-helpers.c'))
108endif
109