1 #######################################################################
2 # Common libraries for tools and emulators
4 util-obj-y = util/ qobject/
6 #######################################################################
8 coroutine-obj-y = qemu-coroutine.o qemu-coroutine-lock.o qemu-coroutine-io.o
9 coroutine-obj-y += qemu-coroutine-sleep.o
11 # If you change this logic, please also check tests/Makefile
12 ifeq ($(CONFIG_UCONTEXT_COROUTINE),y)
13 coroutine-obj-$(CONFIG_POSIX) += coroutine-ucontext.o
15 ifeq ($(CONFIG_SIGALTSTACK_COROUTINE),y)
16 coroutine-obj-$(CONFIG_POSIX) += coroutine-sigaltstack.o
18 coroutine-obj-$(CONFIG_POSIX) += coroutine-gthread.o
21 coroutine-obj-$(CONFIG_WIN32) += coroutine-win32.o
23 #######################################################################
24 # block-obj-y is code used by both qemu system emulation and qemu-img
26 block-obj-y = async.o thread-pool.o
27 block-obj-y += nbd.o block.o blockjob.o
28 block-obj-y += $(coroutine-obj-y) $(version-obj-y)
29 block-obj-y += main-loop.o iohandler.o qemu-timer.o
30 block-obj-$(CONFIG_POSIX) += aio-posix.o
31 block-obj-$(CONFIG_WIN32) += aio-win32.o
33 block-obj-y += $(qapi-obj-y) qapi-types.o qapi-visit.o
35 ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy)
36 # Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add.
37 # only pull in the actual virtio-9p device if we also enabled virtio.
38 CONFIG_REALLY_VIRTFS=y
41 ######################################################################
42 # Target independent part of system emulation. The long term path is to
43 # suppress *all* target specific code in case of system emulation, i.e. a
44 # single QEMU executable should support all CPUs and machines.
46 common-obj-y = $(block-obj-y) blockdev.o blockdev-nbd.o block/
48 common-obj-y += readline.o
49 common-obj-$(CONFIG_WIN32) += os-win32.o
50 common-obj-$(CONFIG_POSIX) += os-posix.o
52 common-obj-$(CONFIG_LINUX) += fsdev/
53 extra-obj-$(CONFIG_LINUX) += fsdev/
55 common-obj-y += migration.o migration-tcp.o
56 common-obj-y += qemu-char.o #aio.o
57 common-obj-y += block-migration.o
58 common-obj-y += page_cache.o
60 common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
61 common-obj-$(CONFIG_WIN32) += version.o
63 common-obj-$(CONFIG_SPICE) += spice-qemu-char.o
65 common-obj-y += audio/
70 common-obj-y += bt-host.o bt-vhci.o
72 common-obj-y += dma-helpers.o
73 common-obj-y += qtest.o
76 common-obj-$(CONFIG_SLIRP) += slirp/
78 common-obj-y += backends/
80 ######################################################################
82 ifeq ($(CONFIG_SECCOMP),y)
83 common-obj-y += qemu-seccomp.o
86 ######################################################################
91 ######################################################################
94 libcacard-y += libcacard/cac.o libcacard/event.o
95 libcacard-y += libcacard/vcard.o libcacard/vreader.o
96 libcacard-y += libcacard/vcard_emul_nss.o
97 libcacard-y += libcacard/vcard_emul_type.o
98 libcacard-y += libcacard/card_7816.o
100 common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y)
102 ######################################################################
107 common-obj-y += qmp-marshal.o qapi-visit.o qapi-types.o
108 common-obj-y += qmp.o hmp.o
110 #######################################################################
111 # Target-independent parts used in system and user emulation
113 universal-obj-y += qemu-log.o
114 universal-obj-y += tcg-runtime.o
115 universal-obj-y += hw/
116 universal-obj-y += qom/
117 universal-obj-y += disas/
118 universal-obj-y += $(trace-obj-y)
119 universal-obj-y += $(qapi-obj-y)
120 universal-obj-y += qapi-types.o qapi-visit.o
122 ######################################################################
125 # FIXME: a few definitions from qapi-types.o/qapi-visit.o are needed
126 # by libqemuutil.a. These should be moved to a separate .json schema.
127 qga-obj-y = qga/ qapi-types.o qapi-visit.o
129 vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
131 vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
133 QEMU_CFLAGS+=$(GLIB_CFLAGS)
145 dummy := $(call unnest-vars)