aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells2012-10-02 12:01:26 -0500
committerDavid Howells2012-10-02 12:01:26 -0500
commitabbf1590de22a6d2240a59383477da50d1402f6a (patch)
treee67f6a35d2c26328c878065e7796ccbcd8d90142 /Makefile
parenta1ce39288e6fbefdd8d607021d02384eb4a20b99 (diff)
downloadkernel-omap-abbf1590de22a6d2240a59383477da50d1402f6a.tar.gz
kernel-omap-abbf1590de22a6d2240a59383477da50d1402f6a.tar.xz
kernel-omap-abbf1590de22a6d2240a59383477da50d1402f6a.zip
UAPI: Partition the header include path sets and add uapi/ header directories
Partition the header include path flags into two sets, one for kernelspace builds and one for userspace builds. Add the following directories to build after the ordinary include directories so that #include will pick up the UAPI header directly if the kernel header has been moved there. The userspace set (represented by the USERINCLUDE make variable) contains: -I $(srctree)/arch/$(hdr-arch)/include/uapi -I arch/$(hdr-arch)/include/generated/uapi -I $(srctree)/include/uapi -I include/generated/uapi -include $(srctree)/include/linux/kconfig.h and the kernelspace set (represented by the LINUXINCLUDE make variable) contains: -I $(srctree)/arch/$(hdr-arch)/include -I arch/$(hdr-arch)/include/generated -I $(srctree)/include -I include --- if not building in the source tree plus everything in the USERINCLUDE set. Then use USERINCLUDE in building the x86 boot code. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 14 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 846dd7607854..da1707c3904b 100644
--- a/Makefile
+++ b/Makefile
@@ -350,12 +350,22 @@ AFLAGS_KERNEL =
350CFLAGS_GCOV = -fprofile-arcs -ftest-coverage 350CFLAGS_GCOV = -fprofile-arcs -ftest-coverage
351 351
352 352
353# Use USERINCLUDE when you must reference the UAPI directories only.
354USERINCLUDE := \
355 -I$(srctree)/arch/$(hdr-arch)/include/uapi \
356 -Iarch/$(hdr-arch)/include/generated/uapi \
357 -I$(srctree)/include/uapi \
358 -Iinclude/generated/uapi \
359 -include $(srctree)/include/linux/kconfig.h
360
353# Use LINUXINCLUDE when you must reference the include/ directory. 361# Use LINUXINCLUDE when you must reference the include/ directory.
354# Needed to be compatible with the O= option 362# Needed to be compatible with the O= option
355LINUXINCLUDE := -I$(srctree)/arch/$(hdr-arch)/include \ 363LINUXINCLUDE := \
356 -Iarch/$(hdr-arch)/include/generated -Iinclude \ 364 -I$(srctree)/arch/$(hdr-arch)/include \
357 $(if $(KBUILD_SRC), -I$(srctree)/include) \ 365 -Iarch/$(hdr-arch)/include/generated \
358 -include $(srctree)/include/linux/kconfig.h 366 $(if $(KBUILD_SRC), -I$(srctree)/include) \
367 -Iinclude \
368 $(USERINCLUDE)
359 369
360KBUILD_CPPFLAGS := -D__KERNEL__ 370KBUILD_CPPFLAGS := -D__KERNEL__
361 371