-#--------------------------------------------------------
-# If you are running a cross compiler, you will want to set 'CROSS'
-# to something more interesting... Target architecture is determined
-# by asking the CC compiler what arch it compiles things for, so unless
-# your compiler is broken, you should not need to specify TARGET_ARCH
-#
-# Most people will set this stuff on the command line, i.e.
-# make CROSS=mipsel-linux-
-# will build uClibc for 'mipsel'.
-
-CROSS = $(subst ",, $(strip $(CROSS_COMPILER_PREFIX)))
-CC = $(CROSS)gcc
-RM = rm -f
-
-# Select the compiler needed to build binaries for your development system
-HOSTCC = gcc
-
-
-#--------------------------------------------------------
-# A nifty macro to make testing gcc features easier
-check_gcc=$(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
- then echo "$(1)"; else echo "$(2)"; fi)
-
-# use '-Os' optimization if available, else use -O2, allow Config to override
-# Override optimization settings when debugging
-ifeq ($(DODEBUG),y)
-OPTIMIZATION = -O0
+ifneq ($(KERNEL_HEADERS),)
+ifeq ($(patsubst /%,/,$(KERNEL_HEADERS)),/)
+# Absolute path in KERNEL_HEADERS
+KERNEL_INCLUDES += -I$(KERNEL_HEADERS)