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 \
38 CC
:= $(CROSS_COMPILE
)gcc
-MD
39 PKG_CONFIG
:= $(CROSS_COMPILE
)pkg-config
43 __BUILD
= $(CC
) $(CFLAGS
) -Wall
-Werror
-o
$(OUTPUT
)$@
$(patsubst %.bin
,%.c
,$@
) $(LDFLAGS
)
44 BUILD
= $(__BUILD
) > $(OUTPUT
)$(@
:.bin
=.make.output
) 2>&1
46 ###############################
49 $(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
-llzma
54 test-pthread-attr-setaffinity-np.bin
:
55 $(BUILD
) -D_GNU_SOURCE
-lpthread
57 test-stackprotector-all.bin
:
58 $(BUILD
) -fstack-protector-all
60 test-fortify-source.bin
:
61 $(BUILD
) -O2
-D_FORTIFY_SOURCE
=2
78 test-libelf-getphdrnum.bin
:
87 test-libunwind-debug-frame.bin
:
94 $(BUILD
) -I
/usr
/include/slang
-lslang
97 $(BUILD
) $(shell $(PKG_CONFIG
) --libs
--cflags gtk
+-2.0 2>/dev
/null
)
99 test-gtk2-infobar.bin
:
100 $(BUILD
) $(shell $(PKG_CONFIG
) --libs
--cflags gtk
+-2.0 2>/dev
/null
)
102 grep-libs
= $(filter -l
%,$(1))
103 strip-libs
= $(filter-out -l
%,$(1))
105 PERL_EMBED_LDOPTS
= $(shell perl
-MExtUtils
::Embed
-e ldopts
2>/dev
/null
)
106 PERL_EMBED_LDFLAGS
= $(call strip-libs
,$(PERL_EMBED_LDOPTS
))
107 PERL_EMBED_LIBADD
= $(call grep-libs
,$(PERL_EMBED_LDOPTS
))
108 PERL_EMBED_CCOPTS
= `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
109 FLAGS_PERL_EMBED
=$(PERL_EMBED_CCOPTS
) $(PERL_EMBED_LDOPTS
)
112 $(BUILD
) $(FLAGS_PERL_EMBED
)
117 test-libpython-version.bin
:
121 $(BUILD
) -DPACKAGE
='"perf"' -lbfd
-lz
-liberty
-ldl
124 $(CC
) -Wall
-Werror
-o
$(OUTPUT
)$@ test-libbfd.c
-DPACKAGE
='"perf"' -lbfd
-ldl
-liberty
127 $(CC
) -Wall
-Werror
-o
$(OUTPUT
)$@ test-libbfd.c
-DPACKAGE
='"perf"' -lbfd
-ldl
-liberty
-lz
129 test-cplus-demangle.bin
:
138 test-libdw-dwarf-unwind.bin
:
139 $(BUILD
) # -ldw provided by $(FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind)
141 test-libbabeltrace.bin
:
142 $(BUILD
) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace)
144 test-sync-compare-and-swap.bin
:
148 $(CC
) -m32
-o
$(OUTPUT
)$@ test-compile.c
150 test-compile-x32.bin
:
151 $(CC
) -mx32
-o
$(OUTPUT
)$@ test-compile.c
161 ###############################
164 rm -f
$(FILES
) *.d
$(FILES
:.bin
=.make.output
)