Makefile.objs 5.79 KB
Newer Older
1
2
3
4
#######################################################################
# Stub library, linked in tools
stub-obj-y = stubs/

5
6
7
#######################################################################
# Target-independent parts used in system and user emulation
universal-obj-y =
8
universal-obj-y += qemu-log.o
9

10
11
12
13
#######################################################################
# QObject
qobject-obj-y = qint.o qstring.o qdict.o qlist.o qfloat.o qbool.o
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
15

16
17
18
19
universal-obj-y += $(qobject-obj-y)

#######################################################################
# QOM
20
qom-obj-y = qom/
21
22
23

universal-obj-y += $(qom-obj-y)

24
25
26
27
28
29
30
#######################################################################
# Core hw code (qdev core)
hw-core-obj-y += hw/
hw-core-obj-y += qemu-option.o

universal-obj-y += $(hw-core-obj-y)

31
32
#######################################################################
# oslib-obj-y is code depending on the OS (win32 vs posix)
33
oslib-obj-y = osdep.o cutils.o qemu-timer-common.o
34
35
oslib-obj-$(CONFIG_WIN32) += oslib-win32.o qemu-thread-win32.o
oslib-obj-$(CONFIG_POSIX) += oslib-posix.o qemu-thread-posix.o
36

Kevin Wolf's avatar
Kevin Wolf committed
37
38
#######################################################################
# coroutines
39
coroutine-obj-y = qemu-coroutine.o qemu-coroutine-lock.o qemu-coroutine-io.o
40
coroutine-obj-y += qemu-coroutine-sleep.o
Blue Swirl's avatar
Blue Swirl committed
41
42

# If you change this logic, please also check tests/Makefile
43
ifeq ($(CONFIG_UCONTEXT_COROUTINE),y)
Kevin Wolf's avatar
Kevin Wolf committed
44
coroutine-obj-$(CONFIG_POSIX) += coroutine-ucontext.o
45
else
46
47
48
ifeq ($(CONFIG_SIGALTSTACK_COROUTINE),y)
coroutine-obj-$(CONFIG_POSIX) += coroutine-sigaltstack.o
else
49
50
coroutine-obj-$(CONFIG_POSIX) += coroutine-gthread.o
endif
51
endif
Kevin Wolf's avatar
Kevin Wolf committed
52
53
coroutine-obj-$(CONFIG_WIN32) += coroutine-win32.o

54
55
56
#######################################################################
# block-obj-y is code used by both qemu system emulation and qemu-img

57
block-obj-y = iov.o cache-utils.o qemu-option.o module.o async.o
Paolo Bonzini's avatar
Paolo Bonzini committed
58
block-obj-y += nbd.o block.o blockjob.o aes.o qemu-config.o
59
block-obj-y += thread-pool.o qemu-progress.o qemu-sockets.o uri.o notify.o
60
block-obj-y += $(coroutine-obj-y) $(qobject-obj-y) $(version-obj-y)
Paolo Bonzini's avatar
Paolo Bonzini committed
61
62
block-obj-$(CONFIG_POSIX) += event_notifier-posix.o aio-posix.o
block-obj-$(CONFIG_WIN32) += event_notifier-win32.o aio-win32.o
63
block-obj-y += block/
64
block-obj-y += $(qapi-obj-y) qapi-types.o qapi-visit.o
65

66
ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy)
Paul Brook's avatar
Paul Brook committed
67
68
69
70
# Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add.
# only pull in the actual virtio-9p device if we also enabled virtio.
CONFIG_REALLY_VIRTFS=y
endif
71

72
######################################################################
73
74
75
# Target independent part of system emulation. The long term path is to
# suppress *all* target specific code in case of system emulation, i.e. a
# single QEMU executable should support all CPUs and machines.
76

Paolo Bonzini's avatar
Paolo Bonzini committed
77
common-obj-y = $(block-obj-y) blockdev.o blockdev-nbd.o block/
Paolo Bonzini's avatar
Paolo Bonzini committed
78
common-obj-y += net/
79
common-obj-y += qom/
80
common-obj-y += readline.o
81
common-obj-y += $(oslib-obj-y)
82
83
common-obj-$(CONFIG_WIN32) += os-win32.o
common-obj-$(CONFIG_POSIX) += os-posix.o
Gerd Hoffmann's avatar
Gerd Hoffmann committed
84

85
86
87
common-obj-$(CONFIG_LINUX) += fsdev/
extra-obj-$(CONFIG_LINUX) += fsdev/

Paolo Bonzini's avatar
Paolo Bonzini committed
88
common-obj-y += tcg-runtime.o host-utils.o main-loop.o
89
90
common-obj-y += migration.o migration-tcp.o
common-obj-y += migration.o migration-tcp.o
91
common-obj-y += qemu-char.o #aio.o
92
common-obj-y += block-migration.o iohandler.o
93
common-obj-y += bitmap.o bitops.o
Orit Wasserman's avatar
Orit Wasserman committed
94
common-obj-y += page_cache.o
95
96

common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
97
common-obj-$(CONFIG_WIN32) += version.o
98

99
common-obj-$(CONFIG_SPICE) += spice-qemu-char.o
100
101

common-obj-y += audio/
102
common-obj-y += hw/
103
104
extra-obj-y += hw/

105
common-obj-y += ui/
106
common-obj-y += bt-host.o bt-vhci.o
107

Stefan Weil's avatar
Stefan Weil committed
108
common-obj-y += dma-helpers.o
109
common-obj-y += acl.o
110
common-obj-$(CONFIG_POSIX) += compatfd.o
111
common-obj-y += qemu-timer.o qemu-timer-common.o
Stefan Weil's avatar
Stefan Weil committed
112
113
common-obj-y += qtest.o
common-obj-y += vl.o
114

115
common-obj-$(CONFIG_SLIRP) += slirp/
116

117
118
common-obj-y += backends/

119
120
121
122
123
124
######################################################################
# libseccomp
ifeq ($(CONFIG_SECCOMP),y)
common-obj-y += qemu-seccomp.o
endif

125
126
127
128
129
130
######################################################################
# libuser

user-obj-y =
user-obj-y += envlist.o path.o
user-obj-y += tcg-runtime.o host-utils.o
131
user-obj-y += cache-utils.o
132
133
user-obj-y += module.o
user-obj-y += qemu-user.o
134
user-obj-y += qom/
135

Blue Swirl's avatar
Blue Swirl committed
136
######################################################################
137
# disassemblers
Blue Swirl's avatar
Blue Swirl committed
138
139
# NOTE: the disassembler code is only needed for debugging

140
universal-obj-y += disas/
141

142
143
144
######################################################################
# trace

145
trace-obj-y += trace/
146

Paolo Bonzini's avatar
Paolo Bonzini committed
147
148
universal-obj-y += $(trace-obj-y)

Robert Relyea's avatar
Robert Relyea committed
149
150
151
######################################################################
# smartcard

152
153
154
155
156
157
158
libcacard-y += libcacard/cac.o libcacard/event.o
libcacard-y += libcacard/vcard.o libcacard/vreader.o
libcacard-y += libcacard/vcard_emul_nss.o
libcacard-y += libcacard/vcard_emul_type.o
libcacard-y += libcacard/card_7816.o

common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y)
Robert Relyea's avatar
Robert Relyea committed
159

Michael Roth's avatar
Michael Roth committed
160
161
162
######################################################################
# qapi

163
qapi-obj-y = qapi/
164
qapi-obj-y += qapi-types.o qapi-visit.o
Michael Roth's avatar
Michael Roth committed
165

166
common-obj-y += qmp-marshal.o qapi-visit.o qapi-types.o
Anthony Liguori's avatar
Anthony Liguori committed
167
common-obj-y += qmp.o hmp.o
168

169
170
universal-obj-y += $(qapi-obj-y)

171
172
173
######################################################################
# guest agent

174
qga-obj-y = qga/ module.o qemu-tool.o
175
qga-obj-$(CONFIG_POSIX) += qemu-sockets.o qemu-option.o
176

177
178
179
180
vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)

vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)

181
182
QEMU_CFLAGS+=$(GLIB_CFLAGS)

183
nested-vars += \
184
	stub-obj-y \
185
	qga-obj-y \
186
	qom-obj-y \
187
	qapi-obj-y \
188
	block-obj-y \
189
	user-obj-y \
190
	common-obj-y \
191
	universal-obj-y \
192
	hw-core-obj-y \
193
194
	extra-obj-y \
	trace-obj-y
195
dummy := $(call unnest-vars)