[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/2] Create shared-obj-y
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 1/2] Create shared-obj-y |
Date: |
Tue, 11 May 2010 13:13:16 +0200 |
This variable contains the objects shared between tools and qemu binary.
Add qemu-error.o only in one place, it "could" be built in two places
depending of make ordering.
Signed-off-by: Juan Quintela <address@hidden>
---
Makefile | 8 +++++---
Makefile.objs | 9 ++++++---
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index eb9e02b..ba1611b 100644
--- a/Makefile
+++ b/Makefile
@@ -135,11 +135,13 @@ iov.o: iov.c iov.h
qemu-img.o: qemu-img-cmds.h
qemu-img.o qemu-tool.o qemu-nbd.o qemu-io.o: $(GENERATED_HEADERS)
-qemu-img$(EXESUF): qemu-img.o qemu-tool.o qemu-error.o $(block-obj-y)
$(qobject-obj-y)
+TOOLS_OBJ=qemu-tool.o $(shared-obj-y)
-qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o qemu-error.o $(block-obj-y)
$(qobject-obj-y)
+qemu-img$(EXESUF): qemu-img.o $(TOOLS_OBJ)
-qemu-io$(EXESUF): qemu-io.o cmd.o qemu-tool.o qemu-error.o $(block-obj-y)
$(qobject-obj-y)
+qemu-nbd$(EXESUF): qemu-nbd.o $(TOOLS_OBJ)
+
+qemu-io$(EXESUF): qemu-io.o cmd.o $(TOOLS_OBJ)
qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $@")
diff --git a/Makefile.objs b/Makefile.objs
index ecdd53e..95d864b 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -39,16 +39,19 @@ fsdev-nested-$(CONFIG_LINUX) = qemu-fsdev.o
fsdev-obj-$(CONFIG_LINUX) += $(addprefix fsdev/, $(fsdev-nested-y))
######################################################################
+# shared-obj-y has the object that are shared by qemu binary and tools
+shared-obj-y = qemu-error.o $(block-obj-y) $(qobject-obj-y)
+
+######################################################################
# libqemu_common.a: 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.
-common-obj-y = $(block-obj-y)
+common-obj-y = $(shared-obj-y)
common-obj-y += $(net-obj-y)
-common-obj-y += $(qobject-obj-y)
common-obj-$(CONFIG_LINUX) += $(fsdev-obj-$(CONFIG_LINUX))
-common-obj-y += readline.o console.o async.o qemu-error.o
+common-obj-y += readline.o console.o async.o
common-obj-y += tcg-runtime.o host-utils.o
common-obj-y += irq.o ioport.o input.o
common-obj-$(CONFIG_PTIMER) += ptimer.o
--
1.6.6.1