build: adapt qom/Makefile and move it to Makefile.objs
qom/ already used a separate makefile. Convert it to use relative paths, and make it declare both common-obj-y and user-obj-y. This way, the upper makefiles do not need to know that some QOM files are compiled twice. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
99100dc3b5
commit
7f07b9cbc5
@ -12,9 +12,7 @@ universal-obj-y += $(qobject-obj-y)
|
||||
|
||||
#######################################################################
|
||||
# QOM
|
||||
include $(SRC_PATH)/qom/Makefile
|
||||
qom-obj-y = $(addprefix qom/, $(qom-y))
|
||||
qom-obj-twice-y = $(addprefix qom/, $(qom-twice-y))
|
||||
qom-obj-y = qom/
|
||||
|
||||
universal-obj-y += $(qom-obj-y)
|
||||
|
||||
@ -94,7 +92,7 @@ fsdev-obj-$(CONFIG_VIRTFS) += $(addprefix fsdev/, $(fsdev-nested-y))
|
||||
|
||||
common-obj-y = $(block-obj-y) blockdev.o
|
||||
common-obj-y += $(net-obj-y)
|
||||
common-obj-y += $(qom-obj-twice-y)
|
||||
common-obj-y += qom/
|
||||
common-obj-$(CONFIG_LINUX) += $(fsdev-obj-$(CONFIG_LINUX))
|
||||
common-obj-y += readline.o console.o cursor.o
|
||||
common-obj-y += $(oslib-obj-y)
|
||||
@ -202,7 +200,7 @@ user-obj-y += cutils.o cache-utils.o
|
||||
user-obj-y += module.o
|
||||
user-obj-y += qemu-user.o
|
||||
user-obj-y += $(trace-obj-y)
|
||||
user-obj-y += $(qom-obj-twice-y)
|
||||
user-obj-y += qom/
|
||||
|
||||
######################################################################
|
||||
# libhw
|
||||
@ -468,5 +466,8 @@ vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
|
||||
|
||||
QEMU_CFLAGS+=$(GLIB_CFLAGS)
|
||||
|
||||
nested-vars += # ...
|
||||
nested-vars += \
|
||||
qom-obj-y \
|
||||
user-obj-y \
|
||||
common-obj-y
|
||||
dummy := $(call unnest-vars)
|
||||
|
@ -1,2 +0,0 @@
|
||||
qom-y = object.o container.o qom-qobject.o
|
||||
qom-twice-y = cpu.o
|
4
qom/Makefile.objs
Normal file
4
qom/Makefile.objs
Normal file
@ -0,0 +1,4 @@
|
||||
qom-obj-y = object.o container.o qom-qobject.o
|
||||
qom-obj-twice-y = cpu.o
|
||||
common-obj-y = $(qom-obj-twice-y)
|
||||
user-obj-y = $(qom-obj-twice-y)
|
Loading…
Reference in New Issue
Block a user