perf hists: Consolidate __hists__add_*entry()
[linux-2.6-block.git] / tools / perf / config / feature-checks / Makefile
CommitLineData
b6aa9979 1
3ae069cf 2FILES= \
f1138ec6
IM
3 test-all \
4 test-backtrace \
78e9d655 5 test-bionic \
8295d4e2 6 test-dwarf \
f1138ec6
IM
7 test-fortify-source \
8 test-glibc \
7ef9e055 9 test-gtk2 \
c7a79e96 10 test-gtk2-infobar \
f1138ec6
IM
11 test-hello \
12 test-libaudit \
13 test-libbfd \
1c47661a
IM
14 test-liberty \
15 test-liberty-z \
16 test-cplus-demangle \
f1138ec6
IM
17 test-libelf \
18 test-libelf-getphdrnum \
19 test-libelf-mmap \
20 test-libnuma \
7181a671 21 test-libperl \
9734163b 22 test-libpython \
95d061c8 23 test-libpython-version \
f1138ec6
IM
24 test-libslang \
25 test-libunwind \
34ef2162 26 test-on-exit \
f1138ec6 27 test-stackprotector-all \
01287e2c 28 test-stackprotector
b6aa9979 29
8b6eb56a
IM
30CC := $(CC) -MD
31
b6aa9979
IM
32all: $(FILES)
33
28e962b9 34BUILD = $(CC) $(CFLAGS) $(LDFLAGS) -o $(OUTPUT)$@ $@.c
b6aa9979
IM
35
36###############################
37
baa9c30e 38test-all:
8a0c4c28 39 $(BUILD) -Werror -fstack-protector -fstack-protector-all -O2 -Werror -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma $(LIBUNWIND_LIBS) -lelf -laudit -I/usr/include/slang -lslang $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl
baa9c30e 40
8b6eb56a 41test-hello:
b6aa9979
IM
42 $(BUILD)
43
90ac5422
IM
44test-stackprotector-all:
45 $(BUILD) -Werror -fstack-protector-all
46
430be5ab 47test-stackprotector:
046fa7ae 48 $(BUILD) -Werror -fstack-protector -Wstack-protector
430be5ab 49
1ea6f99e
IM
50test-fortify-source:
51 $(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2
52
78e9d655
IM
53test-bionic:
54 $(BUILD)
55
8f7f8005
IM
56test-libelf:
57 $(BUILD) -lelf
58
e12762cf
IM
59test-glibc:
60 $(BUILD)
61
8295d4e2
IM
62test-dwarf:
63 $(BUILD) -ldw
64
8869b17e
IM
65test-libelf-mmap:
66 $(BUILD) -lelf
67
b7bcef6f
IM
68test-libelf-getphdrnum:
69 $(BUILD) -lelf
70
3ae069cf
IM
71test-libnuma:
72 $(BUILD) -lnuma
73
058f952d 74test-libunwind:
8a0c4c28 75 $(BUILD) $(LIBUNWIND_LIBS) -lelf
058f952d 76
d795a658
IM
77test-libaudit:
78 $(BUILD) -laudit
79
b9498b50
IM
80test-libslang:
81 $(BUILD) -I/usr/include/slang -lslang
82
7ef9e055
IM
83test-gtk2:
84 $(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null)
85
c7a79e96
IM
86test-gtk2-infobar:
87 $(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null)
88
7181a671
IM
89grep-libs = $(filter -l%,$(1))
90strip-libs = $(filter-out -l%,$(1))
91
92PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null)
93PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS))
94PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
95PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
96FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
97
98test-libperl:
99 $(BUILD) $(FLAGS_PERL_EMBED)
100
9734163b
IM
101override PYTHON := python
102override PYTHON_CONFIG := python-config
103
104escape-for-shell-sq = $(subst ','\'',$(1))
105shell-sq = '$(escape-for-shell-sq)'
106
107PYTHON_CONFIG_SQ = $(call shell-sq,$(PYTHON_CONFIG))
108
109PYTHON_EMBED_LDOPTS = $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
110PYTHON_EMBED_LDFLAGS = $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
111PYTHON_EMBED_LIBADD = $(call grep-libs,$(PYTHON_EMBED_LDOPTS))
112PYTHON_EMBED_CCOPTS = $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
113FLAGS_PYTHON_EMBED = $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
114
115test-libpython:
116 $(BUILD) $(FLAGS_PYTHON_EMBED)
117
95d061c8
IM
118test-libpython-version:
119 $(BUILD) $(FLAGS_PYTHON_EMBED)
120
3b7646e4 121test-libbfd:
0dc09742 122 $(BUILD) -DPACKAGE='"perf"' -lbfd -ldl
3b7646e4 123
1c47661a 124test-liberty:
0dc09742 125 $(CC) -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty
1c47661a
IM
126
127test-liberty-z:
0dc09742 128 $(CC) -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty -lz
1c47661a
IM
129
130test-cplus-demangle:
131 $(BUILD) -liberty
132
34ef2162
IM
133test-on-exit:
134 $(BUILD)
135
4cc9117a
IM
136test-backtrace:
137 $(BUILD)
138
231486a5 139-include *.d
8b6eb56a 140
b6aa9979
IM
141###############################
142
143clean:
8b6eb56a 144 rm -f $(FILES) *.d