1 #######################################################################
2 # Stub library, linked in tools
5 #######################################################################
6 # Target-independent parts used in system and user emulation
8 universal-obj-y += qemu-log.o
10 #######################################################################
12 qobject-obj-y = qint.o qstring.o qdict.o qlist.o qfloat.o qbool.o
13 qobject-obj-y += qjson.o json-lexer.o json-streamer.o json-parser.o
14 qobject-obj-y += qerror.o error.o qemu-error.o
16 universal-obj-y += $(qobject-obj-y)
18 #######################################################################
22 universal-obj-y += $(qom-obj-y)
24 #######################################################################
25 # Core hw code (qdev core)
27 hw-core-obj-y += qemu-option.o
29 universal-obj-y += $(hw-core-obj-y)
31 #######################################################################
32 # util-obj-y is code depending on the OS (win32 vs posix)
33 util-obj-y = osdep.o cutils.o qemu-timer-common.o
34 util-obj-$(CONFIG_WIN32) += oslib-win32.o qemu-thread-win32.o
35 util-obj-$(CONFIG_POSIX) += oslib-posix.o qemu-thread-posix.o
37 #######################################################################
39 coroutine-obj-y = qemu-coroutine.o qemu-coroutine-lock.o qemu-coroutine-io.o
40 coroutine-obj-y += qemu-coroutine-sleep.o
42 # If you change this logic, please also check tests/Makefile
43 ifeq ($(CONFIG_UCONTEXT_COROUTINE),y)
44 coroutine-obj-$(CONFIG_POSIX) += coroutine-ucontext.o
46 ifeq ($(CONFIG_SIGALTSTACK_COROUTINE),y)
47 coroutine-obj-$(CONFIG_POSIX) += coroutine-sigaltstack.o
49 coroutine-obj-$(CONFIG_POSIX) += coroutine-gthread.o
52 coroutine-obj-$(CONFIG_WIN32) += coroutine-win32.o
54 #######################################################################
55 # block-obj-y is code used by both qemu system emulation and qemu-img
57 block-obj-y = iov.o cache-utils.o qemu-option.o module.o async.o
58 block-obj-y += nbd.o block.o blockjob.o aes.o qemu-config.o
59 block-obj-y += thread-pool.o qemu-progress.o qemu-sockets.o uri.o notify.o
60 block-obj-y += $(coroutine-obj-y) $(qobject-obj-y) $(version-obj-y)
61 block-obj-$(CONFIG_POSIX) += event_notifier-posix.o aio-posix.o
62 block-obj-$(CONFIG_WIN32) += event_notifier-win32.o aio-win32.o
64 block-obj-y += $(qapi-obj-y) qapi-types.o qapi-visit.o
66 ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy)
67 # Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add.
68 # only pull in the actual virtio-9p device if we also enabled virtio.
69 CONFIG_REALLY_VIRTFS=y
72 ######################################################################
73 # Target independent part of system emulation. The long term path is to
74 # suppress *all* target specific code in case of system emulation, i.e. a
75 # single QEMU executable should support all CPUs and machines.
77 common-obj-y = $(block-obj-y) blockdev.o blockdev-nbd.o block/
80 common-obj-y += readline.o
81 common-obj-$(CONFIG_WIN32) += os-win32.o
82 common-obj-$(CONFIG_POSIX) += os-posix.o
84 common-obj-$(CONFIG_LINUX) += fsdev/
85 extra-obj-$(CONFIG_LINUX) += fsdev/
87 common-obj-y += tcg-runtime.o host-utils.o main-loop.o
88 common-obj-y += migration.o migration-tcp.o
89 common-obj-y += migration.o migration-tcp.o
90 common-obj-y += qemu-char.o #aio.o
91 common-obj-y += block-migration.o iohandler.o
92 common-obj-y += bitmap.o bitops.o
93 common-obj-y += page_cache.o
95 common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
96 common-obj-$(CONFIG_WIN32) += version.o
98 common-obj-$(CONFIG_SPICE) += spice-qemu-char.o
100 common-obj-y += audio/
105 common-obj-y += bt-host.o bt-vhci.o
107 common-obj-y += dma-helpers.o
108 common-obj-y += acl.o
109 common-obj-$(CONFIG_POSIX) += compatfd.o
110 common-obj-y += qemu-timer.o qemu-timer-common.o
111 common-obj-y += qtest.o
114 common-obj-$(CONFIG_SLIRP) += slirp/
116 common-obj-y += backends/
118 ######################################################################
120 ifeq ($(CONFIG_SECCOMP),y)
121 common-obj-y += qemu-seccomp.o
124 ######################################################################
128 user-obj-y += envlist.o path.o
129 user-obj-y += tcg-runtime.o host-utils.o
130 user-obj-y += cache-utils.o
131 user-obj-y += module.o
134 ######################################################################
136 # NOTE: the disassembler code is only needed for debugging
138 universal-obj-y += disas/
140 ######################################################################
143 trace-obj-y += trace/
145 universal-obj-y += $(trace-obj-y)
147 ######################################################################
150 libcacard-y += libcacard/cac.o libcacard/event.o
151 libcacard-y += libcacard/vcard.o libcacard/vreader.o
152 libcacard-y += libcacard/vcard_emul_nss.o
153 libcacard-y += libcacard/vcard_emul_type.o
154 libcacard-y += libcacard/card_7816.o
156 common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y)
158 ######################################################################
162 qapi-obj-y += qapi-types.o qapi-visit.o
164 common-obj-y += qmp-marshal.o qapi-visit.o qapi-types.o
165 common-obj-y += qmp.o hmp.o
167 universal-obj-y += $(qapi-obj-y)
169 ######################################################################
172 qga-obj-y = qga/ module.o
173 qga-obj-$(CONFIG_POSIX) += qemu-sockets.o qemu-option.o
175 vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
177 vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
179 QEMU_CFLAGS+=$(GLIB_CFLAGS)
193 dummy := $(call unnest-vars)