7 test-fortify-source.bin \
10 test-gtk2-infobar.bin \
16 test-cplus-demangle.bin \
18 test-libelf-getphdrnum.bin \
19 test-libelf-mmap.bin \
23 test-libpython-version.bin \
26 test-libunwind-debug-frame.bin \
28 test-stackprotector-all.bin \
31 CC := $(CROSS_COMPILE)gcc -MD
32 PKG_CONFIG := $(CROSS_COMPILE)pkg-config
36 BUILD = $(CC) $(CFLAGS) -o $(OUTPUT)$@ $(patsubst %.bin,%.c,$@) $(LDFLAGS)
38 ###############################
41 $(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
46 test-stackprotector-all.bin:
47 $(BUILD) -Werror -fstack-protector-all
49 test-fortify-source.bin:
50 $(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2
67 test-libelf-getphdrnum.bin:
76 test-libunwind-debug-frame.bin:
83 $(BUILD) -I/usr/include/slang -lslang
86 $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
88 test-gtk2-infobar.bin:
89 $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
91 grep-libs = $(filter -l%,$(1))
92 strip-libs = $(filter-out -l%,$(1))
94 PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null)
95 PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS))
96 PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
97 PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
98 FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
101 $(BUILD) $(FLAGS_PERL_EMBED)
103 override PYTHON := python
104 override PYTHON_CONFIG := python-config
106 escape-for-shell-sq = $(subst ','\'',$(1))
107 shell-sq = '$(escape-for-shell-sq)'
109 PYTHON_CONFIG_SQ = $(call shell-sq,$(PYTHON_CONFIG))
111 PYTHON_EMBED_LDOPTS = $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
112 PYTHON_EMBED_LDFLAGS = $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
113 PYTHON_EMBED_LIBADD = $(call grep-libs,$(PYTHON_EMBED_LDOPTS))
114 PYTHON_EMBED_CCOPTS = $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
115 FLAGS_PYTHON_EMBED = $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
118 $(BUILD) $(FLAGS_PYTHON_EMBED)
120 test-libpython-version.bin:
121 $(BUILD) $(FLAGS_PYTHON_EMBED)
124 $(BUILD) -DPACKAGE='"perf"' -lbfd -ldl
127 $(CC) -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty
130 $(CC) -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty -lz
132 test-cplus-demangle.bin:
146 ###############################