From patchwork Tue Apr 11 11:06:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 97238 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp1753894qgd; Tue, 11 Apr 2017 04:07:01 -0700 (PDT) X-Received: by 10.98.102.66 with SMTP id a63mr30548pfc.33.1491908821098; Tue, 11 Apr 2017 04:07:01 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c4si13148944pfk.182.2017.04.11.04.07.00; Tue, 11 Apr 2017 04:07:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754045AbdDKLGs (ORCPT + 23 others); Tue, 11 Apr 2017 07:06:48 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:59738 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752744AbdDKLGq (ORCPT ); Tue, 11 Apr 2017 07:06:46 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id v3BB6NJd002884; Tue, 11 Apr 2017 06:06:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1491908783; bh=po61lIQ2T4HV8LFYQx3Ds/DeN+lQpjxYtZAJY4itc8k=; h=From:To:CC:Subject:Date; b=JFyV9wKmK7SyFzGo427bD3MM4+zXWHy3xZFPtlBdlrvUnEXaWl2rbE9WZ/MqGaIrf eICimd+aN8BnvWc1mZOuuFuh6nkg0J4nQ+qdwdJVcWLiQlKp5iDauVism57xjxrro/ vK1uxPUiXwdaUaQEe2zHRvkvR/fsqwtsS2ZCovbE= Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v3BB6M5j022907; Tue, 11 Apr 2017 06:06:22 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.294.0; Tue, 11 Apr 2017 06:06:21 -0500 Received: from psplinux063.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v3BB6IUV026488; Tue, 11 Apr 2017 06:06:19 -0500 From: Sekhar Nori To: Jonathan Cameron CC: Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , , Subject: [PATCH] tools: iio: add ability to pass kernel headers Date: Tue, 11 Apr 2017 16:36:18 +0530 Message-ID: X-Mailer: git-send-email 2.9.0 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Very often, especially when cross compiling, there is a need to pass kernel headers different from those installed on the build machine. Add support for doing this for iio utils by using the 'INSTALL_HDR_PATH' environment variable. This is supported by 'make headers_install' for installing kernel headers at a user specified location. So you will do: $ make headers_install ARCH=arm INSTALL_HDR_PATH= $ make -C tools/iio ARCH=arm INSTALL_HDR_PATH= Signed-off-by: Sekhar Nori --- tools/iio/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/tools/iio/Makefile b/tools/iio/Makefile index 5446d625e17d..75607043d6e2 100644 --- a/tools/iio/Makefile +++ b/tools/iio/Makefile @@ -1,5 +1,5 @@ CC = $(CROSS_COMPILE)gcc -CFLAGS += -Wall -g -D_GNU_SOURCE +CFLAGS += -Wall -g -D_GNU_SOURCE -I$(INSTALL_HDR_PATH)/include BINDIR=usr/bin INSTALL_PROGRAM=install -m 755 -p