]> git.proxmox.com Git - qemu.git/blob - Makefile.objs
build: move libqemuutil.a components to util/
[qemu.git] / Makefile.objs
1 #######################################################################
2 # Stub library, linked in tools
3 stub-obj-y = stubs/
4
5 #######################################################################
6 # Target-independent parts used in system and user emulation
7 universal-obj-y =
8 universal-obj-y += qemu-log.o
9
10 #######################################################################
11 # QObject
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
15
16 universal-obj-y += $(qobject-obj-y)
17
18 #######################################################################
19 # QOM
20 qom-obj-y = qom/
21
22 universal-obj-y += $(qom-obj-y)
23
24 #######################################################################
25 # Core hw code (qdev core)
26 hw-core-obj-y += hw/
27
28 universal-obj-y += $(hw-core-obj-y)
29
30 #######################################################################
31 # util-obj-y is code depending on the OS (win32 vs posix)
32 util-obj-y += util/
33
34 #######################################################################
35 # coroutines
36 coroutine-obj-y = qemu-coroutine.o qemu-coroutine-lock.o qemu-coroutine-io.o
37 coroutine-obj-y += qemu-coroutine-sleep.o
38
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
42 else
43 ifeq ($(CONFIG_SIGALTSTACK_COROUTINE),y)
44 coroutine-obj-$(CONFIG_POSIX) += coroutine-sigaltstack.o
45 else
46 coroutine-obj-$(CONFIG_POSIX) += coroutine-gthread.o
47 endif
48 endif
49 coroutine-obj-$(CONFIG_WIN32) += coroutine-win32.o
50
51 #######################################################################
52 # block-obj-y is code used by both qemu system emulation and qemu-img
53
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
60 block-obj-y += block/
61 block-obj-y += $(qapi-obj-y) qapi-types.o qapi-visit.o
62
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
67 endif
68
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.
73
74 common-obj-y = $(block-obj-y) blockdev.o blockdev-nbd.o block/
75 common-obj-y += net/
76 common-obj-y += qom/
77 common-obj-y += readline.o
78 common-obj-$(CONFIG_WIN32) += os-win32.o
79 common-obj-$(CONFIG_POSIX) += os-posix.o
80
81 common-obj-$(CONFIG_LINUX) += fsdev/
82 extra-obj-$(CONFIG_LINUX) += fsdev/
83
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
89
90 common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
91 common-obj-$(CONFIG_WIN32) += version.o
92
93 common-obj-$(CONFIG_SPICE) += spice-qemu-char.o
94
95 common-obj-y += audio/
96 common-obj-y += hw/
97 extra-obj-y += hw/
98
99 common-obj-y += ui/
100 common-obj-y += bt-host.o bt-vhci.o
101
102 common-obj-y += dma-helpers.o
103 common-obj-y += qtest.o
104 common-obj-y += vl.o
105
106 common-obj-$(CONFIG_SLIRP) += slirp/
107
108 common-obj-y += backends/
109
110 ######################################################################
111 # libseccomp
112 ifeq ($(CONFIG_SECCOMP),y)
113 common-obj-y += qemu-seccomp.o
114 endif
115
116 ######################################################################
117 # libuser
118
119 user-obj-y =
120 user-obj-y += tcg-runtime.o
121 user-obj-y += qom/
122
123 ######################################################################
124 # disassemblers
125 # NOTE: the disassembler code is only needed for debugging
126
127 universal-obj-y += disas/
128
129 ######################################################################
130 # trace
131
132 trace-obj-y += trace/
133
134 universal-obj-y += $(trace-obj-y)
135
136 ######################################################################
137 # smartcard
138
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
144
145 common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y)
146
147 ######################################################################
148 # qapi
149
150 qapi-obj-y = qapi/
151 qapi-obj-y += qapi-types.o qapi-visit.o
152
153 common-obj-y += qmp-marshal.o qapi-visit.o qapi-types.o
154 common-obj-y += qmp.o hmp.o
155
156 universal-obj-y += $(qapi-obj-y)
157
158 ######################################################################
159 # guest agent
160
161 qga-obj-y = qga/
162
163 vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
164
165 vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
166
167 QEMU_CFLAGS+=$(GLIB_CFLAGS)
168
169 nested-vars += \
170 stub-obj-y \
171 util-obj-y \
172 qga-obj-y \
173 qom-obj-y \
174 qapi-obj-y \
175 block-obj-y \
176 user-obj-y \
177 common-obj-y \
178 universal-obj-y \
179 hw-core-obj-y \
180 extra-obj-y \
181 trace-obj-y
182 dummy := $(call unnest-vars)