Makefile 850 字节
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 9

all: ${bins}
10

11 12
# these are all "safe" tests that don't modify
# system time or require escalated privledges
13 14
run_tests: all
	./posix_timers
15
	./nanosleep
16
	./nsleep-lat
17
	./set-timer-lat
18
	./mqueue-lat
19
	./inconsistency-check
20
	./raw_skew
21
	./threadtest -t 30 -n 8
22 23 24 25

# these tests require escalated privledges
# and may modify the system time or trigger
# other behavior like suspend
26 27
run_destructive_tests: run_tests
	./alarmtimer-suspend
28
	./valid-adjtimex
29
	./change_skew
30
	./skew_consistency
31
	./clocksource-switch
32

33
clean:
34
	rm -f ${bins}