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