linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools: iio: add ability to pass kernel headers
@ 2017-04-11 11:06 Sekhar Nori
  2017-04-14 14:42 ` Jonathan Cameron
  0 siblings, 1 reply; 7+ messages in thread
From: Sekhar Nori @ 2017-04-11 11:06 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
	linux-iio, linux-kernel

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=<absolute-path>
$ make -C tools/iio ARCH=arm INSTALL_HDR_PATH=<absolute-path>

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
---
 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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-04-20 15:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-11 11:06 [PATCH] tools: iio: add ability to pass kernel headers Sekhar Nori
2017-04-14 14:42 ` Jonathan Cameron
2017-04-14 15:23   ` Randy Dunlap
2017-04-14 15:23     ` Jonathan Cameron
2017-04-18 10:12       ` Sekhar Nori
2017-04-20 13:53         ` Sekhar Nori
2017-04-20 15:27           ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).