1 #######################################################################
2 # Common libraries for tools and emulators
4 util-obj-y = util/ qobject/ qapi/ trace/
6 #######################################################################
7 # block-obj-y is code used by both qemu system emulation and qemu-img
9 block-obj-y = async.o thread-pool.o
10 block-obj-y += nbd.o block.o blockjob.o
11 block-obj-y += main-loop.o iohandler.o qemu-timer.o
12 block-obj-$(CONFIG_POSIX) += aio-posix.o
13 block-obj-$(CONFIG_WIN32) += aio-win32.o
15 block-obj-y += qapi-types.o qapi-visit.o
17 block-obj-y += qemu-coroutine.o qemu-coroutine-lock.o qemu-coroutine-io.o
18 block-obj-y += qemu-coroutine-sleep.o
19 ifeq ($(CONFIG_UCONTEXT_COROUTINE),y)
20 block-obj-$(CONFIG_POSIX) += coroutine-ucontext.o
22 ifeq ($(CONFIG_SIGALTSTACK_COROUTINE),y)
23 block-obj-$(CONFIG_POSIX) += coroutine-sigaltstack.o
25 block-obj-$(CONFIG_POSIX) += coroutine-gthread.o
28 block-obj-$(CONFIG_WIN32) += coroutine-win32.o
30 ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy)
31 # Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add.
32 # only pull in the actual virtio-9p device if we also enabled virtio.
33 CONFIG_REALLY_VIRTFS=y
36 ######################################################################
37 # Target independent part of system emulation. The long term path is to
38 # suppress *all* target specific code in case of system emulation, i.e. a
39 # single QEMU executable should support all CPUs and machines.
41 common-obj-y = $(block-obj-y) blockdev.o blockdev-nbd.o block/
43 common-obj-y += readline.o
44 common-obj-$(CONFIG_WIN32) += os-win32.o
45 common-obj-$(CONFIG_POSIX) += os-posix.o
47 common-obj-$(CONFIG_LINUX) += fsdev/
48 extra-obj-$(CONFIG_LINUX) += fsdev/
50 common-obj-y += migration.o migration-tcp.o
51 common-obj-y += qemu-char.o #aio.o
52 common-obj-y += block-migration.o
53 common-obj-y += page_cache.o
55 common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
57 common-obj-$(CONFIG_SPICE) += spice-qemu-char.o
59 common-obj-y += audio/
64 common-obj-y += bt-host.o bt-vhci.o
66 common-obj-y += dma-helpers.o
67 common-obj-y += qtest.o
70 common-obj-$(CONFIG_SLIRP) += slirp/
72 common-obj-y += backends/
74 ######################################################################
76 ifeq ($(CONFIG_SECCOMP),y)
77 common-obj-y += qemu-seccomp.o
80 ######################################################################
83 libcacard-y += libcacard/cac.o libcacard/event.o
84 libcacard-y += libcacard/vcard.o libcacard/vreader.o
85 libcacard-y += libcacard/vcard_emul_nss.o
86 libcacard-y += libcacard/vcard_emul_type.o
87 libcacard-y += libcacard/card_7816.o
89 common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y)
91 ######################################################################
94 common-obj-y += qmp-marshal.o qapi-visit.o qapi-types.o
95 common-obj-y += qmp.o hmp.o
97 #######################################################################
98 # Target-independent parts used in system and user emulation
100 universal-obj-y += qemu-log.o
101 universal-obj-y += tcg-runtime.o
102 universal-obj-y += hw/
103 universal-obj-y += qom/
104 universal-obj-y += disas/
106 ######################################################################
109 # FIXME: a few definitions from qapi-types.o/qapi-visit.o are needed
110 # by libqemuutil.a. These should be moved to a separate .json schema.
111 qga-obj-y = qga/ qapi-types.o qapi-visit.o
113 vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
115 vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
117 QEMU_CFLAGS+=$(GLIB_CFLAGS)
127 dummy := $(call unnest-vars)