blob: a7c967633acf99895cc08acf54c9bcf835028ddf [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
Paolo Bonzini44e9f232019-08-06 15:12:18 +02003stub-obj-y = stubs/
Paolo Bonzinib8d89ba2019-07-29 15:55:47 +02004util-obj-y = crypto/ util/ qobject/ qapi/
Philippe Mathieu-Daudée4f94872020-01-18 15:06:15 +01005qom-obj-y = qom/
Paolo Bonzini3bc2f572012-11-16 18:35:27 +01006
Philippe Mathieu-Daudé4dd9c3d2020-01-18 15:06:16 +01007#######################################################################
8# code used by both qemu system emulation and qemu-img
9
10ifeq ($(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)),y)
Paolo Bonzini3bc2f572012-11-16 18:35:27 +010011
Marc-André Lureau32d955a2016-12-12 15:49:01 +030012chardev-obj-y = chardev/
13
Daniel P. Berrange5b76dd12015-10-21 13:16:21 +010014authz-obj-y = authz/
15
Paolo Bonzinif72036f2019-02-15 10:15:22 +010016block-obj-y = nbd/
Kevin Wolf33e9e9b2018-04-12 17:29:59 +020017block-obj-y += block.o blockjob.o job.o
Paolo Bonzinie5b57282017-08-22 07:08:27 +020018block-obj-y += block/ scsi/
Kevin Wolf587da2c2013-06-05 14:19:41 +020019block-obj-y += qemu-io-cmds.o
Changlong Xie190b9a82016-07-27 15:01:49 +080020block-obj-$(CONFIG_REPLICATION) += replication.o
Andreas Färber0e8c9212010-01-06 20:24:05 +010021
Fam Zhengcc475692014-02-10 14:48:59 +080022block-obj-m = block/
23
Daniel P. Berrangefb377262015-09-02 10:57:27 +010024crypto-obj-y = crypto/
Gautham R Shenoy74db9202010-04-29 17:44:43 +053025
Daniel P. Berrange666a3af2015-02-27 16:19:33 +000026io-obj-y = io/
27
Philippe Mathieu-Daudé4dd9c3d2020-01-18 15:06:16 +010028endif # CONFIG_SOFTMMU or CONFIG_TOOLS
29
Kevin Wolf14837c62020-02-24 15:29:54 +010030#######################################################################
31# storage-daemon-obj-y is code used by qemu-storage-daemon (these objects are
32# used for system emulation, too, but specified separately there)
33
Kevin Wolf2af282e2020-02-24 15:30:08 +010034storage-daemon-obj-y = block/ monitor/ qapi/ qom/ storage-daemon/
35storage-daemon-obj-y += blockdev.o blockdev-nbd.o iothread.o job-qmp.o
Kevin Wolfaa706832020-02-24 15:30:00 +010036storage-daemon-obj-$(CONFIG_WIN32) += os-win32.o
37storage-daemon-obj-$(CONFIG_POSIX) += os-posix.o
Kevin Wolf14837c62020-02-24 15:29:54 +010038
Andreas Färber0e8c9212010-01-06 20:24:05 +010039######################################################################
Chen Wei-Ren050d9942011-11-15 20:47:11 +080040# Target independent part of system emulation. The long term path is to
41# suppress *all* target specific code in case of system emulation, i.e. a
42# single QEMU executable should support all CPUs and machines.
Andreas Färber0e8c9212010-01-06 20:24:05 +010043
Paolo Bonzini00082342013-01-19 11:06:47 +010044ifeq ($(CONFIG_SOFTMMU),y)
Fam Zhengba1183d2014-02-10 14:48:52 +080045common-obj-y = blockdev.o blockdev-nbd.o block/
Thomas Huth5ddc6482017-06-26 07:22:57 +020046common-obj-y += bootdevice.o iothread.o
Markus Armbruster2608b3d2019-06-19 22:10:50 +020047common-obj-y += dump/
Kevin Wolf1a90bc82018-05-03 19:01:14 +020048common-obj-y += job-qmp.o
Kevin Wolf7e3c0de2019-06-13 17:34:00 +020049common-obj-y += monitor/
Paolo Bonzinifd9400b2012-10-24 11:27:28 +020050common-obj-y += net/
Maxim Levitskya2dde2f2020-03-08 11:24:32 +020051common-obj-y += qdev-monitor.o
Blue Swirlb0cb640a2010-06-12 05:49:30 +000052common-obj-$(CONFIG_WIN32) += os-win32.o
53common-obj-$(CONFIG_POSIX) += os-posix.o
Gerd Hoffmann254e5952010-05-21 11:54:32 +020054
Paolo Bonziniee204772012-05-22 13:46:08 +020055common-obj-$(CONFIG_LINUX) += fsdev/
Paolo Bonziniee204772012-05-22 13:46:08 +020056
Paolo Bonzini03a7a192019-11-14 12:06:52 +010057common-obj-y += accel/
Dr. David Alan Gilbert60fe6372014-12-12 11:13:38 +000058common-obj-y += migration/
Andreas Färber0e8c9212010-01-06 20:24:05 +010059
Paolo Bonzinib0b68fc2012-05-22 13:49:02 +020060common-obj-y += audio/
Gerd Hoffmann08a05b32018-03-06 08:40:49 +010061common-obj-m += audio/
Paolo Bonzini3d5a3f92012-05-29 11:08:47 +020062common-obj-y += hw/
Paolo Bonzini6f991982012-12-17 18:17:08 +010063
Pavel Dovgalyukd73abd62015-09-17 19:23:37 +030064common-obj-y += replay/
65
Paolo Bonzini8867aef2012-05-22 13:48:15 +020066common-obj-y += ui/
Gerd Hoffmann61b4d9a2018-03-01 11:05:41 +010067common-obj-m += ui/
Corentin Chary3e230dd2010-07-07 20:57:52 +020068
Stefan Weilc9159fe2012-10-05 19:39:33 +020069common-obj-y += dma-helpers.o
Philippe Mathieu-Daudéc39f95d2017-10-24 09:20:43 -030070common-obj-$(CONFIG_TPM) += tpm.o
Andreas Färber0e8c9212010-01-06 20:24:05 +010071
Anthony Liguoria9b7b2a2012-06-25 10:03:47 -050072common-obj-y += backends/
Marc-André Lureau6b10e572017-05-29 12:39:42 +040073common-obj-y += chardev/
Anthony Liguoria9b7b2a2012-06-25 10:03:47 -050074
Paolo Bonzini737f3512013-01-19 11:06:46 +010075common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
Fam Zhengc3883e12017-09-07 16:53:16 +080076qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS)
77qemu-seccomp.o-libs := $(SECCOMP_LIBS)
Eduardo Otubof7945732012-08-14 18:44:05 -030078
Peter Crosthwaite7df057b2015-05-24 13:20:14 -070079common-obj-$(CONFIG_FDT) += device_tree.o
80
Markus Armbruster88554a22019-02-14 16:22:40 +010081common-obj-y += qapi/
Philippe Mathieu-Daudé553ea762020-01-18 15:06:17 +010082
83endif # CONFIG_SOFTMMU
Anthony Liguorie3193602011-09-02 12:34:47 -050084
Paolo Bonzini9444e9e2012-12-20 15:24:49 +010085#######################################################################
86# Target-independent parts used in system and user emulation
Richard Hendersonc482cb12016-06-28 11:37:27 -070087common-obj-y += cpus-common.o
Paolo Bonzini00082342013-01-19 11:06:47 +010088common-obj-y += hw/
89common-obj-y += qom/
90common-obj-y += disas/
Andreas Färberce008c12012-03-04 21:32:36 +010091
Michael Roth957f1f92011-08-11 15:38:12 -050092######################################################################
Stefan Weil0b516ef2013-08-08 20:18:07 +020093# Resource file for Windows executables
94version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o
Stefan Weil0b516ef2013-08-08 20:18:07 +020095
96######################################################################
Lluís Vilanova341ea692014-05-30 14:11:56 +020097# tracing
98util-obj-y += trace/
Lluís Vilanova341ea692014-05-30 14:11:56 +020099
100######################################################################
Michael Roth957f1f92011-08-11 15:38:12 -0500101# guest agent
102
Markus Armbrustereb815e22018-02-11 10:36:05 +0100103# FIXME: a few definitions from qapi/qapi-types.o and
104# qapi/qapi-visit.o are needed by libqemuutil.a. These should be
105# extracted into a QAPI schema module, or perhaps a separate schema.
Fam Zheng169a24a2014-08-07 10:34:41 +0800106qga-obj-y = qga/
Tomoki Sekiyamab39297a2013-08-07 11:40:18 -0400107qga-vss-dll-obj-y = qga/
David Marchanda75eb032014-09-08 11:17:48 +0200108
109######################################################################
110# contrib
Viktor Prutyanov3fa2d382018-08-29 15:41:25 +0300111elf2dmp-obj-y = contrib/elf2dmp/
Kamil Rytarowskib1449ed2017-07-14 09:33:45 +0100112ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/
113ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/
Marc-André Lureau7b2e5c62016-10-18 12:24:04 +0300114libvhost-user-obj-y = contrib/libvhost-user/
Felipe Franciosi49cc0342017-03-02 10:25:53 -0800115vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS)
116vhost-user-scsi.o-libs := $(LIBISCSI_LIBS)
117vhost-user-scsi-obj-y = contrib/vhost-user-scsi/
Changpeng Liu406d2aa2018-01-04 09:53:34 +0800118vhost-user-blk-obj-y = contrib/vhost-user-blk/
Yuval Shaiaa5d2f6f2018-12-21 16:40:15 +0200119rdmacm-mux-obj-y = contrib/rdmacm-mux/
Marc-André Lureau06914c92019-05-14 12:41:26 +0200120vhost-user-input-obj-y = contrib/vhost-user-input/
Marc-André Lureaud52c4542019-05-24 15:09:42 +0200121vhost-user-gpu-obj-y = contrib/vhost-user-gpu/
Dr. David Alan Gilbert81bfc422019-02-07 12:17:21 +0000122virtiofsd-obj-y = tools/virtiofsd/
Daniel P. Berrange1412cf52016-06-16 09:39:47 +0100123
124######################################################################
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000125trace-events-subdirs =
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300126trace-events-subdirs += accel/kvm
127trace-events-subdirs += accel/tcg
Marc-André Lureau5010cec2019-12-16 11:48:53 +0400128trace-events-subdirs += backends
Laurent Vivier29de2802019-04-01 16:12:22 +0200129trace-events-subdirs += crypto
Kevin Wolfe84328f2019-06-13 17:33:57 +0200130trace-events-subdirs += monitor
Laurent Vivier29de2802019-04-01 16:12:22 +0200131ifeq ($(CONFIG_USER_ONLY),y)
132trace-events-subdirs += linux-user
133endif
134ifeq ($(CONFIG_BLOCK),y)
Daniel P. Berrange5b76dd12015-10-21 13:16:21 +0100135trace-events-subdirs += authz
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000136trace-events-subdirs += block
Laurent Vivier29de2802019-04-01 16:12:22 +0200137trace-events-subdirs += io
138trace-events-subdirs += nbd
139trace-events-subdirs += scsi
140endif
Laurent Vivier5b4a9692019-04-01 16:12:18 +0200141ifeq ($(CONFIG_SOFTMMU),y)
142trace-events-subdirs += audio
Philippe Mathieu-Daudé70149da2020-01-16 12:43:39 +0100143trace-events-subdirs += chardev
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300144trace-events-subdirs += hw/9pfs
145trace-events-subdirs += hw/acpi
146trace-events-subdirs += hw/alpha
147trace-events-subdirs += hw/arm
148trace-events-subdirs += hw/audio
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000149trace-events-subdirs += hw/block
150trace-events-subdirs += hw/block/dataplane
151trace-events-subdirs += hw/char
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000152trace-events-subdirs += hw/dma
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300153trace-events-subdirs += hw/hppa
Philippe Mathieu-Daudé08bb9b32018-06-08 13:15:33 +0100154trace-events-subdirs += hw/i2c
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000155trace-events-subdirs += hw/i386
156trace-events-subdirs += hw/i386/xen
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300157trace-events-subdirs += hw/ide
158trace-events-subdirs += hw/input
159trace-events-subdirs += hw/intc
160trace-events-subdirs += hw/isa
161trace-events-subdirs += hw/mem
Philippe Mathieu-Daudéab6bff42019-06-25 00:28:40 +0200162trace-events-subdirs += hw/mips
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300163trace-events-subdirs += hw/misc
164trace-events-subdirs += hw/misc/macio
165trace-events-subdirs += hw/net
166trace-events-subdirs += hw/nvram
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000167trace-events-subdirs += hw/pci
Mark Cave-Aylandbfec08b2018-01-21 08:59:45 +0000168trace-events-subdirs += hw/pci-host
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300169trace-events-subdirs += hw/ppc
170trace-events-subdirs += hw/rdma
171trace-events-subdirs += hw/rdma/vmw
Philippe Mathieu-Daudé877c1812019-10-04 01:03:52 +0200172trace-events-subdirs += hw/rtc
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000173trace-events-subdirs += hw/s390x
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300174trace-events-subdirs += hw/scsi
175trace-events-subdirs += hw/sd
176trace-events-subdirs += hw/sparc
177trace-events-subdirs += hw/sparc64
Cédric Le Goaterbd6ce9a2020-02-06 12:26:44 +0100178trace-events-subdirs += hw/ssi
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300179trace-events-subdirs += hw/timer
Stefan Bergerec427492018-03-02 20:18:41 -0500180trace-events-subdirs += hw/tpm
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300181trace-events-subdirs += hw/usb
182trace-events-subdirs += hw/vfio
183trace-events-subdirs += hw/virtio
Peter Maydell050c2ea2018-08-20 11:24:33 +0100184trace-events-subdirs += hw/watchdog
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300185trace-events-subdirs += hw/xen
Steffen Görtz805f61b2019-01-07 15:23:47 +0000186trace-events-subdirs += hw/gpio
Fabien Chouteau30efbf32019-02-12 18:38:39 +0100187trace-events-subdirs += hw/riscv
Laurent Vivier5b4a9692019-04-01 16:12:18 +0200188trace-events-subdirs += migration
189trace-events-subdirs += net
190trace-events-subdirs += ui
191endif
Philippe Mathieu-Daudé70149da2020-01-16 12:43:39 +0100192trace-events-subdirs += hw/core
Laurent Vivier5b4a9692019-04-01 16:12:18 +0200193trace-events-subdirs += hw/display
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300194trace-events-subdirs += qapi
195trace-events-subdirs += qom
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000196trace-events-subdirs += target/arm
Sven Schnelle23c3d562019-03-11 20:15:55 +0100197trace-events-subdirs += target/hppa
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000198trace-events-subdirs += target/i386
Philippe Mathieu-Daudéb44a7fb2017-03-04 15:56:52 -0300199trace-events-subdirs += target/mips
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000200trace-events-subdirs += target/ppc
Michael Clark929f0a72019-03-16 01:21:12 +0000201trace-events-subdirs += target/riscv
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300202trace-events-subdirs += target/s390x
203trace-events-subdirs += target/sparc
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300204trace-events-subdirs += util
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000205
206trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PATH)/%/trace-events)
207
208trace-obj-y = trace-root.o
209trace-obj-y += $(trace-events-subdirs:%=%/trace.o)
210trace-obj-$(CONFIG_TRACE_UST) += trace-ust-all.o
211trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace-root.o
212trace-obj-$(CONFIG_TRACE_DTRACE) += $(trace-events-subdirs:%=%/trace-dtrace.o)