7 test-fortify-source.bin \
8 test-sync-compare-and-swap.bin \
11 test-gtk2-infobar.bin \
17 test-cplus-demangle.bin \
19 test-libelf-getphdrnum.bin \
20 test-libelf-mmap.bin \
24 test-libpython-version.bin \
27 test-libunwind-debug-frame.bin \
28 test-pthread-attr-setaffinity-np.bin \
29 test-stackprotector-all.bin \
31 test-libdw-dwarf-unwind.bin \
33 test-compile-x32.bin \
36 CC := $(CROSS_COMPILE)gcc -MD
37 PKG_CONFIG := $(CROSS_COMPILE)pkg-config
41 BUILD = $(CC) $(CFLAGS) -o $(OUTPUT)$@ $(patsubst %.bin,%.c,$@) $(LDFLAGS)
43 ###############################
46 $(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 -lz
51 test-pthread-attr-setaffinity-np.bin:
52 $(BUILD) -Werror -lpthread
54 test-stackprotector-all.bin:
55 $(BUILD) -Werror -fstack-protector-all
57 test-fortify-source.bin:
58 $(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2
75 test-libelf-getphdrnum.bin:
84 test-libunwind-debug-frame.bin:
91 $(BUILD) -I/usr/include/slang -lslang
94 $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
96 test-gtk2-infobar.bin:
97 $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
99 grep-libs = $(filter -l%,$(1))
100 strip-libs = $(filter-out -l%,$(1))
102 PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null)
103 PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS))
104 PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
105 PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
106 FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
109 $(BUILD) $(FLAGS_PERL_EMBED)
114 test-libpython-version.bin:
118 $(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl
121 $(CC) -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty
124 $(CC) -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty -lz
126 test-cplus-demangle.bin:
135 test-libdw-dwarf-unwind.bin:
138 test-sync-compare-and-swap.bin:
142 $(CC) -m32 -o $(OUTPUT)$@ test-compile.c
144 test-compile-x32.bin:
145 $(CC) -mx32 -o $(OUTPUT)$@ test-compile.c
152 ###############################