Makefile.objs 5.59 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
#######################################################################
# 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
28
oslib-obj-$(CONFIG_WIN32) += oslib-win32.o qemu-thread-win32.o
oslib-obj-$(CONFIG_POSIX) += oslib-posix.o qemu-thread-posix.o
29

Kevin Wolf's avatar
Kevin Wolf committed
30
31
#######################################################################
# coroutines
32
coroutine-obj-y = qemu-coroutine.o qemu-coroutine-lock.o qemu-coroutine-io.o
33
coroutine-obj-y += qemu-coroutine-sleep.o
Blue Swirl's avatar
Blue Swirl committed
34
35

# If you change this logic, please also check tests/Makefile
36
ifeq ($(CONFIG_UCONTEXT_COROUTINE),y)
Kevin Wolf's avatar
Kevin Wolf committed
37
coroutine-obj-$(CONFIG_POSIX) += coroutine-ucontext.o
38
else
39
40
41
ifeq ($(CONFIG_SIGALTSTACK_COROUTINE),y)
coroutine-obj-$(CONFIG_POSIX) += coroutine-sigaltstack.o
else
42
43
coroutine-obj-$(CONFIG_POSIX) += coroutine-gthread.o
endif
44
endif
Kevin Wolf's avatar
Kevin Wolf committed
45
46
coroutine-obj-$(CONFIG_WIN32) += coroutine-win32.o

47
48
49
#######################################################################
# 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
Paolo Bonzini's avatar
Paolo Bonzini committed
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)
Paolo Bonzini's avatar
Paolo Bonzini committed
54
55
block-obj-$(CONFIG_POSIX) += event_notifier-posix.o aio-posix.o
block-obj-$(CONFIG_WIN32) += event_notifier-win32.o aio-win32.o
56
block-obj-y += block/
57
block-obj-y += $(qapi-obj-y) qapi-types.o qapi-visit.o
58

59
ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy)
Paul Brook's avatar
Paul Brook committed
60
61
62
63
# 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
64

65
######################################################################
66
67
68
# 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.
69

Paolo Bonzini's avatar
Paolo Bonzini committed
70
common-obj-y = $(block-obj-y) blockdev.o blockdev-nbd.o block/
Paolo Bonzini's avatar
Paolo Bonzini committed
71
common-obj-y += net/
72
common-obj-y += qom/
73
common-obj-y += readline.o
74
common-obj-y += $(oslib-obj-y)
75
76
common-obj-$(CONFIG_WIN32) += os-win32.o
common-obj-$(CONFIG_POSIX) += os-posix.o
Gerd Hoffmann's avatar
Gerd Hoffmann committed
77

78
79
80
common-obj-$(CONFIG_LINUX) += fsdev/
extra-obj-$(CONFIG_LINUX) += fsdev/

Paolo Bonzini's avatar
Paolo Bonzini committed
81
common-obj-y += tcg-runtime.o host-utils.o main-loop.o
82
83
common-obj-y += migration.o migration-tcp.o
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
Orit Wasserman's avatar
Orit Wasserman committed
87
common-obj-y += page_cache.o
88
89

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

92
common-obj-$(CONFIG_SPICE) += spice-qemu-char.o
93
94

common-obj-y += audio/
95
common-obj-y += hw/
96
97
extra-obj-y += hw/

98
common-obj-y += ui/
99
common-obj-y += bt-host.o bt-vhci.o
100

Stefan Weil's avatar
Stefan Weil committed
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
Stefan Weil's avatar
Stefan Weil committed
105
106
common-obj-y += qtest.o
common-obj-y += vl.o
107

108
common-obj-$(CONFIG_SLIRP) += slirp/
109

110
111
common-obj-y += backends/

112
113
114
115
116
117
######################################################################
# libseccomp
ifeq ($(CONFIG_SECCOMP),y)
common-obj-y += qemu-seccomp.o
endif

118
119
120
121
122
123
######################################################################
# libuser

user-obj-y =
user-obj-y += envlist.o path.o
user-obj-y += tcg-runtime.o host-utils.o
124
user-obj-y += cache-utils.o
125
126
user-obj-y += module.o
user-obj-y += qemu-user.o
127
user-obj-y += qom/
128

Blue Swirl's avatar
Blue Swirl committed
129
######################################################################
130
# disassemblers
Blue Swirl's avatar
Blue Swirl committed
131
132
# NOTE: the disassembler code is only needed for debugging

133
universal-obj-y += disas/
134

135
136
137
######################################################################
# trace

138
trace-obj-y += trace/
139

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

Robert Relyea's avatar
Robert Relyea committed
142
143
144
######################################################################
# smartcard

145
146
147
148
149
150
151
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
152

Michael Roth's avatar
Michael Roth committed
153
154
155
######################################################################
# qapi

156
qapi-obj-y = qapi/
157
qapi-obj-y += qapi-types.o qapi-visit.o
Michael Roth's avatar
Michael Roth committed
158

159
common-obj-y += qmp-marshal.o qapi-visit.o qapi-types.o
Anthony Liguori's avatar
Anthony Liguori committed
160
common-obj-y += qmp.o hmp.o
161

162
163
universal-obj-y += $(qapi-obj-y)

164
165
166
######################################################################
# guest agent

167
qga-obj-y = qga/ module.o qemu-tool.o
168
qga-obj-$(CONFIG_POSIX) += qemu-sockets.o qemu-option.o
169

170
171
172
173
vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)

vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)

174
175
QEMU_CFLAGS+=$(GLIB_CFLAGS)

176
nested-vars += \
177
	stub-obj-y \
178
	qga-obj-y \
179
	qom-obj-y \
180
	qapi-obj-y \
181
	block-obj-y \
182
	user-obj-y \
183
	common-obj-y \
184
	universal-obj-y \
185
186
	extra-obj-y \
	trace-obj-y
187
dummy := $(call unnest-vars)