1CC = $(CROSS_COMPILE)gcc 2BUILD_FLAGS = -DKTEST 3CFLAGS += -O3 -Wl,-no-as-needed -Wall $(BUILD_FLAGS) 4LDFLAGS += -lrt -lpthread 5bins = posix_timers nanosleep inconsistency-check nsleep-lat raw_skew \ 6 set-timer-lat threadtest mqueue-lat valid-adjtimex \ 7 alarmtimer-suspend change_skew skew_consistency clocksource-switch \ 8 leap-a-day leapcrash 9 10all: ${bins} 11 12# these are all "safe" tests that don't modify 13# system time or require escalated privledges 14run_tests: all 15 ./posix_timers 16 ./nanosleep 17 ./nsleep-lat 18 ./set-timer-lat 19 ./mqueue-lat 20 ./inconsistency-check 21 ./raw_skew 22 ./threadtest -t 30 -n 8 23 24# these tests require escalated privledges 25# and may modify the system time or trigger 26# other behavior like suspend 27run_destructive_tests: run_tests 28 ./alarmtimer-suspend 29 ./valid-adjtimex 30 ./change_skew 31 ./skew_consistency 32 ./clocksource-switch 33 ./leap-a-day -s -i 10 34 ./leapcrash 35 36clean: 37 rm -f ${bins} 38