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)
34 #######################################################################
36 coroutine-obj-y = qemu-coroutine.o qemu-coroutine-lock.o qemu-coroutine-io.o
37 coroutine-obj-y += qemu-coroutine-sleep.o
39 # If you change this logic, please also check tests/Makefile
40 ifeq ($(CONFIG_UCONTEXT_COROUTINE),y)
41 coroutine-obj-$(CONFIG_POSIX) += coroutine-ucontext.o
43 ifeq ($(CONFIG_SIGALTSTACK_COROUTINE),y)
44 coroutine-obj-$(CONFIG_POSIX) += coroutine-sigaltstack.o
46 coroutine-obj-$(CONFIG_POSIX) += coroutine-gthread.o
49 coroutine-obj-$(CONFIG_WIN32) += coroutine-win32.o
51 #######################################################################
52 # block-obj-y is code used by both qemu system emulation and qemu-img
54 block-obj-y = async.o thread-pool.o
55 block-obj-y += nbd.o block.o blockjob.o
56 block-obj-y += $(coroutine-obj-y) $(qobject-obj-y) $(version-obj-y)
57 block-obj-y += main-loop.o iohandler.o qemu-timer.o
58 block-obj-$(CONFIG_POSIX) += aio-posix.o
59 block-obj-$(CONFIG_WIN32) += aio-win32.o
61 block-obj-y += $(qapi-obj-y) qapi-types.o qapi-visit.o
63 ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy)
64 # Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add.
65 # only pull in the actual virtio-9p device if we also enabled virtio.
66 CONFIG_REALLY_VIRTFS=y
69 ######################################################################
70 # Target independent part of system emulation. The long term path is to
71 # suppress *all* target specific code in case of system emulation, i.e. a
72 # single QEMU executable should support all CPUs and machines.
74 common-obj-y = $(block-obj-y) blockdev.o blockdev-nbd.o block/
77 common-obj-y += readline.o
78 common-obj-$(CONFIG_WIN32) += os-win32.o
79 common-obj-$(CONFIG_POSIX) += os-posix.o
81 common-obj-$(CONFIG_LINUX) += fsdev/
82 extra-obj-$(CONFIG_LINUX) += fsdev/
84 common-obj-y += tcg-runtime.o
85 common-obj-y += migration.o migration-tcp.o
86 common-obj-y += qemu-char.o #aio.o
87 common-obj-y += block-migration.o
88 common-obj-y += page_cache.o
90 common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
91 common-obj-$(CONFIG_WIN32) += version.o
93 common-obj-$(CONFIG_SPICE) += spice-qemu-char.o
95 common-obj-y += audio/
100 common-obj-y += bt-host.o bt-vhci.o
102 common-obj-y += dma-helpers.o
103 common-obj-y += qtest.o
106 common-obj-$(CONFIG_SLIRP) += slirp/
108 common-obj-y += backends/
110 ######################################################################
112 ifeq ($(CONFIG_SECCOMP),y)
113 common-obj-y += qemu-seccomp.o
116 ######################################################################
120 user-obj-y += tcg-runtime.o
123 ######################################################################
125 # NOTE: the disassembler code is only needed for debugging
127 universal-obj-y += disas/
129 ######################################################################
132 trace-obj-y += trace/
134 universal-obj-y += $(trace-obj-y)
136 ######################################################################
139 libcacard-y += libcacard/cac.o libcacard/event.o
140 libcacard-y += libcacard/vcard.o libcacard/vreader.o
141 libcacard-y += libcacard/vcard_emul_nss.o
142 libcacard-y += libcacard/vcard_emul_type.o
143 libcacard-y += libcacard/card_7816.o
145 common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y)
147 ######################################################################
151 qapi-obj-y += qapi-types.o qapi-visit.o
153 common-obj-y += qmp-marshal.o qapi-visit.o qapi-types.o
154 common-obj-y += qmp.o hmp.o
156 universal-obj-y += $(qapi-obj-y)
158 ######################################################################
163 vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
165 vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
167 QEMU_CFLAGS+=$(GLIB_CFLAGS)
182 dummy := $(call unnest-vars)