tools/perf/build: Split out feature check: 'libelf-getphdrnum'
[sfrench/cifs-2.6.git] / tools / perf / config / feature-checks / Makefile
1
2 FILES=                                  \
3         test-hello                      \
4         test-stackprotector-all         \
5         test-stackprotector             \
6         test-volatile-register-var      \
7         test-fortify-source             \
8         test-bionic                     \
9         test-libelf                     \
10         test-glibc                      \
11         test-dwarf                      \
12         test-libelf-mmap                \
13         test-libelf-getphdrnum          \
14         test-libnuma
15
16 CC := $(CC) -MD
17
18 all: $(FILES)
19
20 BUILD = $(CC) -o $(OUTPUT)$@ $@.c
21
22 ###############################
23
24 test-hello:
25         $(BUILD)
26
27 test-stackprotector-all:
28         $(BUILD) -Werror -fstack-protector-all
29
30 test-stackprotector:
31         $(BUILD) -Werror -fstack-protector
32
33 test-volatile-register-var:
34         $(BUILD) -Werror -Wvolatile-register-var
35
36 test-fortify-source:
37         $(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2
38
39 test-bionic:
40         $(BUILD)
41
42 test-libelf:
43         $(BUILD) -lelf
44
45 test-glibc:
46         $(BUILD)
47
48 test-dwarf:
49         $(BUILD) -ldw
50
51 test-libelf-mmap:
52         $(BUILD) -lelf
53
54 test-libelf-getphdrnum:
55         $(BUILD) -lelf
56
57 test-libnuma:
58         $(BUILD) -lnuma
59
60 -include *.d */*.d
61
62 ###############################
63
64 clean:
65         rm -f $(FILES) *.d