summaryrefslogtreecommitdiff
path: root/kcmp/Makefile
diff options
context:
space:
mode:
authorMilosz Wasilewski <milosz.wasilewski@hackbox.linaro.org>2014-10-01 15:24:10 +0100
committerMilosz Wasilewski <milosz.wasilewski@hackbox.linaro.org>2014-10-01 15:24:10 +0100
commite14eb051ff73ab8692770762adf44045ba092398 (patch)
tree117c21aa0b42865a321b078ddb71c410506c51c9 /kcmp/Makefile
parent6c2a5f64d0517e100c569b59423d5f5abc627a7c (diff)
Update to aad7fb916a10f1065ad23de0c80a4a04bcba8437 from repo git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git branch masterfe82dcec644244676d55a1384c958d5f67979adbaad7fb916a10f1065ad23de0c80a4a04bcba8437
Diffstat (limited to 'kcmp/Makefile')
-rw-r--r--kcmp/Makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/kcmp/Makefile b/kcmp/Makefile
new file mode 100644
index 0000000..8aabd82
--- /dev/null
+++ b/kcmp/Makefile
@@ -0,0 +1,28 @@
+uname_M := $(shell uname -m 2>/dev/null || echo not)
+ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/)
+ifeq ($(ARCH),i386)
+ ARCH := x86
+ CFLAGS := -DCONFIG_X86_32 -D__i386__
+endif
+ifeq ($(ARCH),x86_64)
+ ARCH := x86
+ CFLAGS := -DCONFIG_X86_64 -D__x86_64__
+endif
+
+CFLAGS += -I../../../../arch/x86/include/generated/
+CFLAGS += -I../../../../include/
+CFLAGS += -I../../../../usr/include/
+CFLAGS += -I../../../../arch/x86/include/
+
+all:
+ifeq ($(ARCH),x86)
+ gcc $(CFLAGS) kcmp_test.c -o kcmp_test
+else
+ echo "Not an x86 target, can't build kcmp selftest"
+endif
+
+run_tests: all
+ @./kcmp_test || echo "kcmp_test: [FAIL]"
+
+clean:
+ $(RM) kcmp_test kcmp-test-file