blob: 669d8d684d303b64a3f83d612158493cd7296d74 [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/
5util-obj-y += qmp-introspect.o qapi-types.o qapi-visit.o qapi-event.o
Paolo Bonzini3bc2f572012-11-16 18:35:27 +01006
Marc-André Lureau32d955a2016-12-12 15:49:01 +03007chardev-obj-y = chardev/
8
Paolo Bonzini3bc2f572012-11-16 18:35:27 +01009#######################################################################
Andreas Färber0e8c9212010-01-06 20:24:05 +010010# block-obj-y is code used by both qemu system emulation and qemu-img
11
Fam Zheng798bfe02016-01-14 16:41:02 +080012block-obj-y += nbd/
13block-obj-y += block.o blockjob.o
Paolo Bonzinie5b57282017-08-22 07:08:27 +020014block-obj-y += block/ scsi/
Kevin Wolf587da2c2013-06-05 14:19:41 +020015block-obj-y += qemu-io-cmds.o
Changlong Xie190b9a82016-07-27 15:01:49 +080016block-obj-$(CONFIG_REPLICATION) += replication.o
Andreas Färber0e8c9212010-01-06 20:24:05 +010017
Fam Zhengcc475692014-02-10 14:48:59 +080018block-obj-m = block/
19
Daniel P. Berrangefb377262015-09-02 10:57:27 +010020#######################################################################
21# crypto-obj-y is code used by both qemu system emulation and qemu-img
22
23crypto-obj-y = crypto/
24crypto-aes-obj-y = crypto/
Gautham R Shenoy74db9202010-04-29 17:44:43 +053025
Daniel P. Berrange0c7012e2015-09-02 11:18:16 +010026#######################################################################
27# qom-obj-y is code used by both qemu system emulation and qemu-img
28
29qom-obj-y = qom/
30
Daniel P. Berrange666a3af2015-02-27 16:19:33 +000031#######################################################################
32# io-obj-y is code used by both qemu system emulation and qemu-img
33
34io-obj-y = io/
35
Andreas Färber0e8c9212010-01-06 20:24:05 +010036######################################################################
Chen Wei-Ren050d9942011-11-15 20:47:11 +080037# Target independent part of system emulation. The long term path is to
38# suppress *all* target specific code in case of system emulation, i.e. a
39# single QEMU executable should support all CPUs and machines.
Andreas Färber0e8c9212010-01-06 20:24:05 +010040
Paolo Bonzini00082342013-01-19 11:06:47 +010041ifeq ($(CONFIG_SOFTMMU),y)
Fam Zhengba1183d2014-02-10 14:48:52 +080042common-obj-y = blockdev.o blockdev-nbd.o block/
Thomas Huth5ddc6482017-06-26 07:22:57 +020043common-obj-y += bootdevice.o iothread.o
Paolo Bonzinifd9400b2012-10-24 11:27:28 +020044common-obj-y += net/
Paolo Bonzini1559e0d2013-02-04 17:20:47 +010045common-obj-y += qdev-monitor.o device-hotplug.o
Blue Swirlb0cb640a2010-06-12 05:49:30 +000046common-obj-$(CONFIG_WIN32) += os-win32.o
47common-obj-$(CONFIG_POSIX) += os-posix.o
Gerd Hoffmann254e5952010-05-21 11:54:32 +020048
Paolo Bonziniee204772012-05-22 13:46:08 +020049common-obj-$(CONFIG_LINUX) += fsdev/
Paolo Bonziniee204772012-05-22 13:46:08 +020050
Dr. David Alan Gilbert60fe6372014-12-12 11:13:38 +000051common-obj-y += migration/
Andreas Färber0e8c9212010-01-06 20:24:05 +010052
Paolo Bonzinib0b68fc2012-05-22 13:49:02 +020053common-obj-y += audio/
Paolo Bonzini3d5a3f92012-05-29 11:08:47 +020054common-obj-y += hw/
Paolo Bonzini6f991982012-12-17 18:17:08 +010055
Pavel Dovgalyukd73abd62015-09-17 19:23:37 +030056common-obj-y += replay/
57
Paolo Bonzini8867aef2012-05-22 13:48:15 +020058common-obj-y += ui/
Paolo Bonzini3d5a3f92012-05-29 11:08:47 +020059common-obj-y += bt-host.o bt-vhci.o
Michael Tokarev849d8282014-05-02 15:40:53 +040060bt-host.o-cflags := $(BLUEZ_CFLAGS)
Corentin Chary3e230dd2010-07-07 20:57:52 +020061
Stefan Weilc9159fe2012-10-05 19:39:33 +020062common-obj-y += dma-helpers.o
Stefan Weilc9159fe2012-10-05 19:39:33 +020063common-obj-y += vl.o
Michael Tokarev849d8282014-05-02 15:40:53 +040064vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
Philippe Mathieu-Daudéc39f95d2017-10-24 09:20:43 -030065common-obj-$(CONFIG_TPM) += tpm.o
Andreas Färber0e8c9212010-01-06 20:24:05 +010066
Paolo Bonzini4c696052012-05-22 13:49:43 +020067common-obj-$(CONFIG_SLIRP) += slirp/
Andreas Färber0e8c9212010-01-06 20:24:05 +010068
Anthony Liguoria9b7b2a2012-06-25 10:03:47 -050069common-obj-y += backends/
Marc-André Lureau6b10e572017-05-29 12:39:42 +040070common-obj-y += chardev/
Anthony Liguoria9b7b2a2012-06-25 10:03:47 -050071
Paolo Bonzini737f3512013-01-19 11:06:46 +010072common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
Fam Zhengc3883e12017-09-07 16:53:16 +080073qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS)
74qemu-seccomp.o-libs := $(SECCOMP_LIBS)
Eduardo Otubof7945732012-08-14 18:44:05 -030075
Peter Crosthwaite7df057b2015-05-24 13:20:14 -070076common-obj-$(CONFIG_FDT) += device_tree.o
77
Michael Roth2345c772011-07-19 14:50:32 -050078######################################################################
79# qapi
80
Eduardo Habkost8e8aba52013-05-06 13:20:07 -030081common-obj-y += qmp-marshal.o
Markus Armbruster39a18152015-09-16 13:06:28 +020082common-obj-y += qmp-introspect.o
Anthony Liguori48a32be2011-09-02 12:34:48 -050083common-obj-y += qmp.o hmp.o
Paolo Bonzini00082342013-01-19 11:06:47 +010084endif
Anthony Liguorie3193602011-09-02 12:34:47 -050085
Paolo Bonzini9444e9e2012-12-20 15:24:49 +010086#######################################################################
87# Target-independent parts used in system and user emulation
Richard Hendersonc482cb12016-06-28 11:37:27 -070088common-obj-y += cpus-common.o
Paolo Bonzini00082342013-01-19 11:06:47 +010089common-obj-y += hw/
90common-obj-y += qom/
91common-obj-y += disas/
Andreas Färberce008c12012-03-04 21:32:36 +010092
Michael Roth957f1f92011-08-11 15:38:12 -050093######################################################################
Stefan Weil0b516ef2013-08-08 20:18:07 +020094# Resource file for Windows executables
95version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o
Stefan Weil0b516ef2013-08-08 20:18:07 +020096
97######################################################################
Lluís Vilanova341ea692014-05-30 14:11:56 +020098# tracing
99util-obj-y += trace/
100target-obj-y += trace/
101
102######################################################################
Michael Roth957f1f92011-08-11 15:38:12 -0500103# guest agent
104
Paolo Bonzini59cacde2012-12-20 15:03:18 +0100105# FIXME: a few definitions from qapi-types.o/qapi-visit.o are needed
106# by libqemuutil.a. These should be moved to a separate .json schema.
Fam Zheng169a24a2014-08-07 10:34:41 +0800107qga-obj-y = qga/
Tomoki Sekiyamab39297a2013-08-07 11:40:18 -0400108qga-vss-dll-obj-y = qga/
David Marchanda75eb032014-09-08 11:17:48 +0200109
110######################################################################
111# contrib
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/
Daniel P. Berrange1412cf52016-06-16 09:39:47 +0100119
120######################################################################
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000121trace-events-subdirs =
122trace-events-subdirs += util
123trace-events-subdirs += crypto
124trace-events-subdirs += io
125trace-events-subdirs += migration
126trace-events-subdirs += block
Marc-André Lureau6b10e572017-05-29 12:39:42 +0400127trace-events-subdirs += chardev
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000128trace-events-subdirs += hw/block
129trace-events-subdirs += hw/block/dataplane
130trace-events-subdirs += hw/char
131trace-events-subdirs += hw/intc
132trace-events-subdirs += hw/net
133trace-events-subdirs += hw/virtio
134trace-events-subdirs += hw/audio
135trace-events-subdirs += hw/misc
136trace-events-subdirs += hw/usb
137trace-events-subdirs += hw/scsi
138trace-events-subdirs += hw/nvram
139trace-events-subdirs += hw/display
140trace-events-subdirs += hw/input
141trace-events-subdirs += hw/timer
142trace-events-subdirs += hw/dma
143trace-events-subdirs += hw/sparc
Mark Cave-Ayland8bcf1c72017-12-21 07:32:57 +0000144trace-events-subdirs += hw/sparc64
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000145trace-events-subdirs += hw/sd
146trace-events-subdirs += hw/isa
147trace-events-subdirs += hw/mem
148trace-events-subdirs += hw/i386
149trace-events-subdirs += hw/i386/xen
150trace-events-subdirs += hw/9pfs
151trace-events-subdirs += hw/ppc
152trace-events-subdirs += hw/pci
153trace-events-subdirs += hw/s390x
154trace-events-subdirs += hw/vfio
155trace-events-subdirs += hw/acpi
156trace-events-subdirs += hw/arm
157trace-events-subdirs += hw/alpha
158trace-events-subdirs += hw/xen
John Snow3eee2612017-09-18 15:01:25 -0400159trace-events-subdirs += hw/ide
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000160trace-events-subdirs += ui
161trace-events-subdirs += audio
162trace-events-subdirs += net
163trace-events-subdirs += target/arm
164trace-events-subdirs += target/i386
Philippe Mathieu-Daudéb44a7fb2017-03-04 15:56:52 -0300165trace-events-subdirs += target/mips
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000166trace-events-subdirs += target/sparc
167trace-events-subdirs += target/s390x
168trace-events-subdirs += target/ppc
169trace-events-subdirs += qom
170trace-events-subdirs += linux-user
171trace-events-subdirs += qapi
Yang Zhongd9bb58e2017-06-02 14:06:44 +0800172trace-events-subdirs += accel/tcg
Yang Zhong92229a52017-06-02 14:06:46 +0800173trace-events-subdirs += accel/kvm
Vladimir Sementsov-Ogievskiy95884632017-07-07 18:29:18 +0300174trace-events-subdirs += nbd
Paolo Bonzini7c9e5272017-08-21 18:58:56 +0200175trace-events-subdirs += scsi
Daniel P. Berrange0ab8ed12017-01-25 16:14:15 +0000176
177trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PATH)/%/trace-events)
178
179trace-obj-y = trace-root.o
180trace-obj-y += $(trace-events-subdirs:%=%/trace.o)
181trace-obj-$(CONFIG_TRACE_UST) += trace-ust-all.o
182trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace-root.o
183trace-obj-$(CONFIG_TRACE_DTRACE) += $(trace-events-subdirs:%=%/trace-dtrace.o)