summaryrefslogtreecommitdiff
path: root/test/Rules.mak
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-07-23 13:26:08 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-07-23 13:26:08 +0200
commita9e2101d71d1d007bf8dec492bb6743cb58e2537 (patch)
treedf06b5c54790643c8a19c5a2ba93415e7d5bf472 /test/Rules.mak
parent156f5257b6a9256c13e55c7b49065cc7bce05bea (diff)
testsuite: use KERNEL_HEADERS
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'test/Rules.mak')
-rw-r--r--test/Rules.mak10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Rules.mak b/test/Rules.mak
index 92554c1f7..8e154c590 100644
--- a/test/Rules.mak
+++ b/test/Rules.mak
@@ -86,6 +86,16 @@ CC_IPREFIX := $(shell $(CC) --print-file-name=include)
CC_INC := -I$(dir $(CC_IPREFIX))include-fixed -I$(CC_IPREFIX)
CFLAGS += $(CC_INC)
+ifneq ($(KERNEL_HEADERS),)
+ifeq ($(patsubst /%,/,$(KERNEL_HEADERS)),/)
+# Absolute path in KERNEL_HEADERS
+CFLAGS += -I$(KERNEL_HEADERS)
+else
+# Relative path in KERNEL_HEADERS
+CFLAGS += -I$(top_builddir)$(KERNEL_HEADERS)
+endif
+endif
+
# Can't add $(OPTIMIZATION) here, it may be target-specific.
# Just adding -Os for now.
HOST_CFLAGS += $(XWARNINGS) -Os $(XCOMMON_CFLAGS)