diff options
author | 2016-11-29 19:55:49 +0800 | |
---|---|---|
committer | 2017-01-05 13:42:01 -0700 | |
commit | 7d758af257bc40a8a599a0aaa4768b30fb463e9c (patch) | |
tree | 00c4ae2a68d491c2d8849564211b1121cdd9cc2d /tools/testing/selftests/lib.mk | |
parent | selftests: remove useless TEST_DIRS (diff) | |
download | linux-7d758af257bc40a8a599a0aaa4768b30fb463e9c.tar.gz linux-7d758af257bc40a8a599a0aaa4768b30fb463e9c.tar.bz2 linux-7d758af257bc40a8a599a0aaa4768b30fb463e9c.zip |
selftests: add default rules for c source file
There are difference rules for compiling c source file in different
testcases. In order to enable KBUILD_OUTPUT support in later patch,
this patch introduce the default rules in
"tools/testing/selftest/lib.mk" and remove the existing rules in each
testcase.
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools/testing/selftests/lib.mk')
-rw-r--r-- | tools/testing/selftests/lib.mk | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk index 5b8634cad092..68d7c01b9f06 100644 --- a/tools/testing/selftests/lib.mk +++ b/tools/testing/selftests/lib.mk @@ -45,4 +45,7 @@ all: $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) clean: $(RM) -r $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) +%: %.c + $(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ $^ + .PHONY: run_tests all clean install emit_tests |