From patchwork Tue Sep 10 01:02:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 273742 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B7D852C00EF for ; Tue, 10 Sep 2013 11:06:07 +1000 (EST) Received: from localhost ([::1]:54289 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJCP7-0002qF-Iv for incoming@patchwork.ozlabs.org; Mon, 09 Sep 2013 21:06:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJCMT-00079x-Lc for qemu-devel@nongnu.org; Mon, 09 Sep 2013 21:03:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJCMN-00064z-BC for qemu-devel@nongnu.org; Mon, 09 Sep 2013 21:03:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43635) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJCMN-00064m-1e for qemu-devel@nongnu.org; Mon, 09 Sep 2013 21:03:15 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8A13BDj032236 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 9 Sep 2013 21:03:11 -0400 Received: from T430s.nay.redhat.com ([10.66.5.155]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r8A12xP3015290; Mon, 9 Sep 2013 21:03:09 -0400 From: Fam Zheng To: qemu-devel@nongnu.org Date: Tue, 10 Sep 2013 09:02:55 +0800 Message-Id: <1378774978-22602-3-git-send-email-famz@redhat.com> In-Reply-To: <1378774978-22602-1-git-send-email-famz@redhat.com> References: <1378774978-22602-1-git-send-email-famz@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: peter.maydell@linaro.org, famz@redhat.com, mjt@tls.msk.ru, stefanha@redhat.com, pbonzini@redhat.com, vilanova@ac.upc.edu, rth@twiddle.net Subject: [Qemu-devel] [RFC PATCH v3 2/5] rule.mak: allow per object cflags and libs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Adds extract-libs in LINK to expand any "per object libs", the syntax to define such a libs options is like: foo.o-libs := $(CURL_LIBS) in block/Makefile.objs. Similarly, foo.o-cflags := $(FOO_CFLAGS) is also supported. "foo.o" must be listed a nested var (e.g. common-obj-y) to make the option variables effective. Signed-off-by: Fam Zheng --- rules.mak | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/rules.mak b/rules.mak index 3ff7d7a..84ed998 100644 --- a/rules.mak +++ b/rules.mak @@ -17,15 +17,17 @@ QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d # Same as -I$(SRC_PATH) -I., but for the nested source/object directories QEMU_INCLUDES += -I$(