From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754045AbdDKLGs (ORCPT ); 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 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 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org 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(-) 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 -- 2.9.0