Makefile.objs 4.0 KB
Newer Older
1
#######################################################################
2
# Common libraries for tools and emulators
3
stub-obj-y = stubs/
4
util-obj-y = util/ qobject/ qapi/
5

K
Kevin Wolf 已提交
6 7
#######################################################################
# coroutines
8
coroutine-obj-y = qemu-coroutine.o qemu-coroutine-lock.o qemu-coroutine-io.o
9
coroutine-obj-y += qemu-coroutine-sleep.o
B
Blue Swirl 已提交
10 11

# If you change this logic, please also check tests/Makefile
12
ifeq ($(CONFIG_UCONTEXT_COROUTINE),y)
K
Kevin Wolf 已提交
13
coroutine-obj-$(CONFIG_POSIX) += coroutine-ucontext.o
14
else
15 16 17
ifeq ($(CONFIG_SIGALTSTACK_COROUTINE),y)
coroutine-obj-$(CONFIG_POSIX) += coroutine-sigaltstack.o
else
18 19
coroutine-obj-$(CONFIG_POSIX) += coroutine-gthread.o
endif
20
endif
K
Kevin Wolf 已提交
21 22
coroutine-obj-$(CONFIG_WIN32) += coroutine-win32.o

23 24 25
#######################################################################
# block-obj-y is code used by both qemu system emulation and qemu-img

26 27
block-obj-y = async.o thread-pool.o
block-obj-y += nbd.o block.o blockjob.o
28
block-obj-y += $(coroutine-obj-y)
29 30 31
block-obj-y += main-loop.o iohandler.o qemu-timer.o
block-obj-$(CONFIG_POSIX) += aio-posix.o
block-obj-$(CONFIG_WIN32) += aio-win32.o
32
block-obj-y += block/
33
block-obj-y += qapi-types.o qapi-visit.o
34

35
ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy)
P
Paul Brook 已提交
36 37 38 39
# 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
40

41
######################################################################
42 43 44
# 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.
45

P
Paolo Bonzini 已提交
46
common-obj-y = $(block-obj-y) blockdev.o blockdev-nbd.o block/
P
Paolo Bonzini 已提交
47
common-obj-y += net/
48
common-obj-y += readline.o
49 50
common-obj-$(CONFIG_WIN32) += os-win32.o
common-obj-$(CONFIG_POSIX) += os-posix.o
G
Gerd Hoffmann 已提交
51

52 53 54
common-obj-$(CONFIG_LINUX) += fsdev/
extra-obj-$(CONFIG_LINUX) += fsdev/

55
common-obj-y += migration.o migration-tcp.o
56
common-obj-y += qemu-char.o #aio.o
57
common-obj-y += block-migration.o
O
Orit Wasserman 已提交
58
common-obj-y += page_cache.o
59 60 61

common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o

62
common-obj-$(CONFIG_SPICE) += spice-qemu-char.o
63 64

common-obj-y += audio/
65
common-obj-y += hw/
66 67
extra-obj-y += hw/

68
common-obj-y += ui/
69
common-obj-y += bt-host.o bt-vhci.o
70

S
Stefan Weil 已提交
71 72 73
common-obj-y += dma-helpers.o
common-obj-y += qtest.o
common-obj-y += vl.o
74

75
common-obj-$(CONFIG_SLIRP) += slirp/
76

77 78
common-obj-y += backends/

79 80 81 82 83 84
######################################################################
# libseccomp
ifeq ($(CONFIG_SECCOMP),y)
common-obj-y += qemu-seccomp.o
endif

85 86 87
######################################################################
# trace

88
trace-obj-y += trace/
89

R
Robert Relyea 已提交
90 91 92
######################################################################
# smartcard

93 94 95 96 97 98 99
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)
R
Robert Relyea 已提交
100

M
Michael Roth 已提交
101 102 103
######################################################################
# qapi

104
common-obj-y += qmp-marshal.o qapi-visit.o qapi-types.o
A
Anthony Liguori 已提交
105
common-obj-y += qmp.o hmp.o
106

107 108 109 110 111 112 113 114 115
#######################################################################
# Target-independent parts used in system and user emulation
universal-obj-y =
universal-obj-y += qemu-log.o
universal-obj-y += tcg-runtime.o
universal-obj-y += hw/
universal-obj-y += qom/
universal-obj-y += disas/
universal-obj-y += $(trace-obj-y)
116

117 118 119
######################################################################
# guest agent

120 121 122
# FIXME: a few definitions from qapi-types.o/qapi-visit.o are needed
# by libqemuutil.a.  These should be moved to a separate .json schema.
qga-obj-y = qga/ qapi-types.o qapi-visit.o
123

124 125 126 127
vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)

vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)

128 129
QEMU_CFLAGS+=$(GLIB_CFLAGS)

130
nested-vars += \
131
	stub-obj-y \
132
	util-obj-y \
133
	qga-obj-y \
P
Paolo Bonzini 已提交
134
	block-obj-y \
135
	common-obj-y \
136
	universal-obj-y \
137 138
	extra-obj-y \
	trace-obj-y
139
dummy := $(call unnest-vars)