blob: 319f14d9373d55c225f460e465f97d2bcb37bc69 [file] [log] [blame]
Eric Blakebf582c32018-11-16 14:00:16 -06001QAPI_MODULES = block-core block char common crypto introspect job migration
2QAPI_MODULES += misc net rocker run-state sockets tpm trace transaction ui
3
Andreas Färber0e8c9212010-01-06 20:24:05 +01004#######################################################################
Paolo Bonzinia3728232012-12-20 16:10:26 +01005# Common libraries for tools and emulators
Daniel P. Berrangeb917da42015-10-31 14:39:52 +09006stub-obj-y = stubs/ crypto/
Markus Armbruster39a18152015-09-16 13:06:28 +02007util-obj-y = util/ qobject/ qapi/
Markus Armbrustereb815e22018-02-11 10:36:05 +01008util-obj-y += qapi/qapi-builtin-types.o
9util-obj-y += qapi/qapi-types.o
Eric Blakebf582c32018-11-16 14:00:16 -060010util-obj-y += $(QAPI_MODULES:%=qapi/qapi-types-%.o)
Markus Armbrustereb815e22018-02-11 10:36:05 +010011util-obj-y += qapi/qapi-builtin-visit.o
12util-obj-y += qapi/qapi-visit.o
Eric Blakebf582c32018-11-16 14:00:16 -060013util-obj-y += $(QAPI_MODULES:%=qapi/qapi-visit-%.o)
Markus Armbrustereb815e22018-02-11 10:36:05 +010014util-obj-y += qapi/qapi-events.o
Eric Blakebf582c32018-11-16 14:00:16 -060015util-obj-y += $(QAPI_MODULES:%=qapi/qapi-events-%.o)
Markus Armbrustereb815e22018-02-11 10:36:05 +010016util-obj-y += qapi/qapi-introspect.o
Paolo Bonzini3bc2f572012-11-16 18:35:27 +010017
Marc-André Lureau32d955a2016-12-12 15:49:01 +030018chardev-obj-y = chardev/
19
Paolo Bonzini3bc2f572012-11-16 18:35:27 +010020#######################################################################
Andreas Färber0e8c9212010-01-06 20:24:05 +010021# block-obj-y is code used by both qemu system emulation and qemu-img
22
Fam Zheng798bfe02016-01-14 16:41:02 +080023block-obj-y += nbd/
Kevin Wolf33e9e9b2018-04-12 17:29:59 +020024block-obj-y += block.o blockjob.o job.o
Paolo Bonzinie5b57282017-08-22 07:08:27 +020025block-obj-y += block/ scsi/
Kevin Wolf587da2c2013-06-05 14:19:41 +020026block-obj-y += qemu-io-cmds.o
Changlong Xie190b9a82016-07-27 15:01:49 +080027block-obj-$(CONFIG_REPLICATION) += replication.o
Andreas Färber0e8c9212010-01-06 20:24:05 +010028
Fam Zhengcc475692014-02-10 14:48:59 +080029block-obj-m = block/
30
Daniel P. Berrangefb377262015-09-02 10:57:27 +010031#######################################################################
32# crypto-obj-y is code used by both qemu system emulation and qemu-img
33
34crypto-obj-y = crypto/
35crypto-aes-obj-y = crypto/
Gautham R Shenoy74db9202010-04-29 17:44:43 +053036
Daniel P. Berrange0c7012e2015-09-02 11:18:16 +010037#######################################################################
38# qom-obj-y is code used by both qemu system emulation and qemu-img
39
40qom-obj-y = qom/
41
Daniel P. Berrange666a3af2015-02-27 16:19:33 +000042#######################################################################
43# io-obj-y is code used by both qemu system emulation and qemu-img
44
45io-obj-y = io/
46
Andreas Färber0e8c9212010-01-06 20:24:05 +010047######################################################################
Chen Wei-Ren050d9942011-11-15 20:47:11 +080048# Target independent part of system emulation. The long term path is to
49# suppress *all* target specific code in case of system emulation, i.e. a
50# single QEMU executable should support all CPUs and machines.
Andreas Färber0e8c9212010-01-06 20:24:05 +010051
Paolo Bonzini00082342013-01-19 11:06:47 +010052ifeq ($(CONFIG_SOFTMMU),y)
Fam Zhengba1183d2014-02-10 14:48:52 +080053common-obj-y = blockdev.o blockdev-nbd.o block/
Thomas Huth5ddc6482017-06-26 07:22:57 +020054common-obj-y += bootdevice.o iothread.o
Kevin Wolf1a90bc82018-05-03 19:01:14 +020055common-obj-y += job-qmp.o
Paolo Bonzinifd9400b2012-10-24 11:27:28 +020056common-obj-y += net/
Paolo Bonzini1559e0d2013-02-04 17:20:47 +010057common-obj-y += qdev-monitor.o device-hotplug.o
Blue Swirlb0cb640a2010-06-12 05:49:30 +000058common-obj-$(CONFIG_WIN32) += os-win32.o
59common-obj-$(CONFIG_POSIX) += os-posix.o
Gerd Hoffmann254e5952010-05-21 11:54:32 +020060
Paolo Bonziniee204772012-05-22 13:46:08 +020061common-obj-$(CONFIG_LINUX) += fsdev/
Paolo Bonziniee204772012-05-22 13:46:08 +020062
Dr. David Alan Gilbert60fe6372014-12-12 11:13:38 +000063common-obj-y += migration/
Andreas Färber0e8c9212010-01-06 20:24:05 +010064
Paolo Bonzinib0b68fc2012-05-22 13:49:02 +020065common-obj-y += audio/
Gerd Hoffmann08a05b32018-03-06 08:40:49 +010066common-obj-m += audio/
Paolo Bonzini3d5a3f92012-05-29 11:08:47 +020067common-obj-y += hw/
Paolo Bonzini6f991982012-12-17 18:17:08 +010068
Pavel Dovgalyukd73abd62015-09-17 19:23:37 +030069common-obj-y += replay/
70
Paolo Bonzini8867aef2012-05-22 13:48:15 +020071common-obj-y += ui/
Gerd Hoffmann61b4d9a2018-03-01 11:05:41 +010072common-obj-m += ui/
Paolo Bonzini3d5a3f92012-05-29 11:08:47 +020073common-obj-y += bt-host.o bt-vhci.o
Michael Tokarev849d8282014-05-02 15:40:53 +040074bt-host.o-cflags := $(BLUEZ_CFLAGS)
Corentin Chary3e230dd2010-07-07 20:57:52 +020075
Stefan Weilc9159fe2012-10-05 19:39:33 +020076common-obj-y += dma-helpers.o
Stefan Weilc9159fe2012-10-05 19:39:33 +020077common-obj-y += vl.o
Michael Tokarev849d8282014-05-02 15:40:53 +040078vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
Philippe Mathieu-Daudéc39f95d2017-10-24 09:20:43 -030079common-obj-$(CONFIG_TPM) += tpm.o
Andreas Färber0e8c9212010-01-06 20:24:05 +010080
Paolo Bonzini4c696052012-05-22 13:49:43 +020081common-obj-$(CONFIG_SLIRP) += slirp/
Andreas Färber0e8c9212010-01-06 20:24:05 +010082
Anthony Liguoria9b7b2a2012-06-25 10:03:47 -050083common-obj-y += backends/
Marc-André Lureau6b10e572017-05-29 12:39:42 +040084common-obj-y += chardev/
Anthony Liguoria9b7b2a2012-06-25 10:03:47 -050085
Paolo Bonzini737f3512013-01-19 11:06:46 +010086common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
Fam Zhengc3883e12017-09-07 16:53:16 +080087qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS)
88qemu-seccomp.o-libs := $(SECCOMP_LIBS)
Eduardo Otubof7945732012-08-14 18:44:05 -030089
Peter Crosthwaite7df057b2015-05-24 13:20:14 -070090common-obj-$(CONFIG_FDT) += device_tree.o
91
Michael Roth2345c772011-07-19 14:50:32 -050092######################################################################
93# qapi
94
Markus Armbrustereb815e22018-02-11 10:36:05 +010095common-obj-y += qapi/qapi-commands.o
Eric Blakebf582c32018-11-16 14:00:16 -060096common-obj-y += $(QAPI_MODULES:%=qapi/qapi-commands-%.o)
Markus Armbrustereb815e22018-02-11 10:36:05 +010097common-obj-y += qapi/qapi-introspect.o
Anthony Liguori48a32be2011-09-02 12:34:48 -050098common-obj-y += qmp.o hmp.o
Paolo Bonzini00082342013-01-19 11:06:47 +010099endif
Anthony Liguorie3193602011-09-02 12:34:47 -0500100
Paolo Bonzini9444e9e2012-12-20 15:24:49 +0100101#######################################################################
102# Target-independent parts used in system and user emulation
Richard Hendersonc482cb12016-06-28 11:37:27 -0700103common-obj-y += cpus-common.o
Paolo Bonzini00082342013-01-19 11:06:47 +0100104common-obj-y += hw/
105common-obj-y += qom/
106common-obj-y += disas/
Andreas Färberce008c12012-03-04 21:32:36 +0100107
Michael Roth957f1f92011-08-11 15:38:12 -0500108######################################################################
Stefan Weil0b516ef2013-08-08 20:18:07 +0200109# Resource file for Windows executables
110version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o
Stefan Weil0b516ef2013-08-08 20:18:07 +0200111
112######################################################################
Lluís Vilanova341ea692014-05-30 14:11:56 +0200113# tracing
114util-obj-y += trace/
115target-obj-y += trace/
116
117######################################################################
Michael Roth957f1f92011-08-11 15:38:12 -0500118# guest agent
119
Markus Armbrustereb815e22018-02-11 10:36:05 +0100120# FIXME: a few definitions from qapi/qapi-types.o and
121# qapi/qapi-visit.o are needed by libqemuutil.a. These should be
122# extracted into a QAPI schema module, or perhaps a separate schema.
Fam Zheng169a24a2014-08-07 10:34:41 +0800123qga-obj-y = qga/
Tomoki Sekiyamab39297a2013-08-07 11:40:18 -0400124qga-vss-dll-obj-y = qga/
David Marchanda75eb032014-09-08 11:17:48 +0200125
126######################################################################
127# contrib
Viktor Prutyanov3fa2d382018-08-29 15:41:25 +0300128elf2dmp-obj-y = contrib/elf2dmp/
Kamil Rytarowskib1449ed2017-07-14 09:33:45 +0100129ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/
130ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/
Marc-André Lureau7b2e5c62016-10-18 12:24:04 +0300131libvhost-user-obj-y = contrib/libvhost-user/
Felipe Franciosi49cc0342017-03-02 10:25:53 -0800132vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS)
133vhost-user-scsi.o-libs := $(LIBISCSI_LIBS)
134vhost-user-scsi-obj-y = contrib/vhost-user-scsi/
Changpeng Liu406d2aa2018-01-04 09:53:34 +0800135vhost-user-blk-obj-y = contrib/vhost-user-blk/
Yuval Shaiaa5d2f6f2018-12-21 16:40:15 +0200136rdmacm-mux-obj-y = contrib/rdmacm-mux/
Daniel P. Berrange1412cf52016-06-16 09:39:47 +0100137
138######################################################################
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000139trace-events-subdirs =
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300140trace-events-subdirs += accel/kvm
141trace-events-subdirs += accel/tcg
142trace-events-subdirs += audio
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000143trace-events-subdirs += block
Marc-André Lureau6b10e572017-05-29 12:39:42 +0400144trace-events-subdirs += chardev
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300145trace-events-subdirs += crypto
146trace-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/display
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000155trace-events-subdirs += hw/dma
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300156trace-events-subdirs += hw/hppa
Philippe Mathieu-Daudé08bb9b32018-06-08 13:15:33 +0100157trace-events-subdirs += hw/i2c
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000158trace-events-subdirs += hw/i386
159trace-events-subdirs += hw/i386/xen
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300160trace-events-subdirs += hw/ide
161trace-events-subdirs += hw/input
162trace-events-subdirs += hw/intc
163trace-events-subdirs += hw/isa
164trace-events-subdirs += hw/mem
165trace-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
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000174trace-events-subdirs += hw/s390x
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300175trace-events-subdirs += hw/scsi
176trace-events-subdirs += hw/sd
177trace-events-subdirs += hw/sparc
178trace-events-subdirs += hw/sparc64
179trace-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
186trace-events-subdirs += io
187trace-events-subdirs += linux-user
188trace-events-subdirs += migration
189trace-events-subdirs += nbd
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000190trace-events-subdirs += net
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300191trace-events-subdirs += qapi
192trace-events-subdirs += qom
193trace-events-subdirs += scsi
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000194trace-events-subdirs += target/arm
195trace-events-subdirs += target/i386
Philippe Mathieu-Daudéb44a7fb2017-03-04 15:56:52 -0300196trace-events-subdirs += target/mips
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000197trace-events-subdirs += target/ppc
Philippe Mathieu-Daudéeb7ccb32018-05-28 02:40:55 -0300198trace-events-subdirs += target/s390x
199trace-events-subdirs += target/sparc
200trace-events-subdirs += ui
201trace-events-subdirs += util
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000202
203trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PATH)/%/trace-events)
204
205trace-obj-y = trace-root.o
206trace-obj-y += $(trace-events-subdirs:%=%/trace.o)
207trace-obj-$(CONFIG_TRACE_UST) += trace-ust-all.o
208trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace-root.o
209trace-obj-$(CONFIG_TRACE_DTRACE) += $(trace-events-subdirs:%=%/trace-dtrace.o)