blob: 149627b5890cb2a3589f7c3f54e851594bbab784 [file] [log] [blame]
Andreas Färber0e8c9212010-01-06 20:24:05 +01001#######################################################################
Paolo Bonzinia3728232012-12-20 16:10:26 +01002# Common libraries for tools and emulators
Daniel P. Berrangeb917da42015-10-31 14:39:52 +09003stub-obj-y = stubs/ crypto/
Markus Armbruster39a18152015-09-16 13:06:28 +02004util-obj-y = util/ qobject/ qapi/
Markus Armbrustercdb66102018-02-26 16:29:21 -06005util-obj-y += qapi-builtin-types.o
Markus Armbruster252dc312018-02-11 10:36:00 +01006util-obj-y += qapi-types.o
7util-obj-y += qapi/qapi-types-block-core.o
8util-obj-y += qapi/qapi-types-block.o
9util-obj-y += qapi/qapi-types-char.o
10util-obj-y += qapi/qapi-types-common.o
11util-obj-y += qapi/qapi-types-crypto.o
12util-obj-y += qapi/qapi-types-introspect.o
13util-obj-y += qapi/qapi-types-migration.o
Markus Armbruster112ed242018-02-26 17:13:27 -060014util-obj-y += qapi/qapi-types-misc.o
Markus Armbruster252dc312018-02-11 10:36:00 +010015util-obj-y += qapi/qapi-types-net.o
16util-obj-y += qapi/qapi-types-rocker.o
17util-obj-y += qapi/qapi-types-run-state.o
18util-obj-y += qapi/qapi-types-sockets.o
19util-obj-y += qapi/qapi-types-tpm.o
20util-obj-y += qapi/qapi-types-trace.o
21util-obj-y += qapi/qapi-types-transaction.o
22util-obj-y += qapi/qapi-types-ui.o
Markus Armbrustercdb66102018-02-26 16:29:21 -060023util-obj-y += qapi-builtin-visit.o
Markus Armbruster252dc312018-02-11 10:36:00 +010024util-obj-y += qapi-visit.o
25util-obj-y += qapi/qapi-visit-block-core.o
26util-obj-y += qapi/qapi-visit-block.o
27util-obj-y += qapi/qapi-visit-char.o
28util-obj-y += qapi/qapi-visit-common.o
29util-obj-y += qapi/qapi-visit-crypto.o
30util-obj-y += qapi/qapi-visit-introspect.o
31util-obj-y += qapi/qapi-visit-migration.o
Markus Armbruster112ed242018-02-26 17:13:27 -060032util-obj-y += qapi/qapi-visit-misc.o
Markus Armbruster252dc312018-02-11 10:36:00 +010033util-obj-y += qapi/qapi-visit-net.o
34util-obj-y += qapi/qapi-visit-rocker.o
35util-obj-y += qapi/qapi-visit-run-state.o
36util-obj-y += qapi/qapi-visit-sockets.o
37util-obj-y += qapi/qapi-visit-tpm.o
38util-obj-y += qapi/qapi-visit-trace.o
39util-obj-y += qapi/qapi-visit-transaction.o
40util-obj-y += qapi/qapi-visit-ui.o
41util-obj-y += qapi-event.o
42util-obj-y += qapi/qapi-events-block-core.o
43util-obj-y += qapi/qapi-events-block.o
44util-obj-y += qapi/qapi-events-char.o
45util-obj-y += qapi/qapi-events-common.o
46util-obj-y += qapi/qapi-events-crypto.o
47util-obj-y += qapi/qapi-events-introspect.o
48util-obj-y += qapi/qapi-events-migration.o
Markus Armbruster112ed242018-02-26 17:13:27 -060049util-obj-y += qapi/qapi-events-misc.o
Markus Armbruster252dc312018-02-11 10:36:00 +010050util-obj-y += qapi/qapi-events-net.o
51util-obj-y += qapi/qapi-events-rocker.o
52util-obj-y += qapi/qapi-events-run-state.o
53util-obj-y += qapi/qapi-events-sockets.o
54util-obj-y += qapi/qapi-events-tpm.o
55util-obj-y += qapi/qapi-events-trace.o
56util-obj-y += qapi/qapi-events-transaction.o
57util-obj-y += qapi/qapi-events-ui.o
58util-obj-y += qmp-introspect.o
Paolo Bonzini3bc2f572012-11-16 18:35:27 +010059
Marc-André Lureau32d955a2016-12-12 15:49:01 +030060chardev-obj-y = chardev/
61
Paolo Bonzini3bc2f572012-11-16 18:35:27 +010062#######################################################################
Andreas Färber0e8c9212010-01-06 20:24:05 +010063# block-obj-y is code used by both qemu system emulation and qemu-img
64
Fam Zheng798bfe02016-01-14 16:41:02 +080065block-obj-y += nbd/
66block-obj-y += block.o blockjob.o
Paolo Bonzinie5b57282017-08-22 07:08:27 +020067block-obj-y += block/ scsi/
Kevin Wolf587da2c2013-06-05 14:19:41 +020068block-obj-y += qemu-io-cmds.o
Changlong Xie190b9a82016-07-27 15:01:49 +080069block-obj-$(CONFIG_REPLICATION) += replication.o
Andreas Färber0e8c9212010-01-06 20:24:05 +010070
Fam Zhengcc475692014-02-10 14:48:59 +080071block-obj-m = block/
72
Daniel P. Berrangefb377262015-09-02 10:57:27 +010073#######################################################################
74# crypto-obj-y is code used by both qemu system emulation and qemu-img
75
76crypto-obj-y = crypto/
77crypto-aes-obj-y = crypto/
Gautham R Shenoy74db9202010-04-29 17:44:43 +053078
Daniel P. Berrange0c7012e2015-09-02 11:18:16 +010079#######################################################################
80# qom-obj-y is code used by both qemu system emulation and qemu-img
81
82qom-obj-y = qom/
83
Daniel P. Berrange666a3af2015-02-27 16:19:33 +000084#######################################################################
85# io-obj-y is code used by both qemu system emulation and qemu-img
86
87io-obj-y = io/
88
Andreas Färber0e8c9212010-01-06 20:24:05 +010089######################################################################
Chen Wei-Ren050d9942011-11-15 20:47:11 +080090# Target independent part of system emulation. The long term path is to
91# suppress *all* target specific code in case of system emulation, i.e. a
92# single QEMU executable should support all CPUs and machines.
Andreas Färber0e8c9212010-01-06 20:24:05 +010093
Paolo Bonzini00082342013-01-19 11:06:47 +010094ifeq ($(CONFIG_SOFTMMU),y)
Fam Zhengba1183d2014-02-10 14:48:52 +080095common-obj-y = blockdev.o blockdev-nbd.o block/
Thomas Huth5ddc6482017-06-26 07:22:57 +020096common-obj-y += bootdevice.o iothread.o
Paolo Bonzinifd9400b2012-10-24 11:27:28 +020097common-obj-y += net/
Paolo Bonzini1559e0d2013-02-04 17:20:47 +010098common-obj-y += qdev-monitor.o device-hotplug.o
Blue Swirlb0cb640a2010-06-12 05:49:30 +000099common-obj-$(CONFIG_WIN32) += os-win32.o
100common-obj-$(CONFIG_POSIX) += os-posix.o
Gerd Hoffmann254e5952010-05-21 11:54:32 +0200101
Paolo Bonziniee204772012-05-22 13:46:08 +0200102common-obj-$(CONFIG_LINUX) += fsdev/
Paolo Bonziniee204772012-05-22 13:46:08 +0200103
Dr. David Alan Gilbert60fe6372014-12-12 11:13:38 +0000104common-obj-y += migration/
Andreas Färber0e8c9212010-01-06 20:24:05 +0100105
Paolo Bonzinib0b68fc2012-05-22 13:49:02 +0200106common-obj-y += audio/
Paolo Bonzini3d5a3f92012-05-29 11:08:47 +0200107common-obj-y += hw/
Paolo Bonzini6f991982012-12-17 18:17:08 +0100108
Pavel Dovgalyukd73abd62015-09-17 19:23:37 +0300109common-obj-y += replay/
110
Paolo Bonzini8867aef2012-05-22 13:48:15 +0200111common-obj-y += ui/
Paolo Bonzini3d5a3f92012-05-29 11:08:47 +0200112common-obj-y += bt-host.o bt-vhci.o
Michael Tokarev849d8282014-05-02 15:40:53 +0400113bt-host.o-cflags := $(BLUEZ_CFLAGS)
Corentin Chary3e230dd2010-07-07 20:57:52 +0200114
Stefan Weilc9159fe2012-10-05 19:39:33 +0200115common-obj-y += dma-helpers.o
Stefan Weilc9159fe2012-10-05 19:39:33 +0200116common-obj-y += vl.o
Michael Tokarev849d8282014-05-02 15:40:53 +0400117vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
Philippe Mathieu-Daudéc39f95d2017-10-24 09:20:43 -0300118common-obj-$(CONFIG_TPM) += tpm.o
Andreas Färber0e8c9212010-01-06 20:24:05 +0100119
Paolo Bonzini4c696052012-05-22 13:49:43 +0200120common-obj-$(CONFIG_SLIRP) += slirp/
Andreas Färber0e8c9212010-01-06 20:24:05 +0100121
Anthony Liguoria9b7b2a2012-06-25 10:03:47 -0500122common-obj-y += backends/
Marc-André Lureau6b10e572017-05-29 12:39:42 +0400123common-obj-y += chardev/
Anthony Liguoria9b7b2a2012-06-25 10:03:47 -0500124
Paolo Bonzini737f3512013-01-19 11:06:46 +0100125common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
Fam Zhengc3883e12017-09-07 16:53:16 +0800126qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS)
127qemu-seccomp.o-libs := $(SECCOMP_LIBS)
Eduardo Otubof7945732012-08-14 18:44:05 -0300128
Peter Crosthwaite7df057b2015-05-24 13:20:14 -0700129common-obj-$(CONFIG_FDT) += device_tree.o
130
Michael Roth2345c772011-07-19 14:50:32 -0500131######################################################################
132# qapi
133
Markus Armbruster834a3f32018-02-11 10:35:56 +0100134common-obj-y += qmp-commands.o
Markus Armbruster252dc312018-02-11 10:36:00 +0100135common-obj-y += qapi/qapi-commands-block-core.o
136common-obj-y += qapi/qapi-commands-block.o
137common-obj-y += qapi/qapi-commands-char.o
138common-obj-y += qapi/qapi-commands-common.o
139common-obj-y += qapi/qapi-commands-crypto.o
140common-obj-y += qapi/qapi-commands-introspect.o
141common-obj-y += qapi/qapi-commands-migration.o
Markus Armbruster112ed242018-02-26 17:13:27 -0600142common-obj-y += qapi/qapi-commands-misc.o
Markus Armbruster252dc312018-02-11 10:36:00 +0100143common-obj-y += qapi/qapi-commands-net.o
144common-obj-y += qapi/qapi-commands-rocker.o
145common-obj-y += qapi/qapi-commands-run-state.o
146common-obj-y += qapi/qapi-commands-sockets.o
147common-obj-y += qapi/qapi-commands-tpm.o
148common-obj-y += qapi/qapi-commands-trace.o
149common-obj-y += qapi/qapi-commands-transaction.o
150common-obj-y += qapi/qapi-commands-ui.o
Markus Armbruster39a18152015-09-16 13:06:28 +0200151common-obj-y += qmp-introspect.o
Anthony Liguori48a32be2011-09-02 12:34:48 -0500152common-obj-y += qmp.o hmp.o
Paolo Bonzini00082342013-01-19 11:06:47 +0100153endif
Anthony Liguorie3193602011-09-02 12:34:47 -0500154
Paolo Bonzini9444e9e2012-12-20 15:24:49 +0100155#######################################################################
156# Target-independent parts used in system and user emulation
Richard Hendersonc482cb12016-06-28 11:37:27 -0700157common-obj-y += cpus-common.o
Paolo Bonzini00082342013-01-19 11:06:47 +0100158common-obj-y += hw/
159common-obj-y += qom/
160common-obj-y += disas/
Andreas Färberce008c12012-03-04 21:32:36 +0100161
Michael Roth957f1f92011-08-11 15:38:12 -0500162######################################################################
Stefan Weil0b516ef2013-08-08 20:18:07 +0200163# Resource file for Windows executables
164version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o
Stefan Weil0b516ef2013-08-08 20:18:07 +0200165
166######################################################################
Lluís Vilanova341ea692014-05-30 14:11:56 +0200167# tracing
168util-obj-y += trace/
169target-obj-y += trace/
170
171######################################################################
Michael Roth957f1f92011-08-11 15:38:12 -0500172# guest agent
173
Paolo Bonzini59cacde2012-12-20 15:03:18 +0100174# FIXME: a few definitions from qapi-types.o/qapi-visit.o are needed
175# by libqemuutil.a. These should be moved to a separate .json schema.
Fam Zheng169a24a2014-08-07 10:34:41 +0800176qga-obj-y = qga/
Tomoki Sekiyamab39297a2013-08-07 11:40:18 -0400177qga-vss-dll-obj-y = qga/
David Marchanda75eb032014-09-08 11:17:48 +0200178
179######################################################################
180# contrib
Kamil Rytarowskib1449ed2017-07-14 09:33:45 +0100181ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/
182ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/
Marc-André Lureau7b2e5c62016-10-18 12:24:04 +0300183libvhost-user-obj-y = contrib/libvhost-user/
Felipe Franciosi49cc0342017-03-02 10:25:53 -0800184vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS)
185vhost-user-scsi.o-libs := $(LIBISCSI_LIBS)
186vhost-user-scsi-obj-y = contrib/vhost-user-scsi/
Changpeng Liu406d2aa2018-01-04 09:53:34 +0800187vhost-user-blk-obj-y = contrib/vhost-user-blk/
Daniel P. Berrange1412cf52016-06-16 09:39:47 +0100188
189######################################################################
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000190trace-events-subdirs =
191trace-events-subdirs += util
192trace-events-subdirs += crypto
193trace-events-subdirs += io
194trace-events-subdirs += migration
195trace-events-subdirs += block
Marc-André Lureau6b10e572017-05-29 12:39:42 +0400196trace-events-subdirs += chardev
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000197trace-events-subdirs += hw/block
198trace-events-subdirs += hw/block/dataplane
199trace-events-subdirs += hw/char
200trace-events-subdirs += hw/intc
201trace-events-subdirs += hw/net
Yuval Shaiaef6d4cc2018-02-09 15:23:18 +0200202trace-events-subdirs += hw/rdma
Yuval Shaia919ae3d2018-02-09 15:44:14 +0200203trace-events-subdirs += hw/rdma/vmw
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000204trace-events-subdirs += hw/virtio
205trace-events-subdirs += hw/audio
206trace-events-subdirs += hw/misc
Mark Cave-Ayland4b402e02018-02-09 18:51:42 +0000207trace-events-subdirs += hw/misc/macio
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000208trace-events-subdirs += hw/usb
209trace-events-subdirs += hw/scsi
210trace-events-subdirs += hw/nvram
211trace-events-subdirs += hw/display
212trace-events-subdirs += hw/input
213trace-events-subdirs += hw/timer
214trace-events-subdirs += hw/dma
215trace-events-subdirs += hw/sparc
Mark Cave-Ayland8bcf1c72017-12-21 07:32:57 +0000216trace-events-subdirs += hw/sparc64
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000217trace-events-subdirs += hw/sd
218trace-events-subdirs += hw/isa
219trace-events-subdirs += hw/mem
220trace-events-subdirs += hw/i386
221trace-events-subdirs += hw/i386/xen
222trace-events-subdirs += hw/9pfs
223trace-events-subdirs += hw/ppc
224trace-events-subdirs += hw/pci
Mark Cave-Aylandbfec08b2018-01-21 08:59:45 +0000225trace-events-subdirs += hw/pci-host
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000226trace-events-subdirs += hw/s390x
227trace-events-subdirs += hw/vfio
228trace-events-subdirs += hw/acpi
229trace-events-subdirs += hw/arm
230trace-events-subdirs += hw/alpha
Helge Dellera72bd602017-10-08 16:47:27 -0400231trace-events-subdirs += hw/hppa
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000232trace-events-subdirs += hw/xen
John Snow3eee2612017-09-18 15:01:25 -0400233trace-events-subdirs += hw/ide
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000234trace-events-subdirs += ui
235trace-events-subdirs += audio
236trace-events-subdirs += net
237trace-events-subdirs += target/arm
238trace-events-subdirs += target/i386
Philippe Mathieu-Daudéb44a7fb2017-03-04 15:56:52 -0300239trace-events-subdirs += target/mips
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000240trace-events-subdirs += target/sparc
241trace-events-subdirs += target/s390x
242trace-events-subdirs += target/ppc
243trace-events-subdirs += qom
244trace-events-subdirs += linux-user
245trace-events-subdirs += qapi
Yang Zhongd9bb58e2017-06-02 14:06:44 +0800246trace-events-subdirs += accel/tcg
Yang Zhong92229a52017-06-02 14:06:46 +0800247trace-events-subdirs += accel/kvm
Vladimir Sementsov-Ogievskiy95884632017-07-07 18:29:18 +0300248trace-events-subdirs += nbd
Paolo Bonzini7c9e5272017-08-21 18:58:56 +0200249trace-events-subdirs += scsi
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000250
251trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PATH)/%/trace-events)
252
253trace-obj-y = trace-root.o
254trace-obj-y += $(trace-events-subdirs:%=%/trace.o)
255trace-obj-$(CONFIG_TRACE_UST) += trace-ust-all.o
256trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace-root.o
257trace-obj-$(CONFIG_TRACE_DTRACE) += $(trace-events-subdirs:%=%/trace-dtrace.o)