summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ea1d5dae1c..d13065d29d 100644
--- a/Makefile
+++ b/Makefile
@@ -408,13 +408,21 @@ LDFLAGS_MODULE = -T common/module.lds
# even be read-only.
export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_versions
+# Use USERINCLUDE when you must reference the UAPI directories only.
+USERINCLUDE := \
+ -I$(srctree)/arch/$(SRCARCH)/include/uapi \
+ -I$(objtree)/arch/$(SRCARCH)/include/generated/uapi \
+ -I$(srctree)/include/uapi \
+ -I$(objtree)/include/generated/uapi \
+ -include $(srctree)/include/linux/kconfig.h
+
# Use LINUXINCLUDE when you must reference the include/ directory.
# Needed to be compatible with the O= option
LINUXINCLUDE := -Iinclude -I$(srctree)/dts/include \
$(if $(building_out_of_srctree), -I$(srctree)/include) \
-I$(srctree)/arch/$(SRCARCH)/include \
-I$(objtree)/arch/$(SRCARCH)/include \
- -include $(srctree)/include/linux/kconfig.h
+ $(USERINCLUDE)
KBUILD_CPPFLAGS := -D__KERNEL__ -D__BAREBOX__ $(LINUXINCLUDE) -fno-builtin -ffreestanding