blob: ce9c79235e6fe86d490ba63d277016d4ae105eee [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 Armbrustereb815e22018-02-11 10:36:05 +01005util-obj-y += qapi/qapi-builtin-types.o
6util-obj-y += qapi/qapi-types.o
Markus Armbruster252dc312018-02-11 10:36:00 +01007util-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
Kevin Wolfbf425082018-05-16 16:03:10 +020013util-obj-y += qapi/qapi-types-job.o
Markus Armbruster252dc312018-02-11 10:36:00 +010014util-obj-y += qapi/qapi-types-migration.o
Markus Armbruster112ed242018-02-26 17:13:27 -060015util-obj-y += qapi/qapi-types-misc.o
Markus Armbruster252dc312018-02-11 10:36:00 +010016util-obj-y += qapi/qapi-types-net.o
17util-obj-y += qapi/qapi-types-rocker.o
18util-obj-y += qapi/qapi-types-run-state.o
19util-obj-y += qapi/qapi-types-sockets.o
20util-obj-y += qapi/qapi-types-tpm.o
21util-obj-y += qapi/qapi-types-trace.o
22util-obj-y += qapi/qapi-types-transaction.o
23util-obj-y += qapi/qapi-types-ui.o
Markus Armbrustereb815e22018-02-11 10:36:05 +010024util-obj-y += qapi/qapi-builtin-visit.o
25util-obj-y += qapi/qapi-visit.o
Markus Armbruster252dc312018-02-11 10:36:00 +010026util-obj-y += qapi/qapi-visit-block-core.o
27util-obj-y += qapi/qapi-visit-block.o
28util-obj-y += qapi/qapi-visit-char.o
29util-obj-y += qapi/qapi-visit-common.o
30util-obj-y += qapi/qapi-visit-crypto.o
31util-obj-y += qapi/qapi-visit-introspect.o
Kevin Wolfbf425082018-05-16 16:03:10 +020032util-obj-y += qapi/qapi-visit-job.o
Markus Armbruster252dc312018-02-11 10:36:00 +010033util-obj-y += qapi/qapi-visit-migration.o
Markus Armbruster112ed242018-02-26 17:13:27 -060034util-obj-y += qapi/qapi-visit-misc.o
Markus Armbruster252dc312018-02-11 10:36:00 +010035util-obj-y += qapi/qapi-visit-net.o
36util-obj-y += qapi/qapi-visit-rocker.o
37util-obj-y += qapi/qapi-visit-run-state.o
38util-obj-y += qapi/qapi-visit-sockets.o
39util-obj-y += qapi/qapi-visit-tpm.o
40util-obj-y += qapi/qapi-visit-trace.o
41util-obj-y += qapi/qapi-visit-transaction.o
42util-obj-y += qapi/qapi-visit-ui.o
Markus Armbrustereb815e22018-02-11 10:36:05 +010043util-obj-y += qapi/qapi-events.o
Markus Armbruster252dc312018-02-11 10:36:00 +010044util-obj-y += qapi/qapi-events-block-core.o
45util-obj-y += qapi/qapi-events-block.o
46util-obj-y += qapi/qapi-events-char.o
47util-obj-y += qapi/qapi-events-common.o
48util-obj-y += qapi/qapi-events-crypto.o
49util-obj-y += qapi/qapi-events-introspect.o
Kevin Wolfbf425082018-05-16 16:03:10 +020050util-obj-y += qapi/qapi-events-job.o
Markus Armbruster252dc312018-02-11 10:36:00 +010051util-obj-y += qapi/qapi-events-migration.o
Markus Armbruster112ed242018-02-26 17:13:27 -060052util-obj-y += qapi/qapi-events-misc.o
Markus Armbruster252dc312018-02-11 10:36:00 +010053util-obj-y += qapi/qapi-events-net.o
54util-obj-y += qapi/qapi-events-rocker.o
55util-obj-y += qapi/qapi-events-run-state.o
56util-obj-y += qapi/qapi-events-sockets.o
57util-obj-y += qapi/qapi-events-tpm.o
58util-obj-y += qapi/qapi-events-trace.o
59util-obj-y += qapi/qapi-events-transaction.o
60util-obj-y += qapi/qapi-events-ui.o
Markus Armbrustereb815e22018-02-11 10:36:05 +010061util-obj-y += qapi/qapi-introspect.o
Paolo Bonzini3bc2f572012-11-16 18:35:27 +010062
Marc-André Lureau32d955a2016-12-12 15:49:01 +030063chardev-obj-y = chardev/
64
Paolo Bonzini3bc2f572012-11-16 18:35:27 +010065#######################################################################
Andreas Färber0e8c9212010-01-06 20:24:05 +010066# block-obj-y is code used by both qemu system emulation and qemu-img
67
Fam Zheng798bfe02016-01-14 16:41:02 +080068block-obj-y += nbd/
Kevin Wolf33e9e9b2018-04-12 17:29:59 +020069block-obj-y += block.o blockjob.o job.o
Paolo Bonzinie5b57282017-08-22 07:08:27 +020070block-obj-y += block/ scsi/
Kevin Wolf587da2c2013-06-05 14:19:41 +020071block-obj-y += qemu-io-cmds.o
Changlong Xie190b9a82016-07-27 15:01:49 +080072block-obj-$(CONFIG_REPLICATION) += replication.o
Andreas Färber0e8c9212010-01-06 20:24:05 +010073
Fam Zhengcc475692014-02-10 14:48:59 +080074block-obj-m = block/
75
Daniel P. Berrangefb377262015-09-02 10:57:27 +010076#######################################################################
77# crypto-obj-y is code used by both qemu system emulation and qemu-img
78
79crypto-obj-y = crypto/
80crypto-aes-obj-y = crypto/
Gautham R Shenoy74db9202010-04-29 17:44:43 +053081
Daniel P. Berrange0c7012e2015-09-02 11:18:16 +010082#######################################################################
83# qom-obj-y is code used by both qemu system emulation and qemu-img
84
85qom-obj-y = qom/
86
Daniel P. Berrange666a3af2015-02-27 16:19:33 +000087#######################################################################
88# io-obj-y is code used by both qemu system emulation and qemu-img
89
90io-obj-y = io/
91
Andreas Färber0e8c9212010-01-06 20:24:05 +010092######################################################################
Chen Wei-Ren050d9942011-11-15 20:47:11 +080093# Target independent part of system emulation. The long term path is to
94# suppress *all* target specific code in case of system emulation, i.e. a
95# single QEMU executable should support all CPUs and machines.
Andreas Färber0e8c9212010-01-06 20:24:05 +010096
Paolo Bonzini00082342013-01-19 11:06:47 +010097ifeq ($(CONFIG_SOFTMMU),y)
Fam Zhengba1183d2014-02-10 14:48:52 +080098common-obj-y = blockdev.o blockdev-nbd.o block/
Thomas Huth5ddc6482017-06-26 07:22:57 +020099common-obj-y += bootdevice.o iothread.o
Kevin Wolf1a90bc82018-05-03 19:01:14 +0200100common-obj-y += job-qmp.o
Paolo Bonzinifd9400b2012-10-24 11:27:28 +0200101common-obj-y += net/
Paolo Bonzini1559e0d2013-02-04 17:20:47 +0100102common-obj-y += qdev-monitor.o device-hotplug.o
Blue Swirlb0cb640a2010-06-12 05:49:30 +0000103common-obj-$(CONFIG_WIN32) += os-win32.o
104common-obj-$(CONFIG_POSIX) += os-posix.o
Gerd Hoffmann254e5952010-05-21 11:54:32 +0200105
Paolo Bonziniee204772012-05-22 13:46:08 +0200106common-obj-$(CONFIG_LINUX) += fsdev/
Paolo Bonziniee204772012-05-22 13:46:08 +0200107
Dr. David Alan Gilbert60fe6372014-12-12 11:13:38 +0000108common-obj-y += migration/
Andreas Färber0e8c9212010-01-06 20:24:05 +0100109
Paolo Bonzinib0b68fc2012-05-22 13:49:02 +0200110common-obj-y += audio/
Gerd Hoffmann08a05b32018-03-06 08:40:49 +0100111common-obj-m += audio/
Paolo Bonzini3d5a3f92012-05-29 11:08:47 +0200112common-obj-y += hw/
Paolo Bonzini6f991982012-12-17 18:17:08 +0100113
Pavel Dovgalyukd73abd62015-09-17 19:23:37 +0300114common-obj-y += replay/
115
Paolo Bonzini8867aef2012-05-22 13:48:15 +0200116common-obj-y += ui/
Gerd Hoffmann61b4d9a2018-03-01 11:05:41 +0100117common-obj-m += ui/
Paolo Bonzini3d5a3f92012-05-29 11:08:47 +0200118common-obj-y += bt-host.o bt-vhci.o
Michael Tokarev849d8282014-05-02 15:40:53 +0400119bt-host.o-cflags := $(BLUEZ_CFLAGS)
Corentin Chary3e230dd2010-07-07 20:57:52 +0200120
Stefan Weilc9159fe2012-10-05 19:39:33 +0200121common-obj-y += dma-helpers.o
Stefan Weilc9159fe2012-10-05 19:39:33 +0200122common-obj-y += vl.o
Michael Tokarev849d8282014-05-02 15:40:53 +0400123vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
Philippe Mathieu-Daudéc39f95d2017-10-24 09:20:43 -0300124common-obj-$(CONFIG_TPM) += tpm.o
Andreas Färber0e8c9212010-01-06 20:24:05 +0100125
Paolo Bonzini4c696052012-05-22 13:49:43 +0200126common-obj-$(CONFIG_SLIRP) += slirp/
Andreas Färber0e8c9212010-01-06 20:24:05 +0100127
Anthony Liguoria9b7b2a2012-06-25 10:03:47 -0500128common-obj-y += backends/
Marc-André Lureau6b10e572017-05-29 12:39:42 +0400129common-obj-y += chardev/
Anthony Liguoria9b7b2a2012-06-25 10:03:47 -0500130
Paolo Bonzini737f3512013-01-19 11:06:46 +0100131common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
Fam Zhengc3883e12017-09-07 16:53:16 +0800132qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS)
133qemu-seccomp.o-libs := $(SECCOMP_LIBS)
Eduardo Otubof7945732012-08-14 18:44:05 -0300134
Peter Crosthwaite7df057b2015-05-24 13:20:14 -0700135common-obj-$(CONFIG_FDT) += device_tree.o
136
Michael Roth2345c772011-07-19 14:50:32 -0500137######################################################################
138# qapi
139
Markus Armbrustereb815e22018-02-11 10:36:05 +0100140common-obj-y += qapi/qapi-commands.o
Markus Armbruster252dc312018-02-11 10:36:00 +0100141common-obj-y += qapi/qapi-commands-block-core.o
142common-obj-y += qapi/qapi-commands-block.o
143common-obj-y += qapi/qapi-commands-char.o
144common-obj-y += qapi/qapi-commands-common.o
145common-obj-y += qapi/qapi-commands-crypto.o
146common-obj-y += qapi/qapi-commands-introspect.o
Kevin Wolfbf425082018-05-16 16:03:10 +0200147common-obj-y += qapi/qapi-commands-job.o
Markus Armbruster252dc312018-02-11 10:36:00 +0100148common-obj-y += qapi/qapi-commands-migration.o
Markus Armbruster112ed242018-02-26 17:13:27 -0600149common-obj-y += qapi/qapi-commands-misc.o
Markus Armbruster252dc312018-02-11 10:36:00 +0100150common-obj-y += qapi/qapi-commands-net.o
151common-obj-y += qapi/qapi-commands-rocker.o
152common-obj-y += qapi/qapi-commands-run-state.o
153common-obj-y += qapi/qapi-commands-sockets.o
154common-obj-y += qapi/qapi-commands-tpm.o
155common-obj-y += qapi/qapi-commands-trace.o
156common-obj-y += qapi/qapi-commands-transaction.o
157common-obj-y += qapi/qapi-commands-ui.o
Markus Armbrustereb815e22018-02-11 10:36:05 +0100158common-obj-y += qapi/qapi-introspect.o
Anthony Liguori48a32be2011-09-02 12:34:48 -0500159common-obj-y += qmp.o hmp.o
Paolo Bonzini00082342013-01-19 11:06:47 +0100160endif
Anthony Liguorie3193602011-09-02 12:34:47 -0500161
Paolo Bonzini9444e9e2012-12-20 15:24:49 +0100162#######################################################################
163# Target-independent parts used in system and user emulation
Richard Hendersonc482cb12016-06-28 11:37:27 -0700164common-obj-y += cpus-common.o
Paolo Bonzini00082342013-01-19 11:06:47 +0100165common-obj-y += hw/
166common-obj-y += qom/
167common-obj-y += disas/
Andreas Färberce008c12012-03-04 21:32:36 +0100168
Michael Roth957f1f92011-08-11 15:38:12 -0500169######################################################################
Stefan Weil0b516ef2013-08-08 20:18:07 +0200170# Resource file for Windows executables
171version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o
Stefan Weil0b516ef2013-08-08 20:18:07 +0200172
173######################################################################
Lluís Vilanova341ea692014-05-30 14:11:56 +0200174# tracing
175util-obj-y += trace/
176target-obj-y += trace/
177
178######################################################################
Michael Roth957f1f92011-08-11 15:38:12 -0500179# guest agent
180
Markus Armbrustereb815e22018-02-11 10:36:05 +0100181# FIXME: a few definitions from qapi/qapi-types.o and
182# qapi/qapi-visit.o are needed by libqemuutil.a. These should be
183# extracted into a QAPI schema module, or perhaps a separate schema.
Fam Zheng169a24a2014-08-07 10:34:41 +0800184qga-obj-y = qga/
Tomoki Sekiyamab39297a2013-08-07 11:40:18 -0400185qga-vss-dll-obj-y = qga/
David Marchanda75eb032014-09-08 11:17:48 +0200186
187######################################################################
188# contrib
Kamil Rytarowskib1449ed2017-07-14 09:33:45 +0100189ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/
190ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/
Marc-André Lureau7b2e5c62016-10-18 12:24:04 +0300191libvhost-user-obj-y = contrib/libvhost-user/
Felipe Franciosi49cc0342017-03-02 10:25:53 -0800192vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS)
193vhost-user-scsi.o-libs := $(LIBISCSI_LIBS)
194vhost-user-scsi-obj-y = contrib/vhost-user-scsi/
Changpeng Liu406d2aa2018-01-04 09:53:34 +0800195vhost-user-blk-obj-y = contrib/vhost-user-blk/
Daniel P. Berrange1412cf52016-06-16 09:39:47 +0100196
197######################################################################
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000198trace-events-subdirs =
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300199trace-events-subdirs += accel/kvm
200trace-events-subdirs += accel/tcg
201trace-events-subdirs += audio
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000202trace-events-subdirs += block
Marc-André Lureau6b10e572017-05-29 12:39:42 +0400203trace-events-subdirs += chardev
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300204trace-events-subdirs += crypto
205trace-events-subdirs += hw/9pfs
206trace-events-subdirs += hw/acpi
207trace-events-subdirs += hw/alpha
208trace-events-subdirs += hw/arm
209trace-events-subdirs += hw/audio
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000210trace-events-subdirs += hw/block
211trace-events-subdirs += hw/block/dataplane
212trace-events-subdirs += hw/char
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000213trace-events-subdirs += hw/display
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000214trace-events-subdirs += hw/dma
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300215trace-events-subdirs += hw/hppa
Philippe Mathieu-Daudé08bb9b32018-06-08 13:15:33 +0100216trace-events-subdirs += hw/i2c
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000217trace-events-subdirs += hw/i386
218trace-events-subdirs += hw/i386/xen
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300219trace-events-subdirs += hw/ide
220trace-events-subdirs += hw/input
221trace-events-subdirs += hw/intc
222trace-events-subdirs += hw/isa
223trace-events-subdirs += hw/mem
224trace-events-subdirs += hw/misc
225trace-events-subdirs += hw/misc/macio
226trace-events-subdirs += hw/net
227trace-events-subdirs += hw/nvram
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000228trace-events-subdirs += hw/pci
Mark Cave-Aylandbfec08b2018-01-21 08:59:45 +0000229trace-events-subdirs += hw/pci-host
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300230trace-events-subdirs += hw/ppc
231trace-events-subdirs += hw/rdma
232trace-events-subdirs += hw/rdma/vmw
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000233trace-events-subdirs += hw/s390x
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300234trace-events-subdirs += hw/scsi
235trace-events-subdirs += hw/sd
236trace-events-subdirs += hw/sparc
237trace-events-subdirs += hw/sparc64
238trace-events-subdirs += hw/timer
Stefan Bergerec427492018-03-02 20:18:41 -0500239trace-events-subdirs += hw/tpm
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300240trace-events-subdirs += hw/usb
241trace-events-subdirs += hw/vfio
242trace-events-subdirs += hw/virtio
Peter Maydell050c2ea2018-08-20 11:24:33 +0100243trace-events-subdirs += hw/watchdog
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300244trace-events-subdirs += hw/xen
245trace-events-subdirs += io
246trace-events-subdirs += linux-user
247trace-events-subdirs += migration
248trace-events-subdirs += nbd
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000249trace-events-subdirs += net
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300250trace-events-subdirs += qapi
251trace-events-subdirs += qom
252trace-events-subdirs += scsi
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000253trace-events-subdirs += target/arm
254trace-events-subdirs += target/i386
Philippe Mathieu-Daudéb44a7fb2017-03-04 15:56:52 -0300255trace-events-subdirs += target/mips
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000256trace-events-subdirs += target/ppc
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300257trace-events-subdirs += target/s390x
258trace-events-subdirs += target/sparc
259trace-events-subdirs += ui
260trace-events-subdirs += util
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000261
262trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PATH)/%/trace-events)
263
264trace-obj-y = trace-root.o
265trace-obj-y += $(trace-events-subdirs:%=%/trace.o)
266trace-obj-$(CONFIG_TRACE_UST) += trace-ust-all.o
267trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace-root.o
268trace-obj-$(CONFIG_TRACE_DTRACE) += $(trace-events-subdirs:%=%/trace-dtrace.o)