]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - tools/build/feature/Makefile
ASoC: wm8904: harmless underflow in wm8904_put_deemph()
[mirror_ubuntu-zesty-kernel.git] / tools / build / feature / Makefile
1
2 FILES= \
3 test-all.bin \
4 test-backtrace.bin \
5 test-bionic.bin \
6 test-dwarf.bin \
7 test-fortify-source.bin \
8 test-sync-compare-and-swap.bin \
9 test-glibc.bin \
10 test-gtk2.bin \
11 test-gtk2-infobar.bin \
12 test-hello.bin \
13 test-libaudit.bin \
14 test-libbfd.bin \
15 test-liberty.bin \
16 test-liberty-z.bin \
17 test-cplus-demangle.bin \
18 test-libelf.bin \
19 test-libelf-getphdrnum.bin \
20 test-libelf-mmap.bin \
21 test-libnuma.bin \
22 test-libperl.bin \
23 test-libpython.bin \
24 test-libpython-version.bin \
25 test-libslang.bin \
26 test-libunwind.bin \
27 test-libunwind-debug-frame.bin \
28 test-pthread-attr-setaffinity-np.bin \
29 test-stackprotector-all.bin \
30 test-timerfd.bin \
31 test-libdw-dwarf-unwind.bin \
32 test-libbabeltrace.bin \
33 test-compile-32.bin \
34 test-compile-x32.bin \
35 test-zlib.bin \
36 test-lzma.bin \
37 test-bpf.bin
38
39 CC := $(CROSS_COMPILE)gcc -MD
40 PKG_CONFIG := $(CROSS_COMPILE)pkg-config
41
42 all: $(FILES)
43
44 __BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ $(patsubst %.bin,%.c,$@) $(LDFLAGS)
45 BUILD = $(__BUILD) > $(OUTPUT)$(@:.bin=.make.output) 2>&1
46
47 ###############################
48
49 test-all.bin:
50 $(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
51
52 test-hello.bin:
53 $(BUILD)
54
55 test-pthread-attr-setaffinity-np.bin:
56 $(BUILD) -D_GNU_SOURCE -lpthread
57
58 test-stackprotector-all.bin:
59 $(BUILD) -fstack-protector-all
60
61 test-fortify-source.bin:
62 $(BUILD) -O2 -D_FORTIFY_SOURCE=2
63
64 test-bionic.bin:
65 $(BUILD)
66
67 test-libelf.bin:
68 $(BUILD) -lelf
69
70 test-glibc.bin:
71 $(BUILD)
72
73 DWARFLIBS := -ldw
74 ifeq ($(findstring -static,${LDFLAGS}),-static)
75 DWARFLIBS += -lelf -lebl -lz -llzma -lbz2
76 endif
77
78 test-dwarf.bin:
79 $(BUILD) $(DWARFLIBS)
80
81 test-libelf-mmap.bin:
82 $(BUILD) -lelf
83
84 test-libelf-getphdrnum.bin:
85 $(BUILD) -lelf
86
87 test-libnuma.bin:
88 $(BUILD) -lnuma
89
90 test-libunwind.bin:
91 $(BUILD) -lelf
92
93 test-libunwind-debug-frame.bin:
94 $(BUILD) -lelf
95
96 test-libaudit.bin:
97 $(BUILD) -laudit
98
99 test-libslang.bin:
100 $(BUILD) -I/usr/include/slang -lslang
101
102 test-gtk2.bin:
103 $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
104
105 test-gtk2-infobar.bin:
106 $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
107
108 grep-libs = $(filter -l%,$(1))
109 strip-libs = $(filter-out -l%,$(1))
110
111 PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null)
112 PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS))
113 PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
114 PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
115 FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
116
117 test-libperl.bin:
118 $(BUILD) $(FLAGS_PERL_EMBED)
119
120 test-libpython.bin:
121 $(BUILD)
122
123 test-libpython-version.bin:
124 $(BUILD)
125
126 test-libbfd.bin:
127 $(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl
128
129 test-liberty.bin:
130 $(CC) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty
131
132 test-liberty-z.bin:
133 $(CC) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty -lz
134
135 test-cplus-demangle.bin:
136 $(BUILD) -liberty
137
138 test-backtrace.bin:
139 $(BUILD)
140
141 test-timerfd.bin:
142 $(BUILD)
143
144 test-libdw-dwarf-unwind.bin:
145 $(BUILD) # -ldw provided by $(FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind)
146
147 test-libbabeltrace.bin:
148 $(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace)
149
150 test-sync-compare-and-swap.bin:
151 $(BUILD)
152
153 test-compile-32.bin:
154 $(CC) -m32 -o $(OUTPUT)$@ test-compile.c
155
156 test-compile-x32.bin:
157 $(CC) -mx32 -o $(OUTPUT)$@ test-compile.c
158
159 test-zlib.bin:
160 $(BUILD) -lz
161
162 test-lzma.bin:
163 $(BUILD) -llzma
164
165 test-bpf.bin:
166 $(BUILD)
167
168 -include *.d
169
170 ###############################
171
172 clean:
173 rm -f $(FILES) *.d $(FILES:.bin=.make.output)