From patchwork Fri Jul 2 11:15:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prerna Saxena X-Patchwork-Id: 57650 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 1AC1E1007D2 for ; Fri, 2 Jul 2010 21:17:32 +1000 (EST) Received: from localhost ([127.0.0.1]:54705 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUeFN-0004ZC-28 for incoming@patchwork.ozlabs.org; Fri, 02 Jul 2010 07:17:29 -0400 Received: from [140.186.70.92] (port=47726 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUeDr-0003dE-GY for qemu-devel@nongnu.org; Fri, 02 Jul 2010 07:16:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OUeDq-000726-Em for qemu-devel@nongnu.org; Fri, 02 Jul 2010 07:15:55 -0400 Received: from e23smtp01.au.ibm.com ([202.81.31.143]:55269) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUeDp-00071X-QE for qemu-devel@nongnu.org; Fri, 02 Jul 2010 07:15:54 -0400 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [202.81.31.245]) by e23smtp01.au.ibm.com (8.14.4/8.13.1) with ESMTP id o62BDC9V010703 for ; Fri, 2 Jul 2010 21:13:12 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o62BFmJU1343536 for ; Fri, 2 Jul 2010 21:15:48 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o62BFmsX002172 for ; Fri, 2 Jul 2010 21:15:48 +1000 Received: from [9.124.35.83] ([9.124.35.83]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o62BFlQ4002131; Fri, 2 Jul 2010 21:15:47 +1000 Message-ID: <4C2DCA61.2080501@linux.vnet.ibm.com> Date: Fri, 02 Jul 2010 16:45:45 +0530 From: Prerna Saxena User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc11 Thunderbird/3.0.4 MIME-Version: 1.0 To: qemu-devel@nongnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Cc: blauwirbel@gmail.com, Anthony Liguori Subject: [Qemu-devel] [PATCH] Makefile: Fix compilation for non-standard host kernel path 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 Set up host kernel include paths specified by --kerneldir When host kernel headers are placed in non-standard paths, the KVM_CFLAGS are presently invoked only for a few .c files (kvm*.c,vhost*.c) and not for other files like machine.c, cpus.c ..etc which also depend on linux/kvm.h Signed-off-by: Prerna Saxena --- Makefile.target | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile.target b/Makefile.target index d58b201..b433112 100644 --- a/Makefile.target +++ b/Makefile.target @@ -29,12 +29,15 @@ QEMU_PROG=qemu-system-$(TARGET_ARCH2)$(EXESUF) endif endif +# Set up host kernel include paths specified by --kerneldir +ifdef CONFIG_KVM +QEMU_CFLAGS+=$(KVM_CFLAGS) +endif + PROGS=$(QEMU_PROG) LIBS+=-lm -kvm.o kvm-all.o vhost.o vhost_net.o: QEMU_CFLAGS+=$(KVM_CFLAGS) - config-target.h: config-target.h-timestamp config-target.h-timestamp: config-target.mak