aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests
diff options
context:
space:
mode:
authorTyler Baker <tyler.baker@linaro.org>2015-04-01 19:20:15 -0400
committerShuah Khan <shuahkh@osg.samsung.com>2015-04-02 14:40:34 -0400
commit52dd5576cd0d9d23b0b83b133d853a8ef074ee77 (patch)
treefb6d853547c79c7aea14b6f65ea0049b36145841 /tools/testing/selftests
parent48fd77d1444a387435c3bbc773fa4e7ab6b6aca3 (diff)
selftest/memfd: enable cross compilation
Use the CC variable instead of hard coding gcc. Also clean up the compiler options by creating a CFLAGS variable. Signed-off-by: Tyler Baker <tyler.baker@linaro.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools/testing/selftests')
-rw-r--r--tools/testing/selftests/memfd/Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/testing/selftests/memfd/Makefile b/tools/testing/selftests/memfd/Makefile
index 191dee9d6fd3..69f08ab51551 100644
--- a/tools/testing/selftests/memfd/Makefile
+++ b/tools/testing/selftests/memfd/Makefile
@@ -1,17 +1,18 @@
1CC = $(CROSS_COMPILE)gcc
1CFLAGS += -D_FILE_OFFSET_BITS=64 2CFLAGS += -D_FILE_OFFSET_BITS=64
2CFLAGS += -I../../../../include/uapi/ 3CFLAGS += -I../../../../include/uapi/
3CFLAGS += -I../../../../include/ 4CFLAGS += -I../../../../include/
4 5
5all: 6all:
6 gcc $(CFLAGS) memfd_test.c -o memfd_test 7 $(CC) $(CFLAGS) memfd_test.c -o memfd_test
7 8
8TEST_PROGS := memfd_test 9TEST_PROGS := memfd_test
9 10
10include ../lib.mk 11include ../lib.mk
11 12
12build_fuse: 13build_fuse:
13 gcc $(CFLAGS) fuse_mnt.c `pkg-config fuse --cflags --libs` -o fuse_mnt 14 $(CC) $(CFLAGS) fuse_mnt.c `pkg-config fuse --cflags --libs` -o fuse_mnt
14 gcc $(CFLAGS) fuse_test.c -o fuse_test 15 $(CC) $(CFLAGS) fuse_test.c -o fuse_test
15 16
16run_fuse: build_fuse 17run_fuse: build_fuse
17 @./run_fuse_test.sh || echo "fuse_test: [FAIL]" 18 @./run_fuse_test.sh || echo "fuse_test: [FAIL]"