blob: 72debbf5c5def66f8b77f3e3861a4dcf4e566d5f [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. Berrangé90e33df2018-06-08 17:24:57 +01003stub-obj-y = stubs/ util/ crypto/
Markus Armbruster39a18152015-09-16 13:06:28 +02004util-obj-y = 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/
28crypto-aes-obj-y = crypto/
Gautham R Shenoy74db9202010-04-29 17:44:43 +053029
Daniel P. Berrange0c7012e2015-09-02 11:18:16 +010030#######################################################################
31# qom-obj-y is code used by both qemu system emulation and qemu-img
32
33qom-obj-y = qom/
34
Daniel P. Berrange666a3af2015-02-27 16:19:33 +000035#######################################################################
36# io-obj-y is code used by both qemu system emulation and qemu-img
37
38io-obj-y = io/
39
Andreas Färber0e8c9212010-01-06 20:24:05 +010040######################################################################
Chen Wei-Ren050d9942011-11-15 20:47:11 +080041# Target independent part of system emulation. The long term path is to
42# suppress *all* target specific code in case of system emulation, i.e. a
43# single QEMU executable should support all CPUs and machines.
Andreas Färber0e8c9212010-01-06 20:24:05 +010044
Paolo Bonzini00082342013-01-19 11:06:47 +010045ifeq ($(CONFIG_SOFTMMU),y)
Fam Zhengba1183d2014-02-10 14:48:52 +080046common-obj-y = blockdev.o blockdev-nbd.o block/
Thomas Huth5ddc6482017-06-26 07:22:57 +020047common-obj-y += bootdevice.o iothread.o
Kevin Wolf1a90bc82018-05-03 19:01:14 +020048common-obj-y += job-qmp.o
Paolo Bonzinifd9400b2012-10-24 11:27:28 +020049common-obj-y += net/
Paolo Bonzini1559e0d2013-02-04 17:20:47 +010050common-obj-y += qdev-monitor.o device-hotplug.o
Blue Swirlb0cb640a2010-06-12 05:49:30 +000051common-obj-$(CONFIG_WIN32) += os-win32.o
52common-obj-$(CONFIG_POSIX) += os-posix.o
Gerd Hoffmann254e5952010-05-21 11:54:32 +020053
Paolo Bonziniee204772012-05-22 13:46:08 +020054common-obj-$(CONFIG_LINUX) += fsdev/
Paolo Bonziniee204772012-05-22 13:46:08 +020055
Dr. David Alan Gilbert60fe6372014-12-12 11:13:38 +000056common-obj-y += migration/
Andreas Färber0e8c9212010-01-06 20:24:05 +010057
Paolo Bonzinib0b68fc2012-05-22 13:49:02 +020058common-obj-y += audio/
Gerd Hoffmann08a05b32018-03-06 08:40:49 +010059common-obj-m += audio/
Paolo Bonzini3d5a3f92012-05-29 11:08:47 +020060common-obj-y += hw/
Paolo Bonzini6f991982012-12-17 18:17:08 +010061
Pavel Dovgalyukd73abd62015-09-17 19:23:37 +030062common-obj-y += replay/
63
Paolo Bonzini8867aef2012-05-22 13:48:15 +020064common-obj-y += ui/
Gerd Hoffmann61b4d9a2018-03-01 11:05:41 +010065common-obj-m += ui/
Paolo Bonzini3d5a3f92012-05-29 11:08:47 +020066common-obj-y += bt-host.o bt-vhci.o
Michael Tokarev849d8282014-05-02 15:40:53 +040067bt-host.o-cflags := $(BLUEZ_CFLAGS)
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
Anthony Liguori48a32be2011-09-02 12:34:48 -050086common-obj-y += qmp.o hmp.o
Markus Armbruster88554a22019-02-14 16:22:40 +010087common-obj-y += qapi/
Paolo Bonzini00082342013-01-19 11:06:47 +010088endif
Anthony Liguorie3193602011-09-02 12:34:47 -050089
Paolo Bonzini9444e9e2012-12-20 15:24:49 +010090#######################################################################
91# Target-independent parts used in system and user emulation
Richard Hendersonc482cb12016-06-28 11:37:27 -070092common-obj-y += cpus-common.o
Paolo Bonzini00082342013-01-19 11:06:47 +010093common-obj-y += hw/
94common-obj-y += qom/
95common-obj-y += disas/
Andreas Färberce008c12012-03-04 21:32:36 +010096
Michael Roth957f1f92011-08-11 15:38:12 -050097######################################################################
Stefan Weil0b516ef2013-08-08 20:18:07 +020098# Resource file for Windows executables
99version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o
Stefan Weil0b516ef2013-08-08 20:18:07 +0200100
101######################################################################
Lluís Vilanova341ea692014-05-30 14:11:56 +0200102# tracing
103util-obj-y += trace/
Lluís Vilanova341ea692014-05-30 14:11:56 +0200104
105######################################################################
Michael Roth957f1f92011-08-11 15:38:12 -0500106# guest agent
107
Markus Armbrustereb815e22018-02-11 10:36:05 +0100108# FIXME: a few definitions from qapi/qapi-types.o and
109# qapi/qapi-visit.o are needed by libqemuutil.a. These should be
110# extracted into a QAPI schema module, or perhaps a separate schema.
Fam Zheng169a24a2014-08-07 10:34:41 +0800111qga-obj-y = qga/
Tomoki Sekiyamab39297a2013-08-07 11:40:18 -0400112qga-vss-dll-obj-y = qga/
David Marchanda75eb032014-09-08 11:17:48 +0200113
114######################################################################
115# contrib
Viktor Prutyanov3fa2d382018-08-29 15:41:25 +0300116elf2dmp-obj-y = contrib/elf2dmp/
Kamil Rytarowskib1449ed2017-07-14 09:33:45 +0100117ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/
118ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/
Marc-André Lureau7b2e5c62016-10-18 12:24:04 +0300119libvhost-user-obj-y = contrib/libvhost-user/
Felipe Franciosi49cc0342017-03-02 10:25:53 -0800120vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS)
121vhost-user-scsi.o-libs := $(LIBISCSI_LIBS)
122vhost-user-scsi-obj-y = contrib/vhost-user-scsi/
Changpeng Liu406d2aa2018-01-04 09:53:34 +0800123vhost-user-blk-obj-y = contrib/vhost-user-blk/
Yuval Shaiaa5d2f6f2018-12-21 16:40:15 +0200124rdmacm-mux-obj-y = contrib/rdmacm-mux/
Daniel P. Berrange1412cf52016-06-16 09:39:47 +0100125
126######################################################################
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000127trace-events-subdirs =
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300128trace-events-subdirs += accel/kvm
129trace-events-subdirs += accel/tcg
130trace-events-subdirs += audio
Daniel P. Berrange5b76dd12015-10-21 13:16:21 +0100131trace-events-subdirs += authz
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000132trace-events-subdirs += block
Marc-André Lureau6b10e572017-05-29 12:39:42 +0400133trace-events-subdirs += chardev
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300134trace-events-subdirs += crypto
135trace-events-subdirs += hw/9pfs
136trace-events-subdirs += hw/acpi
137trace-events-subdirs += hw/alpha
138trace-events-subdirs += hw/arm
139trace-events-subdirs += hw/audio
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000140trace-events-subdirs += hw/block
141trace-events-subdirs += hw/block/dataplane
142trace-events-subdirs += hw/char
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000143trace-events-subdirs += hw/display
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000144trace-events-subdirs += hw/dma
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300145trace-events-subdirs += hw/hppa
Philippe Mathieu-Daudé08bb9b32018-06-08 13:15:33 +0100146trace-events-subdirs += hw/i2c
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000147trace-events-subdirs += hw/i386
148trace-events-subdirs += hw/i386/xen
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300149trace-events-subdirs += hw/ide
150trace-events-subdirs += hw/input
151trace-events-subdirs += hw/intc
152trace-events-subdirs += hw/isa
153trace-events-subdirs += hw/mem
154trace-events-subdirs += hw/misc
155trace-events-subdirs += hw/misc/macio
156trace-events-subdirs += hw/net
157trace-events-subdirs += hw/nvram
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000158trace-events-subdirs += hw/pci
Mark Cave-Aylandbfec08b2018-01-21 08:59:45 +0000159trace-events-subdirs += hw/pci-host
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300160trace-events-subdirs += hw/ppc
161trace-events-subdirs += hw/rdma
162trace-events-subdirs += hw/rdma/vmw
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000163trace-events-subdirs += hw/s390x
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300164trace-events-subdirs += hw/scsi
165trace-events-subdirs += hw/sd
166trace-events-subdirs += hw/sparc
167trace-events-subdirs += hw/sparc64
168trace-events-subdirs += hw/timer
Stefan Bergerec427492018-03-02 20:18:41 -0500169trace-events-subdirs += hw/tpm
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300170trace-events-subdirs += hw/usb
171trace-events-subdirs += hw/vfio
172trace-events-subdirs += hw/virtio
Peter Maydell050c2ea2018-08-20 11:24:33 +0100173trace-events-subdirs += hw/watchdog
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300174trace-events-subdirs += hw/xen
Steffen Görtz805f61b2019-01-07 15:23:47 +0000175trace-events-subdirs += hw/gpio
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300176trace-events-subdirs += io
177trace-events-subdirs += linux-user
178trace-events-subdirs += migration
179trace-events-subdirs += nbd
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000180trace-events-subdirs += net
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300181trace-events-subdirs += qapi
182trace-events-subdirs += qom
183trace-events-subdirs += scsi
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000184trace-events-subdirs += target/arm
Sven Schnelle23c3d562019-03-11 20:15:55 +0100185trace-events-subdirs += target/hppa
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000186trace-events-subdirs += target/i386
Philippe Mathieu-Daudéb44a7fb2017-03-04 15:56:52 -0300187trace-events-subdirs += target/mips
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000188trace-events-subdirs += target/ppc
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300189trace-events-subdirs += target/s390x
190trace-events-subdirs += target/sparc
191trace-events-subdirs += ui
192trace-events-subdirs += util
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000193
194trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PATH)/%/trace-events)
195
196trace-obj-y = trace-root.o
197trace-obj-y += $(trace-events-subdirs:%=%/trace.o)
198trace-obj-$(CONFIG_TRACE_UST) += trace-ust-all.o
199trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace-root.o
200trace-obj-$(CONFIG_TRACE_DTRACE) += $(trace-events-subdirs:%=%/trace-dtrace.o)