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 # oslib-obj-y is code depending on the OS (win32 vs posix)
26 oslib-obj-y = osdep.o cutils.o qemu-timer-common.o
27 oslib-obj-$(CONFIG_WIN32) += oslib-win32.o qemu-thread-win32.o
28 oslib-obj-$(CONFIG_POSIX) += oslib-posix.o qemu-thread-posix.o
30 #######################################################################
32 coroutine-obj-y = qemu-coroutine.o qemu-coroutine-lock.o qemu-coroutine-io.o
33 coroutine-obj-y += qemu-coroutine-sleep.o
35 # If you change this logic, please also check tests/Makefile
36 ifeq ($(CONFIG_UCONTEXT_COROUTINE),y)
37 coroutine-obj-$(CONFIG_POSIX) += coroutine-ucontext.o
39 ifeq ($(CONFIG_SIGALTSTACK_COROUTINE),y)
40 coroutine-obj-$(CONFIG_POSIX) += coroutine-sigaltstack.o
42 coroutine-obj-$(CONFIG_POSIX) += coroutine-gthread.o
45 coroutine-obj-$(CONFIG_WIN32) += coroutine-win32.o
47 #######################################################################
48 # block-obj-y is code used by both qemu system emulation and qemu-img
50 block-obj-y = iov.o cache-utils.o qemu-option.o module.o async.o
51 block-obj-y += nbd.o block.o blockjob.o aes.o qemu-config.o
52 block-obj-y += thread-pool.o qemu-progress.o qemu-sockets.o uri.o notify.o
53 block-obj-y += $(coroutine-obj-y) $(qobject-obj-y) $(version-obj-y)
54 block-obj-$(CONFIG_POSIX) += event_notifier-posix.o aio-posix.o
55 block-obj-$(CONFIG_WIN32) += event_notifier-win32.o aio-win32.o
57 block-obj-y += $(qapi-obj-y) qapi-types.o qapi-visit.o
59 ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy)
60 # Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add.
61 # only pull in the actual virtio-9p device if we also enabled virtio.
62 CONFIG_REALLY_VIRTFS=y
65 ######################################################################
66 # Target independent part of system emulation. The long term path is to
67 # suppress *all* target specific code in case of system emulation, i.e. a
68 # single QEMU executable should support all CPUs and machines.
70 common-obj-y = $(block-obj-y) blockdev.o blockdev-nbd.o block/
73 common-obj-y += readline.o
74 common-obj-y += $(oslib-obj-y)
75 common-obj-$(CONFIG_WIN32) += os-win32.o
76 common-obj-$(CONFIG_POSIX) += os-posix.o
78 common-obj-$(CONFIG_LINUX) += fsdev/
79 extra-obj-$(CONFIG_LINUX) += fsdev/
81 common-obj-y += tcg-runtime.o host-utils.o main-loop.o
82 common-obj-y += migration.o migration-tcp.o
83 common-obj-y += migration.o migration-tcp.o
84 common-obj-y += qemu-char.o #aio.o
85 common-obj-y += block-migration.o iohandler.o
86 common-obj-y += bitmap.o bitops.o
87 common-obj-y += page_cache.o
89 common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
90 common-obj-$(CONFIG_WIN32) += version.o
92 common-obj-$(CONFIG_SPICE) += spice-qemu-char.o
94 common-obj-y += audio/
99 common-obj-y += bt-host.o bt-vhci.o
101 common-obj-y += dma-helpers.o
102 common-obj-y += acl.o
103 common-obj-$(CONFIG_POSIX) += compatfd.o
104 common-obj-y += qemu-timer.o qemu-timer-common.o
105 common-obj-y += qtest.o
108 common-obj-$(CONFIG_SLIRP) += slirp/
110 common-obj-y += backends/
112 ######################################################################
114 ifeq ($(CONFIG_SECCOMP),y)
115 common-obj-y += qemu-seccomp.o
118 ######################################################################
122 user-obj-y += envlist.o path.o
123 user-obj-y += tcg-runtime.o host-utils.o
124 user-obj-y += cache-utils.o
125 user-obj-y += module.o
126 user-obj-y += qemu-user.o
129 ######################################################################
131 # NOTE: the disassembler code is only needed for debugging
133 universal-obj-y += disas/
135 ######################################################################
138 trace-obj-y += trace/
140 universal-obj-y += $(trace-obj-y)
142 ######################################################################
145 libcacard-y += libcacard/cac.o libcacard/event.o
146 libcacard-y += libcacard/vcard.o libcacard/vreader.o
147 libcacard-y += libcacard/vcard_emul_nss.o
148 libcacard-y += libcacard/vcard_emul_type.o
149 libcacard-y += libcacard/card_7816.o
151 common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y)
153 ######################################################################
157 qapi-obj-y += qapi-types.o qapi-visit.o
159 common-obj-y += qmp-marshal.o qapi-visit.o qapi-types.o
160 common-obj-y += qmp.o hmp.o
162 universal-obj-y += $(qapi-obj-y)
164 ######################################################################
167 qga-obj-y = qga/ module.o qemu-tool.o
168 qga-obj-$(CONFIG_POSIX) += qemu-sockets.o qemu-option.o
170 vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
172 vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
174 QEMU_CFLAGS+=$(GLIB_CFLAGS)
187 dummy := $(call unnest-vars)