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 \
32 test-libbabeltrace.bin \
34 test-compile-x32.bin \
37 CC := $(CROSS_COMPILE)gcc -MD
38 PKG_CONFIG := $(CROSS_COMPILE)pkg-config
42 __BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ $(patsubst %.bin,%.c,$@) $(LDFLAGS)
43 BUILD = $(__BUILD) > $(OUTPUT)$(@:.bin=.make.output) 2>&1
45 ###############################
48 $(BUILD) -fstack-protector-all -O2 -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
53 test-pthread-attr-setaffinity-np.bin:
54 $(BUILD) -D_GNU_SOURCE -lpthread
56 test-stackprotector-all.bin:
57 $(BUILD) -fstack-protector-all
59 test-fortify-source.bin:
60 $(BUILD) -O2 -D_FORTIFY_SOURCE=2
77 test-libelf-getphdrnum.bin:
86 test-libunwind-debug-frame.bin:
93 $(BUILD) -I/usr/include/slang -lslang
96 $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
98 test-gtk2-infobar.bin:
99 $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
101 grep-libs = $(filter -l%,$(1))
102 strip-libs = $(filter-out -l%,$(1))
104 PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null)
105 PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS))
106 PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
107 PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
108 FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
111 $(BUILD) $(FLAGS_PERL_EMBED)
116 test-libpython-version.bin:
120 $(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl
123 $(CC) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty
126 $(CC) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty -lz
128 test-cplus-demangle.bin:
137 test-libdw-dwarf-unwind.bin:
138 $(BUILD) # -ldw provided by $(FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind)
140 test-libbabeltrace.bin:
141 $(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace)
143 test-sync-compare-and-swap.bin:
147 $(CC) -m32 -o $(OUTPUT)$@ test-compile.c
149 test-compile-x32.bin:
150 $(CC) -mx32 -o $(OUTPUT)$@ test-compile.c
157 ###############################
160 rm -f $(FILES) *.d $(FILES:.bin=.make.output)