blob: 02bf5ce11da02866961f0bce4255cf2139e4ea3a [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/
Paolo Bonzini3bc2f572012-11-16 18:35:27 +01005
Marc-André Lureau32d955a2016-12-12 15:49:01 +03006chardev-obj-y = chardev/
7
Paolo Bonzini3bc2f572012-11-16 18:35:27 +01008#######################################################################
Daniel P. Berrange5b76dd12015-10-21 13:16:21 +01009# authz-obj-y is code used by both qemu system emulation and qemu-img
10
11authz-obj-y = authz/
12
13#######################################################################
Andreas Färber0e8c9212010-01-06 20:24:05 +010014# block-obj-y is code used by both qemu system emulation and qemu-img
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 +010024#######################################################################
25# crypto-obj-y is code used by both qemu system emulation and qemu-img
26
27crypto-obj-y = crypto/
Gautham R Shenoy74db9202010-04-29 17:44:43 +053028
Daniel P. Berrange0c7012e2015-09-02 11:18:16 +010029#######################################################################
30# qom-obj-y is code used by both qemu system emulation and qemu-img
31
32qom-obj-y = qom/
33
Daniel P. Berrange666a3af2015-02-27 16:19:33 +000034#######################################################################
35# io-obj-y is code used by both qemu system emulation and qemu-img
36
37io-obj-y = io/
38
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/
Paolo Bonzini1559e0d2013-02-04 17:20:47 +010051common-obj-y += qdev-monitor.o device-hotplug.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
Stefan Weilc9159fe2012-10-05 19:39:33 +020070common-obj-y += vl.o
Michael Tokarev849d8282014-05-02 15:40:53 +040071vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
Philippe Mathieu-Daudéc39f95d2017-10-24 09:20:43 -030072common-obj-$(CONFIG_TPM) += tpm.o
Andreas Färber0e8c9212010-01-06 20:24:05 +010073
Anthony Liguoria9b7b2a2012-06-25 10:03:47 -050074common-obj-y += backends/
Marc-André Lureau6b10e572017-05-29 12:39:42 +040075common-obj-y += chardev/
Anthony Liguoria9b7b2a2012-06-25 10:03:47 -050076
Paolo Bonzini737f3512013-01-19 11:06:46 +010077common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
Fam Zhengc3883e12017-09-07 16:53:16 +080078qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS)
79qemu-seccomp.o-libs := $(SECCOMP_LIBS)
Eduardo Otubof7945732012-08-14 18:44:05 -030080
Peter Crosthwaite7df057b2015-05-24 13:20:14 -070081common-obj-$(CONFIG_FDT) += device_tree.o
82
Michael Roth2345c772011-07-19 14:50:32 -050083######################################################################
84# qapi
85
Markus Armbruster88554a22019-02-14 16:22:40 +010086common-obj-y += qapi/
Paolo Bonzini00082342013-01-19 11:06:47 +010087endif
Anthony Liguorie3193602011-09-02 12:34:47 -050088
Paolo Bonzini9444e9e2012-12-20 15:24:49 +010089#######################################################################
90# Target-independent parts used in system and user emulation
Richard Hendersonc482cb12016-06-28 11:37:27 -070091common-obj-y += cpus-common.o
Paolo Bonzini00082342013-01-19 11:06:47 +010092common-obj-y += hw/
93common-obj-y += qom/
94common-obj-y += disas/
Andreas Färberce008c12012-03-04 21:32:36 +010095
Michael Roth957f1f92011-08-11 15:38:12 -050096######################################################################
Stefan Weil0b516ef2013-08-08 20:18:07 +020097# Resource file for Windows executables
98version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o
Stefan Weil0b516ef2013-08-08 20:18:07 +020099
100######################################################################
Lluís Vilanova341ea692014-05-30 14:11:56 +0200101# tracing
102util-obj-y += trace/
Lluís Vilanova341ea692014-05-30 14:11:56 +0200103
104######################################################################
Michael Roth957f1f92011-08-11 15:38:12 -0500105# guest agent
106
Markus Armbrustereb815e22018-02-11 10:36:05 +0100107# FIXME: a few definitions from qapi/qapi-types.o and
108# qapi/qapi-visit.o are needed by libqemuutil.a. These should be
109# extracted into a QAPI schema module, or perhaps a separate schema.
Fam Zheng169a24a2014-08-07 10:34:41 +0800110qga-obj-y = qga/
Tomoki Sekiyamab39297a2013-08-07 11:40:18 -0400111qga-vss-dll-obj-y = qga/
David Marchanda75eb032014-09-08 11:17:48 +0200112
113######################################################################
114# contrib
Viktor Prutyanov3fa2d382018-08-29 15:41:25 +0300115elf2dmp-obj-y = contrib/elf2dmp/
Kamil Rytarowskib1449ed2017-07-14 09:33:45 +0100116ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/
117ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/
Marc-André Lureau7b2e5c62016-10-18 12:24:04 +0300118libvhost-user-obj-y = contrib/libvhost-user/
Felipe Franciosi49cc0342017-03-02 10:25:53 -0800119vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS)
120vhost-user-scsi.o-libs := $(LIBISCSI_LIBS)
121vhost-user-scsi-obj-y = contrib/vhost-user-scsi/
Changpeng Liu406d2aa2018-01-04 09:53:34 +0800122vhost-user-blk-obj-y = contrib/vhost-user-blk/
Yuval Shaiaa5d2f6f2018-12-21 16:40:15 +0200123rdmacm-mux-obj-y = contrib/rdmacm-mux/
Marc-André Lureau06914c92019-05-14 12:41:26 +0200124vhost-user-input-obj-y = contrib/vhost-user-input/
Marc-André Lureaud52c4542019-05-24 15:09:42 +0200125vhost-user-gpu-obj-y = contrib/vhost-user-gpu/
Daniel P. Berrange1412cf52016-06-16 09:39:47 +0100126
127######################################################################
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000128trace-events-subdirs =
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300129trace-events-subdirs += accel/kvm
130trace-events-subdirs += accel/tcg
Laurent Vivier29de2802019-04-01 16:12:22 +0200131trace-events-subdirs += crypto
Kevin Wolfe84328f2019-06-13 17:33:57 +0200132trace-events-subdirs += monitor
Laurent Vivier29de2802019-04-01 16:12:22 +0200133ifeq ($(CONFIG_USER_ONLY),y)
134trace-events-subdirs += linux-user
135endif
136ifeq ($(CONFIG_BLOCK),y)
Daniel P. Berrange5b76dd12015-10-21 13:16:21 +0100137trace-events-subdirs += authz
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000138trace-events-subdirs += block
Laurent Vivier29de2802019-04-01 16:12:22 +0200139trace-events-subdirs += io
140trace-events-subdirs += nbd
141trace-events-subdirs += scsi
142endif
Laurent Vivier5b4a9692019-04-01 16:12:18 +0200143ifeq ($(CONFIG_SOFTMMU),y)
Laurent Vivier8d5d5152019-04-01 16:12:21 +0200144trace-events-subdirs += chardev
Laurent Vivier5b4a9692019-04-01 16:12:18 +0200145trace-events-subdirs += audio
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300146trace-events-subdirs += hw/9pfs
147trace-events-subdirs += hw/acpi
148trace-events-subdirs += hw/alpha
149trace-events-subdirs += hw/arm
150trace-events-subdirs += hw/audio
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000151trace-events-subdirs += hw/block
152trace-events-subdirs += hw/block/dataplane
153trace-events-subdirs += hw/char
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000154trace-events-subdirs += hw/dma
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300155trace-events-subdirs += hw/hppa
Philippe Mathieu-Daudé08bb9b32018-06-08 13:15:33 +0100156trace-events-subdirs += hw/i2c
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000157trace-events-subdirs += hw/i386
158trace-events-subdirs += hw/i386/xen
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300159trace-events-subdirs += hw/ide
160trace-events-subdirs += hw/input
161trace-events-subdirs += hw/intc
162trace-events-subdirs += hw/isa
163trace-events-subdirs += hw/mem
Philippe Mathieu-Daudéab6bff42019-06-25 00:28:40 +0200164trace-events-subdirs += hw/mips
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300165trace-events-subdirs += hw/misc
166trace-events-subdirs += hw/misc/macio
167trace-events-subdirs += hw/net
168trace-events-subdirs += hw/nvram
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000169trace-events-subdirs += hw/pci
Mark Cave-Aylandbfec08b2018-01-21 08:59:45 +0000170trace-events-subdirs += hw/pci-host
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300171trace-events-subdirs += hw/ppc
172trace-events-subdirs += hw/rdma
173trace-events-subdirs += hw/rdma/vmw
Philippe Mathieu-Daudé877c1812019-10-04 01:03:52 +0200174trace-events-subdirs += hw/rtc
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000175trace-events-subdirs += hw/s390x
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300176trace-events-subdirs += hw/scsi
177trace-events-subdirs += hw/sd
178trace-events-subdirs += hw/sparc
179trace-events-subdirs += hw/sparc64
180trace-events-subdirs += hw/timer
Stefan Bergerec427492018-03-02 20:18:41 -0500181trace-events-subdirs += hw/tpm
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300182trace-events-subdirs += hw/usb
183trace-events-subdirs += hw/vfio
184trace-events-subdirs += hw/virtio
Peter Maydell050c2ea2018-08-20 11:24:33 +0100185trace-events-subdirs += hw/watchdog
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300186trace-events-subdirs += hw/xen
Steffen Görtz805f61b2019-01-07 15:23:47 +0000187trace-events-subdirs += hw/gpio
Fabien Chouteau30efbf32019-02-12 18:38:39 +0100188trace-events-subdirs += hw/riscv
Laurent Vivier5b4a9692019-04-01 16:12:18 +0200189trace-events-subdirs += migration
190trace-events-subdirs += net
191trace-events-subdirs += ui
192endif
193trace-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
Alexey Kardashevskiy26b8e6d2019-06-13 15:09:37 +1000205trace-events-subdirs += hw/core
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000206
207trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PATH)/%/trace-events)
208
209trace-obj-y = trace-root.o
210trace-obj-y += $(trace-events-subdirs:%=%/trace.o)
211trace-obj-$(CONFIG_TRACE_UST) += trace-ust-all.o
212trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace-root.o
213trace-obj-$(CONFIG_TRACE_DTRACE) += $(trace-events-subdirs:%=%/trace-dtrace.o)