From: John Stultz Date: Thu, 12 Mar 2015 00:39:57 +0000 (-0700) Subject: selftests/timers: Cleanup Makefile to make it easier to add future tests X-Git-Tag: v4.1-rc1~190^2~41 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=03438212d0b0ea2cf201e921c9056f683c624ffb;p=karo-tx-linux.git selftests/timers: Cleanup Makefile to make it easier to add future tests Try to streamline the makefile so its easier to add timer/timekeeping tests. Also adds support for the CROSS_COMPILE variable. Cc: Shuah Khan Cc: Prarit Bhargava Cc: Thomas Gleixner Cc: Richard Cochran Signed-off-by: John Stultz Tested-by: Prarit Bhargava Signed-off-by: Shuah Khan --- diff --git a/tools/testing/selftests/timers/Makefile b/tools/testing/selftests/timers/Makefile index eb2859f4ad21..e65c543ad03c 100644 --- a/tools/testing/selftests/timers/Makefile +++ b/tools/testing/selftests/timers/Makefile @@ -1,8 +1,13 @@ -all: - gcc posix_timers.c -o posix_timers -lrt +CC = $(CROSS_COMPILE)gcc +BUILD_FLAGS = -DKTEST +CFLAGS += -O3 -Wl,-no-as-needed -Wall $(BUILD_FLAGS) +LDFLAGS += -lrt -lpthread +bins = posix_timers + +all: ${bins} run_tests: all ./posix_timers clean: - rm -f ./posix_timers + rm -f ${bins}