blob: 286ce069b2ca5b53fed5d196c0ef6d9907ffc088 [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 Bonzini3bc2f572012-11-16 18:35:27 +01003stub-obj-y = stubs/
Paolo Bonziniff667e22012-12-21 09:45:20 +01004util-obj-y = util/ qobject/ qapi/ trace/
Paolo Bonzini3bc2f572012-11-16 18:35:27 +01005
6#######################################################################
Andreas Färber0e8c9212010-01-06 20:24:05 +01007# block-obj-y is code used by both qemu system emulation and qemu-img
8
Paolo Bonzinif157ebb2012-12-20 16:09:36 +01009block-obj-y = async.o thread-pool.o
10block-obj-y += nbd.o block.o blockjob.o
Paolo Bonzinif157ebb2012-12-20 16:09:36 +010011block-obj-y += main-loop.o iohandler.o qemu-timer.o
12block-obj-$(CONFIG_POSIX) += aio-posix.o
13block-obj-$(CONFIG_WIN32) += aio-win32.o
Paolo Bonzini7456e4c2012-05-22 13:44:39 +020014block-obj-y += block/
Paolo Bonzini576d5502012-12-20 15:27:51 +010015block-obj-y += qapi-types.o qapi-visit.o
Andreas Färber0e8c9212010-01-06 20:24:05 +010016
Paolo Bonzini84ecb7a2012-12-20 17:38:14 +010017block-obj-y += qemu-coroutine.o qemu-coroutine-lock.o qemu-coroutine-io.o
18block-obj-y += qemu-coroutine-sleep.o
Peter Maydell7c2acc72013-04-08 12:11:27 +010019block-obj-y += coroutine-$(CONFIG_COROUTINE_BACKEND).o
Paolo Bonzini84ecb7a2012-12-20 17:38:14 +010020
Aneesh Kumar K.V9fe1ebe2011-06-01 12:35:13 +053021ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy)
Paul Brook01af7da2010-11-26 22:08:48 +000022# Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add.
23# only pull in the actual virtio-9p device if we also enabled virtio.
24CONFIG_REALLY_VIRTFS=y
25endif
Gautham R Shenoy74db9202010-04-29 17:44:43 +053026
Andreas Färber0e8c9212010-01-06 20:24:05 +010027######################################################################
Paolo Bonzini65980012013-01-19 11:06:45 +010028# smartcard
29
30libcacard-y += libcacard/cac.o libcacard/event.o
31libcacard-y += libcacard/vcard.o libcacard/vreader.o
32libcacard-y += libcacard/vcard_emul_nss.o
33libcacard-y += libcacard/vcard_emul_type.o
34libcacard-y += libcacard/card_7816.o
Alon Levy0b6a16c2013-03-05 16:27:43 +020035libcacard-y += libcacard/vcardt.o
Paolo Bonzini65980012013-01-19 11:06:45 +010036
37######################################################################
Chen Wei-Ren050d9942011-11-15 20:47:11 +080038# Target independent part of system emulation. The long term path is to
39# suppress *all* target specific code in case of system emulation, i.e. a
40# single QEMU executable should support all CPUs and machines.
Andreas Färber0e8c9212010-01-06 20:24:05 +010041
Paolo Bonzini00082342013-01-19 11:06:47 +010042ifeq ($(CONFIG_SOFTMMU),y)
Paolo Bonzini6dd844d2012-08-22 16:43:07 +020043common-obj-y = $(block-obj-y) blockdev.o blockdev-nbd.o block/
Paolo Bonzinifd9400b2012-10-24 11:27:28 +020044common-obj-y += net/
Paolo Bonzini28ecbae2012-11-28 12:06:30 +010045common-obj-y += readline.o
Paolo Bonzini1559e0d2013-02-04 17:20:47 +010046common-obj-y += qdev-monitor.o device-hotplug.o
Blue Swirlb0cb640a2010-06-12 05:49:30 +000047common-obj-$(CONFIG_WIN32) += os-win32.o
48common-obj-$(CONFIG_POSIX) += os-posix.o
Gerd Hoffmann254e5952010-05-21 11:54:32 +020049
Paolo Bonziniee204772012-05-22 13:46:08 +020050common-obj-$(CONFIG_LINUX) += fsdev/
Paolo Bonziniee204772012-05-22 13:46:08 +020051
Juan Quintela0d82d0e2012-10-03 14:18:33 +020052common-obj-y += migration.o migration-tcp.o
Avi Kivityc5705a72011-12-20 15:59:12 +020053common-obj-y += qemu-char.o #aio.o
Paolo Bonzinif157ebb2012-12-20 16:09:36 +010054common-obj-y += block-migration.o
Orit Wassermanba2e28e2013-01-31 09:12:15 +020055common-obj-y += page_cache.o xbzrle.o
Andreas Färber0e8c9212010-01-06 20:24:05 +010056
Andreas Färber0e8c9212010-01-06 20:24:05 +010057common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
58
Paolo Bonzini8867aef2012-05-22 13:48:15 +020059common-obj-$(CONFIG_SPICE) += spice-qemu-char.o
Paolo Bonzinib0b68fc2012-05-22 13:49:02 +020060
61common-obj-y += audio/
Paolo Bonzini3d5a3f92012-05-29 11:08:47 +020062common-obj-y += hw/
Paolo Bonzini6f991982012-12-17 18:17:08 +010063
Paolo Bonzini8867aef2012-05-22 13:48:15 +020064common-obj-y += ui/
Paolo Bonzini3d5a3f92012-05-29 11:08:47 +020065common-obj-y += bt-host.o bt-vhci.o
Corentin Chary3e230dd2010-07-07 20:57:52 +020066
Stefan Weilc9159fe2012-10-05 19:39:33 +020067common-obj-y += dma-helpers.o
Stefan Weilc9159fe2012-10-05 19:39:33 +020068common-obj-y += vl.o
Paolo Bonzinibdee56f2013-04-02 18:28:41 +020069common-obj-y += tpm.o
Andreas Färber0e8c9212010-01-06 20:24:05 +010070
Paolo Bonzini4c696052012-05-22 13:49:43 +020071common-obj-$(CONFIG_SLIRP) += slirp/
Andreas Färber0e8c9212010-01-06 20:24:05 +010072
Anthony Liguoria9b7b2a2012-06-25 10:03:47 -050073common-obj-y += backends/
74
Paolo Bonzini737f3512013-01-19 11:06:46 +010075common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
Eduardo Otubof7945732012-08-14 18:44:05 -030076
Paolo Bonzini00c705f2012-05-29 11:40:24 +020077common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y)
Robert Relyea111a38b2010-11-28 16:36:38 +020078
Michael Roth2345c772011-07-19 14:50:32 -050079######################################################################
80# qapi
81
Eduardo Habkost8e8aba52013-05-06 13:20:07 -030082common-obj-y += qmp-marshal.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
Eduardo Habkost8e8aba52013-05-06 13:20:07 -030086######################################################################
87# some qapi visitors are used by both system and user emulation:
88
89common-obj-y += qapi-visit.o qapi-types.o
90
Paolo Bonzini9444e9e2012-12-20 15:24:49 +010091#######################################################################
92# Target-independent parts used in system and user emulation
Paolo Bonzini00082342013-01-19 11:06:47 +010093common-obj-y += qemu-log.o
94common-obj-y += tcg-runtime.o
95common-obj-y += hw/
96common-obj-y += qom/
97common-obj-y += disas/
Andreas Färberce008c12012-03-04 21:32:36 +010098
Michael Roth957f1f92011-08-11 15:38:12 -050099######################################################################
100# guest agent
101
Paolo Bonzini59cacde2012-12-20 15:03:18 +0100102# FIXME: a few definitions from qapi-types.o/qapi-visit.o are needed
103# by libqemuutil.a. These should be moved to a separate .json schema.
104qga-obj-y = qga/ qapi-types.o qapi-visit.o
Michael Roth957f1f92011-08-11 15:38:12 -0500105
Blue Swirlad960902010-03-29 19:23:52 +0000106vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
107
108vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
109
Anthony Liguori14015302011-08-20 22:18:37 -0500110QEMU_CFLAGS+=$(GLIB_CFLAGS)
111
Paolo Bonzini7f07b9c2012-05-22 13:42:53 +0200112nested-vars += \
Paolo Bonzini3bc2f572012-11-16 18:35:27 +0100113 stub-obj-y \
Paolo Bonzinibaacf042012-12-20 15:58:44 +0100114 util-obj-y \
Paolo Bonzini4eb7ba82012-05-22 13:50:58 +0200115 qga-obj-y \
Paolo Bonzini69758c22012-09-19 15:11:05 +0200116 block-obj-y \
Paolo Bonzini82cb6b02013-01-19 11:06:48 +0100117 common-obj-y
Paolo Bonzini99100dc2012-05-22 13:41:27 +0200118dummy := $(call unnest-vars)