1####################################################################### 2# Common libraries for tools and emulators 3stub-obj-y = stubs/ crypto/ 4util-obj-y = util/ qobject/ qapi/ 5util-obj-y += qapi/qapi-builtin-types.o 6util-obj-y += qapi/qapi-types.o 7util-obj-y += qapi/qapi-types-block-core.o 8util-obj-y += qapi/qapi-types-block.o 9util-obj-y += qapi/qapi-types-char.o 10util-obj-y += qapi/qapi-types-common.o 11util-obj-y += qapi/qapi-types-crypto.o 12util-obj-y += qapi/qapi-types-introspect.o 13util-obj-y += qapi/qapi-types-job.o 14util-obj-y += qapi/qapi-types-migration.o 15util-obj-y += qapi/qapi-types-misc.o 16util-obj-y += qapi/qapi-types-net.o 17util-obj-y += qapi/qapi-types-rocker.o 18util-obj-y += qapi/qapi-types-run-state.o 19util-obj-y += qapi/qapi-types-sockets.o 20util-obj-y += qapi/qapi-types-tpm.o 21util-obj-y += qapi/qapi-types-trace.o 22util-obj-y += qapi/qapi-types-transaction.o 23util-obj-y += qapi/qapi-types-ui.o 24util-obj-y += qapi/qapi-builtin-visit.o 25util-obj-y += qapi/qapi-visit.o 26util-obj-y += qapi/qapi-visit-block-core.o 27util-obj-y += qapi/qapi-visit-block.o 28util-obj-y += qapi/qapi-visit-char.o 29util-obj-y += qapi/qapi-visit-common.o 30util-obj-y += qapi/qapi-visit-crypto.o 31util-obj-y += qapi/qapi-visit-introspect.o 32util-obj-y += qapi/qapi-visit-job.o 33util-obj-y += qapi/qapi-visit-migration.o 34util-obj-y += qapi/qapi-visit-misc.o 35util-obj-y += qapi/qapi-visit-net.o 36util-obj-y += qapi/qapi-visit-rocker.o 37util-obj-y += qapi/qapi-visit-run-state.o 38util-obj-y += qapi/qapi-visit-sockets.o 39util-obj-y += qapi/qapi-visit-tpm.o 40util-obj-y += qapi/qapi-visit-trace.o 41util-obj-y += qapi/qapi-visit-transaction.o 42util-obj-y += qapi/qapi-visit-ui.o 43util-obj-y += qapi/qapi-events.o 44util-obj-y += qapi/qapi-events-block-core.o 45util-obj-y += qapi/qapi-events-block.o 46util-obj-y += qapi/qapi-events-char.o 47util-obj-y += qapi/qapi-events-common.o 48util-obj-y += qapi/qapi-events-crypto.o 49util-obj-y += qapi/qapi-events-introspect.o 50util-obj-y += qapi/qapi-events-job.o 51util-obj-y += qapi/qapi-events-migration.o 52util-obj-y += qapi/qapi-events-misc.o 53util-obj-y += qapi/qapi-events-net.o 54util-obj-y += qapi/qapi-events-rocker.o 55util-obj-y += qapi/qapi-events-run-state.o 56util-obj-y += qapi/qapi-events-sockets.o 57util-obj-y += qapi/qapi-events-tpm.o 58util-obj-y += qapi/qapi-events-trace.o 59util-obj-y += qapi/qapi-events-transaction.o 60util-obj-y += qapi/qapi-events-ui.o 61util-obj-y += qapi/qapi-introspect.o 62 63chardev-obj-y = chardev/ 64 65####################################################################### 66# block-obj-y is code used by both qemu system emulation and qemu-img 67 68block-obj-y += nbd/ 69block-obj-y += block.o blockjob.o job.o 70block-obj-y += block/ scsi/ 71block-obj-y += qemu-io-cmds.o 72block-obj-$(CONFIG_REPLICATION) += replication.o 73 74block-obj-m = block/ 75 76####################################################################### 77# crypto-obj-y is code used by both qemu system emulation and qemu-img 78 79crypto-obj-y = crypto/ 80crypto-aes-obj-y = crypto/ 81 82####################################################################### 83# qom-obj-y is code used by both qemu system emulation and qemu-img 84 85qom-obj-y = qom/ 86 87####################################################################### 88# io-obj-y is code used by both qemu system emulation and qemu-img 89 90io-obj-y = io/ 91 92###################################################################### 93# Target independent part of system emulation. The long term path is to 94# suppress *all* target specific code in case of system emulation, i.e. a 95# single QEMU executable should support all CPUs and machines. 96 97ifeq ($(CONFIG_SOFTMMU),y) 98common-obj-y = blockdev.o blockdev-nbd.o block/ 99common-obj-y += bootdevice.o iothread.o 100common-obj-y += job-qmp.o 101common-obj-y += net/ 102common-obj-y += qdev-monitor.o device-hotplug.o 103common-obj-$(CONFIG_WIN32) += os-win32.o 104common-obj-$(CONFIG_POSIX) += os-posix.o 105 106common-obj-$(CONFIG_LINUX) += fsdev/ 107 108common-obj-y += migration/ 109 110common-obj-y += audio/ 111common-obj-m += audio/ 112common-obj-y += hw/ 113 114common-obj-y += replay/ 115 116common-obj-y += ui/ 117common-obj-m += ui/ 118common-obj-y += bt-host.o bt-vhci.o 119bt-host.o-cflags := $(BLUEZ_CFLAGS) 120 121common-obj-y += dma-helpers.o 122common-obj-y += vl.o 123vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS) 124common-obj-$(CONFIG_TPM) += tpm.o 125 126common-obj-$(CONFIG_SLIRP) += slirp/ 127 128common-obj-y += backends/ 129common-obj-y += chardev/ 130 131common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o 132qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS) 133qemu-seccomp.o-libs := $(SECCOMP_LIBS) 134 135common-obj-$(CONFIG_FDT) += device_tree.o 136 137###################################################################### 138# qapi 139 140common-obj-y += qapi/qapi-commands.o 141common-obj-y += qapi/qapi-commands-block-core.o 142common-obj-y += qapi/qapi-commands-block.o 143common-obj-y += qapi/qapi-commands-char.o 144common-obj-y += qapi/qapi-commands-common.o 145common-obj-y += qapi/qapi-commands-crypto.o 146common-obj-y += qapi/qapi-commands-introspect.o 147common-obj-y += qapi/qapi-commands-job.o 148common-obj-y += qapi/qapi-commands-migration.o 149common-obj-y += qapi/qapi-commands-misc.o 150common-obj-y += qapi/qapi-commands-net.o 151common-obj-y += qapi/qapi-commands-rocker.o 152common-obj-y += qapi/qapi-commands-run-state.o 153common-obj-y += qapi/qapi-commands-sockets.o 154common-obj-y += qapi/qapi-commands-tpm.o 155common-obj-y += qapi/qapi-commands-trace.o 156common-obj-y += qapi/qapi-commands-transaction.o 157common-obj-y += qapi/qapi-commands-ui.o 158common-obj-y += qapi/qapi-introspect.o 159common-obj-y += qmp.o hmp.o 160endif 161 162####################################################################### 163# Target-independent parts used in system and user emulation 164common-obj-y += cpus-common.o 165common-obj-y += hw/ 166common-obj-y += qom/ 167common-obj-y += disas/ 168 169###################################################################### 170# Resource file for Windows executables 171version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o 172 173###################################################################### 174# tracing 175util-obj-y += trace/ 176target-obj-y += trace/ 177 178###################################################################### 179# guest agent 180 181# FIXME: a few definitions from qapi/qapi-types.o and 182# qapi/qapi-visit.o are needed by libqemuutil.a. These should be 183# extracted into a QAPI schema module, or perhaps a separate schema. 184qga-obj-y = qga/ 185qga-vss-dll-obj-y = qga/ 186 187###################################################################### 188# contrib 189ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/ 190ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/ 191libvhost-user-obj-y = contrib/libvhost-user/ 192vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS) 193vhost-user-scsi.o-libs := $(LIBISCSI_LIBS) 194vhost-user-scsi-obj-y = contrib/vhost-user-scsi/ 195vhost-user-blk-obj-y = contrib/vhost-user-blk/ 196 197###################################################################### 198trace-events-subdirs = 199trace-events-subdirs += accel/kvm 200trace-events-subdirs += accel/tcg 201trace-events-subdirs += audio 202trace-events-subdirs += block 203trace-events-subdirs += chardev 204trace-events-subdirs += crypto 205trace-events-subdirs += hw/9pfs 206trace-events-subdirs += hw/acpi 207trace-events-subdirs += hw/alpha 208trace-events-subdirs += hw/arm 209trace-events-subdirs += hw/audio 210trace-events-subdirs += hw/block 211trace-events-subdirs += hw/block/dataplane 212trace-events-subdirs += hw/char 213trace-events-subdirs += hw/display 214trace-events-subdirs += hw/dma 215trace-events-subdirs += hw/hppa 216trace-events-subdirs += hw/i2c 217trace-events-subdirs += hw/i386 218trace-events-subdirs += hw/i386/xen 219trace-events-subdirs += hw/ide 220trace-events-subdirs += hw/input 221trace-events-subdirs += hw/intc 222trace-events-subdirs += hw/isa 223trace-events-subdirs += hw/mem 224trace-events-subdirs += hw/misc 225trace-events-subdirs += hw/misc/macio 226trace-events-subdirs += hw/net 227trace-events-subdirs += hw/nvram 228trace-events-subdirs += hw/pci 229trace-events-subdirs += hw/pci-host 230trace-events-subdirs += hw/ppc 231trace-events-subdirs += hw/rdma 232trace-events-subdirs += hw/rdma/vmw 233trace-events-subdirs += hw/s390x 234trace-events-subdirs += hw/scsi 235trace-events-subdirs += hw/sd 236trace-events-subdirs += hw/sparc 237trace-events-subdirs += hw/sparc64 238trace-events-subdirs += hw/timer 239trace-events-subdirs += hw/tpm 240trace-events-subdirs += hw/usb 241trace-events-subdirs += hw/vfio 242trace-events-subdirs += hw/virtio 243trace-events-subdirs += hw/xen 244trace-events-subdirs += io 245trace-events-subdirs += linux-user 246trace-events-subdirs += migration 247trace-events-subdirs += nbd 248trace-events-subdirs += net 249trace-events-subdirs += qapi 250trace-events-subdirs += qom 251trace-events-subdirs += scsi 252trace-events-subdirs += target/arm 253trace-events-subdirs += target/i386 254trace-events-subdirs += target/mips 255trace-events-subdirs += target/ppc 256trace-events-subdirs += target/s390x 257trace-events-subdirs += target/sparc 258trace-events-subdirs += ui 259trace-events-subdirs += util 260 261trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PATH)/%/trace-events) 262 263trace-obj-y = trace-root.o 264trace-obj-y += $(trace-events-subdirs:%=%/trace.o) 265trace-obj-$(CONFIG_TRACE_UST) += trace-ust-all.o 266trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace-root.o 267trace-obj-$(CONFIG_TRACE_DTRACE) += $(trace-events-subdirs:%=%/trace-dtrace.o) 268