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
16 universal-obj-y += $(qobject-obj-y)
18 #######################################################################
22 universal-obj-y += $(qom-obj-y)
24 #######################################################################
25 # Core hw code (qdev core)
28 universal-obj-y += $(hw-core-obj-y)
30 #######################################################################
31 # util-obj-y is code depending on the OS (win32 vs posix)
32 util-obj-y = osdep.o cutils.o qemu-timer-common.o
33 util-obj-$(CONFIG_WIN32) += oslib-win32.o qemu-thread-win32.o event_notifier-win32.o
34 util-obj-$(CONFIG_POSIX) += oslib-posix.o qemu-thread-posix.o event_notifier-posix.o
35 util-obj-y += envlist.o path.o host-utils.o cache-utils.o module.o
36 util-obj-y += bitmap.o bitops.o
38 util-obj-y += error.o qemu-error.o
39 util-obj-$(CONFIG_POSIX) += compatfd.o
40 util-obj-y += iov.o aes.o qemu-config.o qemu-sockets.o uri.o notify.o
41 util-obj-y += qemu-option.o qemu-progress.o
43 #######################################################################
45 coroutine-obj-y = qemu-coroutine.o qemu-coroutine-lock.o qemu-coroutine-io.o
46 coroutine-obj-y += qemu-coroutine-sleep.o
48 # If you change this logic, please also check tests/Makefile
49 ifeq ($(CONFIG_UCONTEXT_COROUTINE),y)
50 coroutine-obj-$(CONFIG_POSIX) += coroutine-ucontext.o
52 ifeq ($(CONFIG_SIGALTSTACK_COROUTINE),y)
53 coroutine-obj-$(CONFIG_POSIX) += coroutine-sigaltstack.o
55 coroutine-obj-$(CONFIG_POSIX) += coroutine-gthread.o
58 coroutine-obj-$(CONFIG_WIN32) += coroutine-win32.o
60 #######################################################################
61 # block-obj-y is code used by both qemu system emulation and qemu-img
63 block-obj-y = async.o thread-pool.o
64 block-obj-y += nbd.o block.o blockjob.o
65 block-obj-y += $(coroutine-obj-y) $(qobject-obj-y) $(version-obj-y)
66 block-obj-y += main-loop.o iohandler.o qemu-timer.o
67 block-obj-$(CONFIG_POSIX) += aio-posix.o
68 block-obj-$(CONFIG_WIN32) += aio-win32.o
70 block-obj-y += $(qapi-obj-y) qapi-types.o qapi-visit.o
72 ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy)
73 # Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add.
74 # only pull in the actual virtio-9p device if we also enabled virtio.
75 CONFIG_REALLY_VIRTFS=y
78 ######################################################################
79 # Target independent part of system emulation. The long term path is to
80 # suppress *all* target specific code in case of system emulation, i.e. a
81 # single QEMU executable should support all CPUs and machines.
83 common-obj-y = $(block-obj-y) blockdev.o blockdev-nbd.o block/
86 common-obj-y += readline.o
87 common-obj-$(CONFIG_WIN32) += os-win32.o
88 common-obj-$(CONFIG_POSIX) += os-posix.o
90 common-obj-$(CONFIG_LINUX) += fsdev/
91 extra-obj-$(CONFIG_LINUX) += fsdev/
93 common-obj-y += tcg-runtime.o
94 common-obj-y += migration.o migration-tcp.o
95 common-obj-y += qemu-char.o #aio.o
96 common-obj-y += block-migration.o
97 common-obj-y += page_cache.o
99 common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
100 common-obj-$(CONFIG_WIN32) += version.o
102 common-obj-$(CONFIG_SPICE) += spice-qemu-char.o
104 common-obj-y += audio/
109 common-obj-y += bt-host.o bt-vhci.o
111 common-obj-y += dma-helpers.o
112 common-obj-y += qtest.o
115 common-obj-$(CONFIG_SLIRP) += slirp/
117 common-obj-y += backends/
119 ######################################################################
121 ifeq ($(CONFIG_SECCOMP),y)
122 common-obj-y += qemu-seccomp.o
125 ######################################################################
129 user-obj-y += tcg-runtime.o
132 ######################################################################
134 # NOTE: the disassembler code is only needed for debugging
136 universal-obj-y += disas/
138 ######################################################################
141 trace-obj-y += trace/
143 universal-obj-y += $(trace-obj-y)
145 ######################################################################
148 libcacard-y += libcacard/cac.o libcacard/event.o
149 libcacard-y += libcacard/vcard.o libcacard/vreader.o
150 libcacard-y += libcacard/vcard_emul_nss.o
151 libcacard-y += libcacard/vcard_emul_type.o
152 libcacard-y += libcacard/card_7816.o
154 common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y)
156 ######################################################################
160 qapi-obj-y += qapi-types.o qapi-visit.o
162 common-obj-y += qmp-marshal.o qapi-visit.o qapi-types.o
163 common-obj-y += qmp.o hmp.o
165 universal-obj-y += $(qapi-obj-y)
167 ######################################################################
172 vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
174 vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
176 QEMU_CFLAGS+=$(GLIB_CFLAGS)
190 dummy := $(call unnest-vars)