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