Skip to content

Commit

Permalink
Makefile: introduce common-obj-m and block-obj-m for DSO
Browse files Browse the repository at this point in the history
$(common-obj-m) will include $(block-obj-m), like $(common-obj-y) does
for $(block-obj-y).

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Fam Zheng authored and bonzini committed Feb 20, 2014
1 parent e3be6f0 commit cc47569
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ dummy := $(call unnest-vars,, \
util-obj-y \
qga-obj-y \
block-obj-y \
common-obj-y)
block-obj-m \
common-obj-y \
common-obj-m)

ifneq ($(wildcard config-host.mak),)
include $(SRC_PATH)/tests/Makefile
Expand Down
2 changes: 2 additions & 0 deletions Makefile.objs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ block-obj-y += qemu-coroutine.o qemu-coroutine-lock.o qemu-coroutine-io.o
block-obj-y += qemu-coroutine-sleep.o
block-obj-y += coroutine-$(CONFIG_COROUTINE_BACKEND).o

block-obj-m = block/

ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy)
# Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add.
# only pull in the actual virtio-9p device if we also enabled virtio.
Expand Down
6 changes: 5 additions & 1 deletion Makefile.target
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ obj-y-save := $(obj-y)
block-obj-y :=
common-obj-y :=
include $(SRC_PATH)/Makefile.objs
dummy := $(call unnest-vars,..,block-obj-y common-obj-y)
dummy := $(call unnest-vars,.., \
block-obj-y \
block-obj-m \
common-obj-y \
common-obj-m)

# Now restore obj-y
obj-y := $(obj-y-save)
Expand Down

0 comments on commit cc47569

Please sign in to comment.