Makefile 908 字节
Newer Older
1 2 3 4
CC = $(CROSS_COMPILE)gcc
BUILD_FLAGS = -DKTEST
CFLAGS += -O3 -Wl,-no-as-needed -Wall $(BUILD_FLAGS)
LDFLAGS += -lrt -lpthread
5
bins = 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 10

all: ${bins}
11

12 13
# these are all "safe" tests that don't modify
# system time or require escalated privledges
14 15
run_tests: all
	./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 25 26

# these tests require escalated privledges
# and may modify the system time or trigger
# other behavior like suspend
27 28
run_destructive_tests: run_tests
	./alarmtimer-suspend
29
	./valid-adjtimex
30
	./change_skew
31
	./skew_consistency
32
	./clocksource-switch
33
	./leap-a-day -s -i 10
34
	./leapcrash
35

36
clean:
37
	rm -f ${bins}