From patchwork Tue May 11 11:13:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 52283 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9C2F4B7D7F for ; Tue, 11 May 2010 21:15:49 +1000 (EST) Received: from localhost ([127.0.0.1]:53871 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBnRC-0006Op-5d for incoming@patchwork.ozlabs.org; Tue, 11 May 2010 07:15:46 -0400 Received: from [140.186.70.92] (port=56019 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBnOw-0005Ia-50 for qemu-devel@nongnu.org; Tue, 11 May 2010 07:13:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBnOt-0007u1-9k for qemu-devel@nongnu.org; Tue, 11 May 2010 07:13:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24662) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBnOt-0007tf-0L for qemu-devel@nongnu.org; Tue, 11 May 2010 07:13:23 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4BBDK9B006448 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 11 May 2010 07:13:20 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4BBDHb2017711; Tue, 11 May 2010 07:13:19 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Tue, 11 May 2010 13:13:16 +0200 Message-Id: <967a05760ff3819dd26ae0e9e2fb2062e34c265f.1273576209.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH 1/2] Create shared-obj-y X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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