blob: 1fce4474009cc1072a09da118cdc153183099bbc [file] [log] [blame]
Brian Silverman86497922018-02-10 19:28:39 -05001## Process this file with automake to create Makefile.in
2##
3## Copyright (C) 1996-2017 Red Hat, Inc.
4## This file is part of elfutils.
5##
6## This file is free software; you can redistribute it and/or modify
7## it under the terms of the GNU General Public License as published by
8## the Free Software Foundation; either version 3 of the License, or
9## (at your option) any later version.
10##
11## elfutils is distributed in the hope that it will be useful, but
12## WITHOUT ANY WARRANTY; without even the implied warranty of
13## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14## GNU General Public License for more details.
15##
16## You should have received a copy of the GNU General Public License
17## along with this program. If not, see <http://www.gnu.org/licenses/>.
18##
19include $(top_srcdir)/config/eu.am
20BUILD_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf
21
22AM_LDFLAGS =
23
24if !STANDALONE
25AM_CPPFLAGS += -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
26 -I$(top_srcdir)/libdwfl -I$(top_srcdir)/libdwelf \
27 -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \
28 -I$(top_srcdir)/lib -I..
29AM_LDFLAGS += -Wl,-rpath-link,../libasm:../libdw:../libelf
30endif
31
32if TESTS_RPATH
33AM_LDFLAGS += -Wl,-rpath,$(BUILD_RPATH)
34tests_rpath = yes
35else
36tests_rpath = no
37endif
38
39check_PROGRAMS = arextract arsymtest newfile saridx scnnames sectiondump \
40 showptable update1 update2 update3 update4 test-nlist \
41 show-die-info get-files get-lines get-pubnames \
42 get-aranges allfcts line2addr addrscopes funcscopes \
43 show-abbrev hash newscn ecp dwflmodtest \
44 find-prologues funcretval allregs rdwrmmap \
45 dwfl-bug-addr-overflow arls dwfl-bug-fd-leak \
46 dwfl-addr-sect dwfl-bug-report early-offscn \
47 dwfl-bug-getmodules dwarf-getmacros dwarf-ranges addrcfi \
48 test-flag-nobits dwarf-getstring rerequest_tag \
49 alldts typeiter typeiter2 low_high_pc \
50 test-elf_cntl_gelf_getshdr dwflsyms dwfllines \
51 dwfl-report-elf-align varlocs backtrace backtrace-child \
52 backtrace-data backtrace-dwarf debuglink debugaltlink \
53 buildid deleted deleted-lib.so aggregate_size peel_type \
54 vdsosyms \
55 getsrc_die strptr newdata elfstrtab dwfl-proc-attach \
56 elfshphehdr elfstrmerge dwelfgnucompressed elfgetchdr \
57 elfgetzdata elfputzdata zstrptr emptyfile vendorelf \
58 fillfile dwarf_default_lower_bound
59
60asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
61 asm-tst6 asm-tst7 asm-tst8 asm-tst9
62
63if BIARCH
64check_PROGRAMS += backtrace-child-biarch
65endif
66
67# Substitute $(COMPILE).
68backtrace-child-biarch$(EXEEXT): backtrace-child.c
69 $(AM_V_CC)$(CC_BIARCH) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
70 $(AM_CPPFLAGS) $(CPPFLAGS) \
71 $(AM_CFLAGS) $(CFLAGS) $(backtrace_child_CFLAGS) \
72 $(AM_LDFLAGS) $(LDFLAGS) $(backtrace_child_LDFLAGS) \
73 -o $@ $<
74
75TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile test-nlist \
76 update1 update2 update3 update4 \
77 run-show-die-info.sh run-get-files.sh run-get-lines.sh \
78 run-get-pubnames.sh run-get-aranges.sh run-allfcts.sh \
79 run-show-abbrev.sh run-line2addr.sh hash \
80 newscn run-strip-test.sh run-strip-test2.sh \
81 run-strip-test3.sh run-strip-test4.sh run-strip-test5.sh \
82 run-strip-test6.sh run-strip-test7.sh run-strip-test8.sh \
83 run-strip-test9.sh run-strip-test10.sh run-strip-test11.sh \
84 run-strip-nothing.sh run-strip-g.sh \
85 run-strip-groups.sh run-strip-reloc.sh run-strip-strmerge.sh \
86 run-strip-nobitsalign.sh run-strip-remove-keep.sh \
87 run-unstrip-test.sh run-unstrip-test2.sh run-unstrip-test3.sh \
88 run-unstrip-test4.sh run-unstrip-M.sh run-elfstrmerge-test.sh \
89 run-ecp-test.sh run-ecp-test2.sh run-alldts.sh \
90 run-elflint-test.sh run-elflint-self.sh run-ranlib-test.sh \
91 run-ranlib-test2.sh run-ranlib-test3.sh run-ranlib-test4.sh \
92 run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \
93 run-find-prologues.sh run-allregs.sh run-addrcfi.sh \
94 run-nm-self.sh run-readelf-self.sh \
95 run-varlocs-self.sh run-exprlocs-self.sh \
96 run-readelf-test1.sh run-readelf-test2.sh run-readelf-test3.sh \
97 run-readelf-test4.sh run-readelf-twofiles.sh \
98 run-readelf-macro.sh run-readelf-loc.sh \
99 run-readelf-aranges.sh run-readelf-line.sh run-readelf-z.sh \
100 run-native-test.sh run-bug1-test.sh \
101 run-debuglink.sh run-debugaltlink.sh run-buildid.sh \
102 dwfl-bug-addr-overflow run-addrname-test.sh \
103 dwfl-bug-fd-leak dwfl-bug-report \
104 run-dwfl-bug-offline-rel.sh run-dwfl-addr-sect.sh \
105 run-disasm-x86.sh run-disasm-x86-64.sh \
106 run-early-offscn.sh run-dwarf-getmacros.sh run-dwarf-ranges.sh \
107 run-test-flag-nobits.sh run-prelink-addr-test.sh \
108 run-dwarf-getstring.sh run-rerequest_tag.sh run-typeiter.sh \
109 run-readelf-d.sh run-readelf-gdb_index.sh run-unstrip-n.sh \
110 run-low_high_pc.sh run-macro-test.sh run-elf_cntl_gelf_getshdr.sh \
111 run-test-archive64.sh run-readelf-vmcoreinfo.sh \
112 run-readelf-mixed-corenote.sh run-dwfllines.sh \
113 run-readelf-variant.sh \
114 run-dwfl-report-elf-align.sh run-addr2line-test.sh \
115 run-addr2line-i-test.sh run-addr2line-i-lex-test.sh \
116 run-addr2line-i-demangle-test.sh run-addr2line-alt-debugpath.sh \
117 run-varlocs.sh run-exprlocs.sh run-funcretval.sh \
118 run-backtrace-native.sh run-backtrace-data.sh run-backtrace-dwarf.sh \
119 run-backtrace-native-biarch.sh run-backtrace-native-core.sh \
120 run-backtrace-native-core-biarch.sh run-backtrace-core-x86_64.sh \
121 run-backtrace-fp-core-x86_64.sh \
122 run-backtrace-fp-core-aarch64.sh \
123 run-backtrace-fp-core-ppc64le.sh \
124 run-backtrace-core-x32.sh \
125 run-backtrace-core-i386.sh run-backtrace-fp-core-i386.sh \
126 run-backtrace-core-ppc.sh \
127 run-backtrace-core-s390x.sh run-backtrace-core-s390.sh \
128 run-backtrace-core-aarch64.sh run-backtrace-core-sparc.sh \
129 run-backtrace-demangle.sh run-stack-d-test.sh run-stack-i-test.sh \
130 run-stack-demangled-test.sh run-readelf-zx.sh run-readelf-zp.sh \
131 run-readelf-dwz-multi.sh run-allfcts-multi.sh run-deleted.sh \
132 run-linkmap-cut.sh run-aggregate-size.sh run-peel-type.sh \
133 vdsosyms run-readelf-A.sh \
134 run-getsrc-die.sh run-strptr.sh newdata elfstrtab dwfl-proc-attach \
135 elfshphehdr run-lfs-symbols.sh run-dwelfgnucompressed.sh \
136 run-elfgetchdr.sh \
137 run-elfgetzdata.sh run-elfputzdata.sh run-zstrptr.sh \
138 run-compress-test.sh \
139 run-readelf-zdebug.sh run-readelf-zdebug-rel.sh \
140 emptyfile vendorelf fillfile dwarf_default_lower_bound
141
142if !BIARCH
143export ELFUTILS_DISABLE_BIARCH = 1
144endif
145
146if !DEMANGLE
147export ELFUTILS_DISABLE_DEMANGLE = 1
148endif
149
150if !STANDALONE
151check_PROGRAMS += msg_tst system-elf-libelf-test
152TESTS += msg_tst system-elf-libelf-test
153endif
154
155if LZMA
156TESTS += run-readelf-s.sh run-dwflsyms.sh
157endif
158
159if HAVE_LIBASM
160check_PROGRAMS += $(asm_TESTS)
161TESTS += $(asm_TESTS) run-disasm-bpf.sh
162endif
163
164EXTRA_DIST = run-arextract.sh run-arsymtest.sh run-ar.sh \
165 run-show-die-info.sh run-get-files.sh run-get-lines.sh \
166 run-get-pubnames.sh run-get-aranges.sh \
167 run-show-abbrev.sh run-strip-test.sh \
168 run-strip-test2.sh run-ecp-test.sh run-ecp-test2.sh \
169 testfile.bz2 testfile2.bz2 testfile3.bz2 testfile4.bz2 \
170 testfile5.bz2 testfile6.bz2 testfile7.bz2 testfile8.bz2 \
171 testfile9.bz2 testfile10.bz2 testfile11.bz2 testfile12.bz2 \
172 testfile13.bz2 run-strip-test3.sh run-allfcts.sh \
173 testfile_class_func.bz2 testfile_nested_funcs.bz2 \
174 run-line2addr.sh run-elflint-test.sh testfile14.bz2 \
175 run-strip-test4.sh run-strip-test5.sh run-strip-test6.sh \
176 run-strip-test7.sh run-strip-test8.sh run-strip-groups.sh \
177 run-strip-test9.sh run-strip-test10.sh run-strip-test11.sh \
178 run-strip-nothing.sh run-strip-remove-keep.sh run-strip-g.sh \
179 run-strip-strmerge.sh run-strip-nobitsalign.sh \
180 testfile-nobitsalign.bz2 testfile-nobitsalign.strip.bz2 \
181 run-strip-reloc.sh hello_i386.ko.bz2 hello_x86_64.ko.bz2 \
182 hello_ppc64.ko.bz2 hello_s390.ko.bz2 hello_aarch64.ko.bz2 \
183 hello_m68k.ko.bz2 \
184 run-unstrip-test.sh run-unstrip-test2.sh \
185 testfile-info-link.bz2 testfile-info-link.debuginfo.bz2 \
186 testfile-info-link.stripped.bz2 run-unstrip-test3.sh \
187 run-unstrip-test4.sh testfile-strtab.bz2 \
188 testfile-strtab.stripped.bz2 testfile-strtab.debuginfo.bz2 \
189 run-unstrip-M.sh run-elfstrmerge-test.sh \
190 run-elflint-self.sh run-ranlib-test.sh run-ranlib-test2.sh \
191 run-ranlib-test3.sh run-ranlib-test4.sh \
192 run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \
193 run-nm-self.sh run-readelf-self.sh run-addrcfi.sh \
194 run-varlocs-self.sh run-exprlocs-self.sh \
195 run-find-prologues.sh run-allregs.sh run-native-test.sh \
196 run-addrname-test.sh run-dwfl-bug-offline-rel.sh \
197 run-dwfl-addr-sect.sh run-early-offscn.sh \
198 run-dwarf-getmacros.sh \
199 run-dwarf-ranges.sh debug-ranges-no-lowpc.o.bz2 \
200 run-test-flag-nobits.sh \
201 run-dwarf-getstring.sh run-rerequest_tag.sh run-alldts.sh \
202 testfile15.bz2 testfile15.debug.bz2 \
203 testfile16.bz2 testfile16.debug.bz2 \
204 testfile17.bz2 testfile17.debug.bz2 \
205 testfile18.bz2 testfile19.bz2 testfile19.index.bz2 \
206 testfile20.bz2 testfile20.index.bz2 \
207 testfile21.bz2 testfile21.index.bz2 \
208 testfile22.bz2 testfile23.bz2 testfile24.bz2 testfile25.bz2 \
209 testfile26.bz2 testfile27.bz2 \
210 coverage.sh test-subr.sh test-wrapper.sh \
211 run-readelf-test1.sh run-readelf-test2.sh run-readelf-test3.sh \
212 run-readelf-test4.sh run-readelf-twofiles.sh \
213 run-bug1-test.sh testfile28.bz2 testfile28.rdwr.bz2 \
214 run-debuglink.sh run-debugaltlink.sh run-buildid.sh \
215 testfile29.bz2 testfile29.rdwr.bz2 \
216 testfile30.bz2 testfile31.bz2 testfile32.bz2 testfile33.bz2 \
217 testfile34.bz2 testfile35.bz2 testfile35.debug.bz2 \
218 testfile36.bz2 testfile36.debug.bz2 \
219 testfile37.bz2 testfile37.debug.bz2 \
220 testfile38.bz2 testfile39.bz2 testfile40.bz2 testfile40.debug.bz2 \
221 testfile41.bz2 testfile42.bz2 testfile42_noshdrs.bz2 \
222 testfile43.bz2 \
223 testfile44.S.bz2 testfile44.expect.bz2 run-disasm-x86.sh \
224 testfile45.S.bz2 testfile45.expect.bz2 run-disasm-x86-64.sh \
225 testfile46.bz2 testfile47.bz2 testfile48.bz2 testfile48.debug.bz2 \
226 testfile49.bz2 testfile50.bz2 testfile51.bz2 \
227 testfile-macros-0xff.bz2 \
228 run-readelf-macro.sh testfilemacro.bz2 \
229 run-readelf-loc.sh testfileloc.bz2 \
230 run-readelf-aranges.sh run-readelf-line.sh testfilefoobarbaz.bz2 \
231 run-readelf-z.sh \
232 run-readelf-dwz-multi.sh libtestfile_multi_shared.so.bz2 \
233 testfile_multi.dwz.bz2 testfile_multi_main.bz2 \
234 testfile-dwzstr.bz2 testfile-dwzstr.multi.bz2 \
235 run-allfcts-multi.sh \
236 test-offset-loop.bz2 test-offset-loop.alt.bz2 \
237 run-prelink-addr-test.sh \
238 testfile52-32.so.bz2 testfile52-32.so.debug.bz2 \
239 testfile52-32.prelink.so.bz2 testfile52-32.noshdrs.so.bz2 \
240 testfile52-64.so.bz2 testfile52-64.so.debug.bz2 \
241 testfile52-64.prelink.so.bz2 testfile52-64.noshdrs.so.bz2 \
242 testfile53-32.bz2 testfile53-32.debug.bz2 \
243 testfile53-32.prelink.bz2 testfile53-64.bz2 \
244 testfile53-64.debug.bz2 testfile53-64.prelink.bz2 \
245 testfile54-32.so.bz2 testfile54-32.so.debug.bz2 \
246 testfile54-32.prelink.so.bz2 testfile54-32.noshdrs.so.bz2 \
247 testfile54-64.so.bz2 testfile54-64.so.debug.bz2 \
248 testfile54-64.prelink.so.bz2 testfile54-64.noshdrs.so.bz2 \
249 testfile55-32.bz2 testfile55-32.debug.bz2 \
250 testfile55-32.prelink.bz2 testfile55-64.bz2 \
251 testfile55-64.debug.bz2 testfile55-64.prelink.bz2 \
252 testfile56.bz2 testfile57.bz2 testfile58.bz2 \
253 run-typeiter.sh testfile59.bz2 \
254 run-readelf-d.sh testlib_dynseg.so.bz2 \
255 testfile-s390x-hash-both.bz2 \
256 run-readelf-gdb_index.sh testfilegdbindex5.bz2 \
257 testfilegdbindex7.bz2 \
258 run-readelf-s.sh testfilebazdbg.bz2 testfilebazdyn.bz2 \
259 testfilebazmin.bz2 testfilebazdbg.debug.bz2 testfilebazmdb.bz2 \
260 testfilebaztab.bz2 testfilebasmin.bz2 testfilebaxmin.bz2 \
261 testfilebazdbg_pl.bz2 testfilebazmin_pl.bz2 \
262 testfilebazdbg_plr.bz2 testfilebazmin_plr.bz2 \
263 testfilebazdbgppc64.bz2 testfilebazdbgppc64.debug.bz2 \
264 testfilebazdbgppc64_pl.bz2 testfilebazdbgppc64_plr.bz2 \
265 testfilebazdynppc64.bz2 testfilebazmdbppc64.bz2 \
266 testfilebazminppc64.bz2 testfilebazminppc64_pl.bz2 \
267 testfilebazminppc64_plr.bz2 testfilebaztabppc64.bz2 \
268 run-readelf-variant.sh testfile-ada-variant.bz2 \
269 run-dwflsyms.sh \
270 run-unstrip-n.sh testcore-rtlib.bz2 testcore-rtlib-ppc.bz2 \
271 run-low_high_pc.sh testfile_low_high_pc.bz2 \
272 run-macro-test.sh testfile-macinfo.bz2 testfile-macros.bz2 \
273 run-elf_cntl_gelf_getshdr.sh \
274 run-test-archive64.sh testarchive64.a.bz2 \
275 testfile60.bz2 testfile61.bz2 \
276 run-readelf-vmcoreinfo.sh testfile62.bz2 \
277 run-readelf-mixed-corenote.sh testfile63.bz2 testfile64.bz2 \
278 testfile65.bz2 testfile67.bz2 testfile68.bz2 \
279 testfile69.core.bz2 testfile69.so.bz2 \
280 testfile70.core.bz2 testfile70.exec.bz2 testfile71.bz2 \
281 run-dwfllines.sh run-dwfl-report-elf-align.sh \
282 testfile-dwfl-report-elf-align-shlib.so.bz2 \
283 testfilenolines.bz2 test-core-lib.so.bz2 test-core.core.bz2 \
284 test-core.exec.bz2 run-addr2line-test.sh \
285 run-addr2line-i-test.sh testfile-inlines.bz2 \
286 run-addr2line-i-lex-test.sh testfile-lex-inlines.bz2 \
287 run-addr2line-i-demangle-test.sh run-addr2line-alt-debugpath.sh \
288 testfileppc32.bz2 testfileppc64.bz2 \
289 testfiles390.bz2 testfiles390x.bz2 \
290 testfilearm.bz2 testfileaarch64.bz2 \
291 run-varlocs.sh run-exprlocs.sh testfile-stridex.bz2 \
292 testfile_const_type.c testfile_const_type.bz2 \
293 testfile_implicit_pointer.c testfile_implicit_pointer.bz2 \
294 testfile_parameter_ref.c testfile_parameter_ref.bz2 \
295 testfile_entry_value.c testfile_entry_value.bz2 \
296 testfile_implicit_value.c testfile_implicit_value.bz2 \
297 testfile_aarch64_core.bz2 testfile_i686_core.bz2 \
298 run-funcretval.sh funcretval_test.c funcretval_test_aarch64.bz2 \
299 run-backtrace-data.sh run-backtrace-dwarf.sh cleanup-13.c \
300 run-backtrace-native.sh run-backtrace-native-biarch.sh \
301 run-backtrace-native-core.sh run-backtrace-native-core-biarch.sh \
302 run-backtrace-core-x86_64.sh run-backtrace-core-i386.sh \
303 run-backtrace-fp-core-x86_64.sh \
304 run-backtrace-core-x32.sh \
305 run-backtrace-fp-core-aarch64.sh \
306 backtrace.aarch64.fp.core.bz2 backtrace.aarch64.fp.exec.bz2 \
307 backtrace-subr.sh backtrace.i386.core.bz2 backtrace.i386.exec.bz2 \
308 run-backtrace-fp-core-i386.sh \
309 backtrace.i386.fp.core.bz2 backtrace.i386.fp.exec.bz2 \
310 run-backtrace-fp-core-ppc64le.sh \
311 backtrace.ppc64le.fp.core.bz2 backtrace.ppc64le.fp.exec.bz2 \
312 backtrace.x86_64.core.bz2 backtrace.x86_64.exec.bz2 \
313 backtrace.x86_64.fp.core.bz2 backtrace.x86_64.fp.exec.bz2 \
314 backtrace.ppc.core.bz2 backtrace.ppc.exec.bz2 \
315 run-backtrace-core-ppc.sh testfile66.bz2 testfile66.core.bz2 \
316 backtrace.s390x.core.bz2 backtrace.s390x.exec.bz2 \
317 backtrace.s390.core.bz2 backtrace.s390.exec.bz2 \
318 run-backtrace-core-s390x.sh run-backtrace-core-s390.sh \
319 run-backtrace-core-aarch64.sh \
320 backtrace.aarch64.core.bz2 backtrace.aarch64.exec.bz2 \
321 run-backtrace-core-sparc.sh \
322 backtrace.sparc.core.bz2 backtrace.sparc.exec.bz2 \
323 run-backtrace-demangle.sh testfile-backtrace-demangle.bz2 \
324 testfile-backtrace-demangle.cc \
325 testfile-backtrace-demangle.core.bz2 \
326 run-stack-d-test.sh run-stack-i-test.sh \
327 run-stack-demangled-test.sh \
328 testfiledwarfinlines.bz2 testfiledwarfinlines.core.bz2 \
329 run-readelf-zdebug.sh testfile-debug.bz2 testfile-zdebug.bz2 \
330 run-readelf-zdebug-rel.sh testfile-debug-rel.o.bz2 \
331 testfile-debug-rel-g.o.bz2 testfile-debug-rel-z.o.bz2 \
332 run-readelf-zx.sh run-readelf-zp.sh \
333 run-deleted.sh run-linkmap-cut.sh linkmap-cut-lib.so.bz2 \
334 linkmap-cut.bz2 linkmap-cut.core.bz2 \
335 run-aggregate-size.sh testfile-sizes1.o.bz2 testfile-sizes2.o.bz2 \
336 testfile-sizes3.o.bz2 testfile-sizes4.o.bz2 testfile-sizes4.s \
337 run-peel-type.sh \
338 run-readelf-A.sh testfileppc32attrs.o.bz2 \
339 testfilesparc64attrs.o.bz2 testfileppc64attrs.o.bz2 \
340 testfile-debug-types.bz2 \
341 run-getsrc-die.sh run-strptr.sh \
342 testfile-x32-core.bz2 testfile-x32.bz2 \
343 backtrace.x32.core.bz2 backtrace.x32.exec.bz2 \
344 testfile-x32-s.bz2 testfile-x32-d.bz2 testfile-x32-debug.bz2 \
345 run-lfs-symbols.sh lfs-symbols testfile-nolfs.bz2 \
346 testfile-zgnu32.bz2 testfile-zgnu64.bz2 \
347 testfile-zgnu32be.bz2 testfile-zgnu64be.bz2 \
348 run-dwelfgnucompressed.sh \
349 testfile-zgabi32.bz2 testfile-zgabi64.bz2 \
350 testfile-zgabi32be.bz2 testfile-zgabi64be.bz2 \
351 run-elfgetchdr.sh run-elfgetzdata.sh run-elfputzdata.sh \
352 run-zstrptr.sh run-compress-test.sh \
353 run-disasm-bpf.sh \
354 testfile-bpf-dis1.expect.bz2 testfile-bpf-dis1.o.bz2 \
355 testfile-m68k-core.bz2 testfile-m68k.bz2 testfile-m68k-s.bz2
356
357if USE_VALGRIND
358valgrind_cmd='valgrind -q --leak-check=full --error-exitcode=1'
359endif
360
361
362installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir); \
363 bindir=$(DESTDIR)$(bindir); \
364 LC_ALL=C; LANG=C; \
365 VALGRIND_CMD=$(valgrind_cmd); \
366 abs_srcdir=$(abs_srcdir); \
367 abs_builddir=$(abs_builddir); \
368 abs_top_builddir=$(abs_top_builddir); \
369 export abs_srcdir; export abs_builddir; \
370 export abs_top_builddir; \
371 export libdir; export bindir; \
372 export LC_ALL; export LANG; export VALGRIND_CMD; \
373 NM=$(NM); export NM;
374installed_LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
375 installed $(tests_rpath) \
376 '$(program_transform_name)'
377if STANDALONE
378TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT)
379LOG_COMPILER = $(installed_LOG_COMPILER)
380else !STANDALONE
381TESTS_ENVIRONMENT = LC_ALL=C; LANG=C; VALGRIND_CMD=$(valgrind_cmd); \
382 abs_srcdir=$(abs_srcdir); abs_builddir=$(abs_builddir); \
383 abs_top_builddir=$(abs_top_builddir); \
384 export abs_srcdir; export abs_builddir; \
385 export abs_top_builddir; \
386 export LC_ALL; export LANG; export VALGRIND_CMD; \
387 NM=$(NM); export NM;
388LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
389 $(abs_top_builddir)/libdw:$(abs_top_builddir)/backends:$(abs_top_builddir)/libelf:$(abs_top_builddir)/libasm
390
391installcheck-local:
392 $(MAKE) $(AM_MAKEFLAGS) \
393 TESTS_ENVIRONMENT="$(installed_TESTS_ENVIRONMENT)" \
394 LOG_COMPILER="$(installed_LOG_COMPILER)" check-TESTS
395endif !STANDALONE
396
397if STANDALONE
398libdw = -ldw
399libelf = -lelf
400libasm = -lasm
401libebl = -lebl
402else !STANDALONE
403if BUILD_STATIC
404libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl
405libelf = ../libelf/libelf.a -lz
406libasm = ../libasm/libasm.a
407else
408libdw = ../libdw/libdw.so
409libelf = ../libelf/libelf.so
410libasm = ../libasm/libasm.so
411endif
412libebl = ../libebl/libebl.a
413libeu = ../lib/libeu.a
414endif !STANDALONE
415
416arextract_LDADD = $(libelf)
417arsymtest_LDADD = $(libelf)
418newfile_LDADD = $(libelf)
419saridx_LDADD = $(libelf)
420scnnames_LDADD = $(libelf)
421sectiondump_LDADD = $(libelf)
422showptable_LDADD = $(libelf)
423hash_LDADD = $(libelf)
424test_nlist_LDADD = $(libelf)
425msg_tst_LDADD = $(libelf)
426newscn_LDADD = $(libelf)
427early_offscn_LDADD = $(libelf)
428ecp_LDADD = $(libelf)
429update1_LDADD = $(libelf)
430update2_LDADD = $(libelf)
431update3_LDADD = $(libdw) $(libelf)
432update4_LDADD = $(libdw) $(libelf)
433show_die_info_LDADD = $(libdw) $(libelf)
434get_pubnames_LDADD = $(libdw) $(libelf)
435show_abbrev_LDADD = $(libdw) $(libelf)
436get_lines_LDADD = $(libdw) $(libelf)
437get_files_LDADD = $(libdw) $(libelf)
438get_aranges_LDADD = $(libdw) $(libelf)
439allfcts_LDADD = $(libdw) $(libelf)
440line2addr_LDADD = $(libdw) $(argp_LDADD)
441addrscopes_LDADD = $(libdw) $(argp_LDADD)
442funcscopes_LDADD = $(libdw) $(argp_LDADD)
443funcretval_LDADD = $(libdw) $(argp_LDADD)
444allregs_LDADD = $(libdw) $(argp_LDADD)
445find_prologues_LDADD = $(libdw) $(argp_LDADD)
446#show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf)
447asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl
448asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl
449asm_tst3_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl
450asm_tst4_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl
451asm_tst5_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl
452asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl
453asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl
454asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl
455asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl
456dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) -ldl
457rdwrmmap_LDADD = $(libelf)
458dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf) -ldl
459arls_LDADD = $(libelf)
460dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf) -ldl
461dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf) -ldl
462dwfl_bug_getmodules_LDADD = $(libdw) $(libebl) $(libelf) -ldl
463dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) -ldl
464dwarf_getmacros_LDADD = $(libdw)
465dwarf_ranges_LDADD = $(libdw)
466dwarf_getstring_LDADD = $(libdw)
467addrcfi_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) -ldl
468test_flag_nobits_LDADD = $(libelf)
469rerequest_tag_LDADD = $(libdw)
470alldts_LDADD = $(libdw) $(libelf)
471typeiter_LDADD = $(libdw) $(libelf)
472typeiter2_LDADD = $(libdw) $(libelf)
473low_high_pc_LDADD = $(libdw) $(libelf) $(argp_LDADD)
474test_elf_cntl_gelf_getshdr_LDADD = $(libelf)
475dwflsyms_LDADD = $(libdw) $(libelf) $(argp_LDADD)
476dwfllines_LDADD = $(libdw) $(libelf) $(argp_LDADD)
477dwfl_report_elf_align_LDADD = $(libdw)
478varlocs_LDADD = $(libdw) $(libelf) $(argp_LDADD)
479backtrace_LDADD = $(libdw) $(libelf) $(argp_LDADD)
480# backtrace-child-biarch also uses those *_CFLAGS and *_LDLAGS variables:
481backtrace_child_CFLAGS = $(fpie_CFLAGS)
482backtrace_child_LDFLAGS = -pie -pthread
483backtrace_child_biarch_SOURCES = backtrace-child.c
484backtrace_data_LDADD = $(libdw) $(libelf)
485backtrace_dwarf_CFLAGS = -Wno-unused-parameter
486backtrace_dwarf_LDADD = $(libdw) $(libelf)
487debuglink_LDADD = $(libdw) $(libelf)
488debugaltlink_LDADD = $(libdw) $(libelf)
489buildid_LDADD = $(libdw) $(libelf)
490deleted_LDADD = ./deleted-lib.so
491deleted_lib_so_LDFLAGS = -shared
492deleted_lib_so_CFLAGS = $(fpic_CFLAGS) -fasynchronous-unwind-tables
493aggregate_size_LDADD = $(libdw) $(libelf) $(argp_LDADD)
494peel_type_LDADD = $(libdw) $(libelf) $(argp_LDADD)
495vdsosyms_LDADD = $(libdw) $(libelf)
496getsrc_die_LDADD = $(libdw) $(libelf)
497strptr_LDADD = $(libelf)
498newdata_LDADD = $(libelf)
499elfstrtab_LDADD = $(libelf)
500dwfl_proc_attach_LDADD = $(libdw)
501dwfl_proc_attach_LDFLAGS = -pthread $(AM_LDFLAGS)
502elfshphehdr_LDADD =$(libelf)
503elfstrmerge_LDADD = $(libdw) $(libelf)
504dwelfgnucompressed_LDADD = $(libelf) $(libdw)
505elfgetchdr_LDADD = $(libelf) $(libdw)
506elfgetzdata_LDADD = $(libelf)
507elfputzdata_LDADD = $(libelf)
508zstrptr_LDADD = $(libelf)
509emptyfile_LDADD = $(libelf)
510vendorelf_LDADD = $(libelf)
511fillfile_LDADD = $(libelf)
512dwarf_default_lower_bound_LDADD = $(libdw)
513
514# We want to test the libelf header against the system elf.h header.
515# Don't include any -I CPPFLAGS.
516system_elf_libelf_test_CPPFLAGS =
517system_elf_libelf_test_LDADD = $(libelf)
518
519# A lock file used to make sure only one test dumps core at a time
520CLEANFILES += core-dump-backtrace.lock
521
522if GCOV
523check: check-am coverage
524.PHONY: coverage
525coverage:
526 -$(srcdir)/coverage.sh
527endif