2015-08-21 07:04:50 +00:00
|
|
|
#######################################################################
|
|
|
|
# Common libraries for tools and emulators
|
|
|
|
util-obj-y = util/ qobject/ qapi/ qapi-types.o qapi-visit.o
|
qapi/types qapi/visit: Generate built-in stuff into separate files
Linking code from multiple separate QAPI schemata into the same
program is possible, but involves some weirdness around built-in
types:
* We generate code for built-in types into .c only with option
--builtins. The user is responsible for generating code for exactly
one QAPI schema per program with --builtins.
* We generate code for built-in types into .h regardless of
--builtins, but guarded by #ifndef QAPI_VISIT_BUILTIN. Because all
copies of this code are exactly the same, including any combination
of these headers works.
Replace this contraption by something more conventional: generate code
for built-in types into their very own files: qapi-builtin-types.c,
qapi-builtin-visit.c, qapi-builtin-types.h, qapi-builtin-visit.h, but
only with --builtins. Obey --output-dir, but ignore --prefix for
them.
Make qapi-types.h include qapi-builtin-types.h. With multiple
schemata you now have multiple qapi-types.[ch], but only one
qapi-builtin-types.[ch]. Same for qapi-visit.[ch] and
qapi-builtin-visit.[ch].
Bonus: if all you need is built-in stuff, you can include a much
smaller header. To be exploited shortly.
Backports commit cdb6610ae4283720037bae2af1f78bd40eb5fe71 from qemu
2018-03-09 14:17:54 +00:00
|
|
|
util-obj-y += qapi-builtin-types.o
|
|
|
|
util-obj-y += qapi-builtin-visit.o
|
2015-08-21 07:04:50 +00:00
|
|
|
|
|
|
|
#######################################################################
|
|
|
|
# block-obj-y is code used by both qemu system emulation and qemu-img
|
|
|
|
|
|
|
|
block-obj-y =
|
2016-12-18 22:56:58 +00:00
|
|
|
block-obj-y += ../uc.o ../list.o glib_compat.o
|
2015-08-21 07:04:50 +00:00
|
|
|
|
2018-02-15 18:36:09 +00:00
|
|
|
#######################################################################
|
|
|
|
# crypto-obj-y is code used by both qemu system emulation and qemu-img
|
|
|
|
|
|
|
|
crypto-obj-y = crypto/
|
|
|
|
crypto-aes-obj-y = crypto/
|
|
|
|
|
2015-08-21 07:04:50 +00:00
|
|
|
#######################################################################
|
|
|
|
# Target independent part of system emulation. The long term path is to
|
|
|
|
# suppress *all* target specific code in case of system emulation, i.e. a
|
|
|
|
# single QEMU executable should support all CPUs and machines.
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_SOFTMMU),y)
|
|
|
|
common-obj-y += hw/
|
|
|
|
common-obj-y += accel.o
|
2016-03-26 00:24:28 +00:00
|
|
|
common-obj-y += vl.o qemu-timer.o
|
2015-08-21 07:04:50 +00:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
#######################################################################
|
|
|
|
# Target-independent parts used in system and user emulation
|
|
|
|
common-obj-y += hw/
|
|
|
|
common-obj-y += qom/
|