1 #######################################################################
2 # Common libraries for tools and emulators
4 util-obj-y = crypto/ util/ qobject/ qapi/
7 #######################################################################
8 # code used by both qemu system emulation and qemu-img
10 ifeq ($(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)),y)
12 chardev-obj-y = chardev/
17 block-obj-y += block.o blockjob.o job.o
18 block-obj-y += block/ scsi/
19 block-obj-y += qemu-io-cmds.o
20 block-obj-$(CONFIG_REPLICATION) += replication.o
24 crypto-obj-y = crypto/
28 endif # CONFIG_SOFTMMU or CONFIG_TOOLS
30 ######################################################################
31 # Target independent part of system emulation. The long term path is to
32 # suppress *all* target specific code in case of system emulation, i.e. a
33 # single QEMU executable should support all CPUs and machines.
35 ifeq ($(CONFIG_SOFTMMU),y)
36 common-obj-y = blockdev.o blockdev-nbd.o block/
37 common-obj-y += bootdevice.o iothread.o
39 common-obj-y += job-qmp.o
40 common-obj-y += monitor/
42 common-obj-y += qdev-monitor.o device-hotplug.o
43 common-obj-$(CONFIG_WIN32) += os-win32.o
44 common-obj-$(CONFIG_POSIX) += os-posix.o
46 common-obj-$(CONFIG_LINUX) += fsdev/
48 common-obj-y += accel/
49 common-obj-y += migration/
51 common-obj-y += audio/
52 common-obj-m += audio/
55 common-obj-y += replay/
60 common-obj-y += dma-helpers.o
61 common-obj-$(CONFIG_TPM) += tpm.o
63 common-obj-y += backends/
64 common-obj-y += chardev/
66 common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
67 qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS)
68 qemu-seccomp.o-libs := $(SECCOMP_LIBS)
70 common-obj-$(CONFIG_FDT) += device_tree.o
74 endif # CONFIG_SOFTMMU
76 #######################################################################
77 # Target-independent parts used in system and user emulation
78 common-obj-y += cpus-common.o
81 common-obj-y += disas/
83 ######################################################################
84 # Resource file for Windows executables
85 version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o
87 ######################################################################
91 ######################################################################
94 # FIXME: a few definitions from qapi/qapi-types.o and
95 # qapi/qapi-visit.o are needed by libqemuutil.a. These should be
96 # extracted into a QAPI schema module, or perhaps a separate schema.
98 qga-vss-dll-obj-y = qga/
100 ######################################################################
102 elf2dmp-obj-y = contrib/elf2dmp/
103 ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/
104 ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/
105 libvhost-user-obj-y = contrib/libvhost-user/
106 vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS)
107 vhost-user-scsi.o-libs := $(LIBISCSI_LIBS)
108 vhost-user-scsi-obj-y = contrib/vhost-user-scsi/
109 vhost-user-blk-obj-y = contrib/vhost-user-blk/
110 rdmacm-mux-obj-y = contrib/rdmacm-mux/
111 vhost-user-input-obj-y = contrib/vhost-user-input/
112 vhost-user-gpu-obj-y = contrib/vhost-user-gpu/
113 virtiofsd-obj-y = tools/virtiofsd/
115 ######################################################################
116 trace-events-subdirs =
117 trace-events-subdirs += accel/kvm
118 trace-events-subdirs += accel/tcg
119 trace-events-subdirs += backends
120 trace-events-subdirs += crypto
121 trace-events-subdirs += monitor
122 ifeq ($(CONFIG_USER_ONLY),y)
123 trace-events-subdirs += linux-user
125 ifeq ($(CONFIG_BLOCK),y)
126 trace-events-subdirs += authz
127 trace-events-subdirs += block
128 trace-events-subdirs += io
129 trace-events-subdirs += nbd
130 trace-events-subdirs += scsi
132 ifeq ($(CONFIG_SOFTMMU),y)
133 trace-events-subdirs += audio
134 trace-events-subdirs += chardev
135 trace-events-subdirs += hw/9pfs
136 trace-events-subdirs += hw/acpi
137 trace-events-subdirs += hw/alpha
138 trace-events-subdirs += hw/arm
139 trace-events-subdirs += hw/audio
140 trace-events-subdirs += hw/block
141 trace-events-subdirs += hw/block/dataplane
142 trace-events-subdirs += hw/char
143 trace-events-subdirs += hw/dma
144 trace-events-subdirs += hw/hppa
145 trace-events-subdirs += hw/i2c
146 trace-events-subdirs += hw/i386
147 trace-events-subdirs += hw/i386/xen
148 trace-events-subdirs += hw/ide
149 trace-events-subdirs += hw/input
150 trace-events-subdirs += hw/intc
151 trace-events-subdirs += hw/isa
152 trace-events-subdirs += hw/mem
153 trace-events-subdirs += hw/mips
154 trace-events-subdirs += hw/misc
155 trace-events-subdirs += hw/misc/macio
156 trace-events-subdirs += hw/net
157 trace-events-subdirs += hw/nvram
158 trace-events-subdirs += hw/pci
159 trace-events-subdirs += hw/pci-host
160 trace-events-subdirs += hw/ppc
161 trace-events-subdirs += hw/rdma
162 trace-events-subdirs += hw/rdma/vmw
163 trace-events-subdirs += hw/rtc
164 trace-events-subdirs += hw/s390x
165 trace-events-subdirs += hw/scsi
166 trace-events-subdirs += hw/sd
167 trace-events-subdirs += hw/sparc
168 trace-events-subdirs += hw/sparc64
169 trace-events-subdirs += hw/timer
170 trace-events-subdirs += hw/tpm
171 trace-events-subdirs += hw/usb
172 trace-events-subdirs += hw/vfio
173 trace-events-subdirs += hw/virtio
174 trace-events-subdirs += hw/watchdog
175 trace-events-subdirs += hw/xen
176 trace-events-subdirs += hw/gpio
177 trace-events-subdirs += hw/riscv
178 trace-events-subdirs += migration
179 trace-events-subdirs += net
180 trace-events-subdirs += ui
182 trace-events-subdirs += hw/core
183 trace-events-subdirs += hw/display
184 trace-events-subdirs += qapi
185 trace-events-subdirs += qom
186 trace-events-subdirs += target/arm
187 trace-events-subdirs += target/hppa
188 trace-events-subdirs += target/i386
189 trace-events-subdirs += target/mips
190 trace-events-subdirs += target/ppc
191 trace-events-subdirs += target/riscv
192 trace-events-subdirs += target/s390x
193 trace-events-subdirs += target/sparc
194 trace-events-subdirs += util
196 trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PATH)/%/trace-events)
198 trace-obj-y = trace-root.o
199 trace-obj-y += $(trace-events-subdirs:%=%/trace.o)
200 trace-obj-$(CONFIG_TRACE_UST) += trace-ust-all.o
201 trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace-root.o
202 trace-obj-$(CONFIG_TRACE_DTRACE) += $(trace-events-subdirs:%=%/trace-dtrace.o)