1 # Makefile.am -- Backtrace Makefile.
2 # Copyright (C) 2012-2025 Free Software Foundation, Inc.
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
8 # (1) Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer.
11 # (2) Redistributions in binary form must reproduce the above copyright
12 # notice, this list of conditions and the following disclaimer in
13 # the documentation and/or other materials provided with the
16 # (3) The name of the author may not be used to
17 # endorse or promote products derived from this software without
18 # specific prior written permission.
20 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 # DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
24 # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28 # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
29 # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 # POSSIBILITY OF SUCH DAMAGE.
32 ACLOCAL_AMFLAGS = -I .. -I ../config
34 AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \
37 AM_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) $(PIC_FLAG) $(CET_HOST_FLAGS)
39 noinst_LTLIBRARIES = libbacktrace.la
41 libbacktrace_la_SOURCES = \
72 EXTRA_libbacktrace_la_SOURCES = \
78 libbacktrace_la_LIBADD = \
84 libbacktrace_la_DEPENDENCIES = $(libbacktrace_la_LIBADD)
88 # Add a test to this variable if you want it to be built as a program,
92 # Add a test to this variable if you want it to be run.
95 # Add a test to this variable if you want it to be built as a Makefile
99 # Add a test to this variable if you want it to be built as a program,
100 # with SOURCES, etc., and run.
103 # Add a file to this variable if you want it to be built for testing.
106 # Flags to use when compiling test programs.
107 libbacktrace_TEST_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) -g
109 # Flags to use when linking test programs.
110 # This avoids generating a shell script when configured with --enable-shared.
111 libbacktrace_testing_ldflags = -no-install
121 check_LTLIBRARIES = libbacktrace_alloc.la
123 libbacktrace_alloc_la_SOURCES = $(libbacktrace_la_SOURCES)
124 libbacktrace_alloc_la_LIBADD = $(BACKTRACE_FILE) $(FORMAT_FILE) read.lo alloc.lo
126 libbacktrace_alloc_la_DEPENDENCIES = $(libbacktrace_alloc_la_LIBADD)
128 check_LTLIBRARIES += libbacktrace_noformat.la
130 libbacktrace_noformat_la_SOURCES = $(libbacktrace_la_SOURCES)
131 libbacktrace_noformat_la_LIBADD = $(BACKTRACE_FILE) $(VIEW_FILE) $(ALLOC_FILE)
133 libbacktrace_noformat_la_DEPENDENCIES = $(libbacktrace_noformat_la_LIBADD)
136 if HAVE_OBJCOPY_DEBUGLINK
138 TEST_BUILD_ID_DIR=$(abs_builddir)/usr/lib/debug/.build-id/
140 check_LTLIBRARIES += libbacktrace_elf_for_test.la
142 libbacktrace_elf_for_test_la_SOURCES = $(libbacktrace_la_SOURCES)
143 libbacktrace_elf_for_test_la_LIBADD = $(BACKTRACE_FILE) elf_for_test.lo \
144 $(VIEW_FILE) $(ALLOC_FILE)
146 elf_for_test.c: elf.c
147 SEARCH='^#define SYSTEM_BUILD_ID_DIR.*$$'; \
148 REPLACE="#define SYSTEM_BUILD_ID_DIR \"$(TEST_BUILD_ID_DIR)\""; \
149 $(SED) "s%$$SEARCH%$$REPLACE%" \
154 endif HAVE_OBJCOPY_DEBUGLINK
158 nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \
159 SEARCH='#error "Unknown BACKTRACE_ELF_SIZE"'; \
160 REPLACE="#undef BACKTRACE_ELF_SIZE\\$${nl}#define BACKTRACE_ELF_SIZE"; \
161 $(SED) "s/^$$SEARCH\$$/$$REPLACE $*/" \
167 nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \
168 SEARCH='#error "Unknown BACKTRACE_XCOFF_SIZE"'; \
169 REPLACE="#undef BACKTRACE_XCOFF_SIZE\\$${nl}#define BACKTRACE_XCOFF_SIZE"; \
170 $(SED) "s/^$$SEARCH\$$/$$REPLACE $*/" \
175 test_elf_32_SOURCES = test_format.c testlib.c
176 test_elf_32_CFLAGS = $(libbacktrace_TEST_CFLAGS)
177 test_elf_32_LDFLAGS = $(libbacktrace_testing_ldflags)
178 test_elf_32_LDADD = libbacktrace_noformat.la elf_32.lo
180 BUILDTESTS += test_elf_32
182 test_elf_64_SOURCES = test_format.c testlib.c
183 test_elf_64_CFLAGS = $(libbacktrace_TEST_CFLAGS)
184 test_elf_64_LDFLAGS = $(libbacktrace_testing_ldflags)
185 test_elf_64_LDADD = libbacktrace_noformat.la elf_64.lo
187 BUILDTESTS += test_elf_64
189 test_macho_SOURCES = test_format.c testlib.c
190 test_macho_CFLAGS = $(libbacktrace_TEST_CFLAGS)
191 test_macho_LDFLAGS = $(libbacktrace_testing_ldflags)
192 test_macho_LDADD = libbacktrace_noformat.la macho.lo
194 BUILDTESTS += test_macho
196 test_xcoff_32_SOURCES = test_format.c testlib.c
197 test_xcoff_32_CFLAGS = $(libbacktrace_TEST_CFLAGS)
198 test_xcoff_32_LDFLAGS = $(libbacktrace_testing_ldflags)
199 test_xcoff_32_LDADD = libbacktrace_noformat.la xcoff_32.lo
201 BUILDTESTS += test_xcoff_32
203 test_xcoff_64_SOURCES = test_format.c testlib.c
204 test_xcoff_64_CFLAGS = $(libbacktrace_TEST_CFLAGS)
205 test_xcoff_64_LDFLAGS = $(libbacktrace_testing_ldflags)
206 test_xcoff_64_LDADD = libbacktrace_noformat.la xcoff_64.lo
208 BUILDTESTS += test_xcoff_64
210 test_pecoff_SOURCES = test_format.c testlib.c
211 test_pecoff_CFLAGS = $(libbacktrace_TEST_CFLAGS)
212 test_pecoff_LDFLAGS = $(libbacktrace_testing_ldflags)
213 test_pecoff_LDADD = libbacktrace_noformat.la pecoff.lo
215 BUILDTESTS += test_pecoff
217 test_unknown_SOURCES = test_format.c testlib.c
218 test_unknown_CFLAGS = $(libbacktrace_TEST_CFLAGS)
219 test_unknown_LDFLAGS = $(libbacktrace_testing_ldflags)
220 test_unknown_LDADD = libbacktrace_noformat.la unknown.lo
222 BUILDTESTS += test_unknown
224 unittest_SOURCES = unittest.c testlib.c
225 unittest_CFLAGS = $(libbacktrace_TEST_CFLAGS)
226 unittest_LDFLAGS = $(libbacktrace_testing_ldflags)
227 unittest_LDADD = libbacktrace.la
229 BUILDTESTS += unittest
231 unittest_alloc_SOURCES = $(unittest_SOURCES)
232 unittest_alloc_CFLAGS = $(libbacktrace_TEST_CFLAGS)
233 unittest_alloc_LDFLAGS = $(libbacktrace_testing_ldflags)
234 unittest_alloc_LDADD = libbacktrace_alloc.la
236 BUILDTESTS += unittest_alloc
238 check_LTLIBRARIES += libbacktrace_instrumented_alloc.la
240 libbacktrace_instrumented_alloc_la_SOURCES = $(libbacktrace_la_SOURCES)
241 libbacktrace_instrumented_alloc_la_LIBADD = $(BACKTRACE_FILE) $(FORMAT_FILE) \
242 read.lo instrumented_alloc.lo
244 libbacktrace_instrumented_alloc_la_DEPENDENCIES = \
245 $(libbacktrace_instrumented_alloc_la_LIBADD)
247 instrumented_alloc.lo: alloc.c
249 allocfail_SOURCES = allocfail.c testlib.c
250 allocfail_CFLAGS = $(libbacktrace_TEST_CFLAGS)
251 allocfail_LDADD = libbacktrace_instrumented_alloc.la
253 check_PROGRAMS += allocfail
255 allocfail.sh: allocfail
257 TESTS += allocfail.sh
260 check_DATA += allocfail.dSYM
265 if HAVE_OBJCOPY_DEBUGLINK
267 b2test_SOURCES = $(btest_SOURCES)
268 b2test_CFLAGS = $(libbacktrace_TEST_CFLAGS)
269 b2test_LDFLAGS = -Wl,--build-id $(libbacktrace_testing_ldflags)
270 b2test_LDADD = libbacktrace_elf_for_test.la
272 check_PROGRAMS += b2test
273 MAKETESTS += b2test_buildid b2test_buildidfull
277 b3test_SOURCES = $(btest_SOURCES)
278 b3test_CFLAGS = $(libbacktrace_TEST_CFLAGS)
279 b3test_LDFLAGS = -Wl,--build-id $(libbacktrace_testing_ldflags)
280 b3test_LDADD = libbacktrace_elf_for_test.la
282 check_PROGRAMS += b3test
283 MAKETESTS += b3test_dwz_buildid b3test_dwz_buildidfull
287 endif HAVE_OBJCOPY_DEBUGLINK
291 btest_SOURCES = btest.c testlib.c
292 btest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -O
293 btest_LDFLAGS = $(libbacktrace_testing_ldflags)
294 btest_LDADD = libbacktrace.la
299 check_DATA += btest.dSYM
304 btest_lto_SOURCES = btest.c testlib.c
305 btest_lto_CFLAGS = $(libbacktrace_TEST_CFLAGS) -O -flto
306 btest_lto_LDFLAGS = $(libbacktrace_testing_ldflags)
307 btest_lto_LDADD = libbacktrace.la
309 BUILDTESTS += btest_lto
313 btest_alloc_SOURCES = $(btest_SOURCES)
314 btest_alloc_CFLAGS = $(libbacktrace_TEST_CFLAGS)
315 btest_alloc_LDFLAGS = $(libbacktrace_testing_ldflags)
316 btest_alloc_LDADD = libbacktrace_alloc.la
318 BUILDTESTS += btest_alloc
321 check_DATA += btest_alloc.dSYM
327 rm -f $@ $@_common.debug
330 if $(DWZ) -m $@_common.debug $@_1 $@_2; then \
334 echo "Ignoring dwz errors, assuming that test passes"; \
338 MAKETESTS += btest_dwz
340 if HAVE_OBJCOPY_DEBUGLINK
342 MAKETESTS += btest_dwz_gnudebuglink
344 endif HAVE_OBJCOPY_DEBUGLINK
348 stest_SOURCES = stest.c
349 stest_CFLAGS = $(libbacktrace_TEST_CFLAGS)
350 stest_LDFLAGS = $(libbacktrace_testing_ldflags)
351 stest_LDADD = libbacktrace.la
356 check_DATA += stest.dSYM
359 stest_alloc_SOURCES = $(stest_SOURCES)
360 stest_alloc_CFLAGS = $(libbacktrace_TEST_CFLAGS)
361 stest_alloc_LDFLAGS = $(libbacktrace_testing_ldflags)
362 stest_alloc_LDADD = libbacktrace_alloc.la
364 BUILDTESTS += stest_alloc
367 check_DATA += stest_alloc.dSYM
372 ztest_SOURCES = ztest.c testlib.c
373 ztest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -DSRCDIR=\"$(srcdir)\"
374 ztest_LDFLAGS = $(libbacktrace_testing_ldflags)
375 ztest_LDADD = libbacktrace.la
376 ztest_alloc_LDADD = libbacktrace_alloc.la
380 ztest_alloc_LDADD += -lz
382 ztest_LDADD += $(CLOCK_GETTIME_LINK)
383 ztest_alloc_LDADD += $(CLOCK_GETTIME_LINK)
387 ztest_alloc_SOURCES = $(ztest_SOURCES)
388 ztest_alloc_CFLAGS = $(ztest_CFLAGS)
389 ztest_alloc_LDFLAGS = $(libbacktrace_testing_ldflags)
391 BUILDTESTS += ztest_alloc
393 zstdtest_SOURCES = zstdtest.c testlib.c
394 zstdtest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -DSRCDIR=\"$(srcdir)\"
395 zstdtest_LDFLAGS = $(libbacktrace_testing_ldflags)
396 zstdtest_LDADD = libbacktrace.la
397 zstdtest_alloc_LDADD = libbacktrace_alloc.la
400 zstdtest_LDADD += -lzstd
401 zstdtest_alloc_LDADD += -lzstd
403 zstdtest_LDADD += $(CLOCK_GETTIME_LINK)
404 zstdtest_alloc_LDADD += $(CLOCK_GETTIME_LINK)
406 BUILDTESTS += zstdtest
408 zstdtest_alloc_SOURCES = $(zstdtest_SOURCES)
409 zstdtest_alloc_CFLAGS = $(zstdtest_CFLAGS)
410 zstdtest_alloc_LDFLAGS = $(libbacktrace_testing_ldflags)
412 BUILDTESTS += zstdtest_alloc
416 edtest_SOURCES = edtest.c edtest2_build.c testlib.c
417 edtest_CFLAGS = $(libbacktrace_TEST_CFLAGS)
418 edtest_LDFLAGS = $(libbacktrace_testing_ldflags)
419 edtest_LDADD = libbacktrace.la
424 check_DATA += edtest.dSYM
427 edtest_alloc_SOURCES = $(edtest_SOURCES)
428 edtest_alloc_CFLAGS = $(libbacktrace_TEST_CFLAGS)
429 edtest_alloc_LDFLAGS = $(libbacktrace_testing_ldflags)
430 edtest_alloc_LDADD = libbacktrace_alloc.la
433 check_DATA += edtest_alloc.dSYM
436 BUILDTESTS += edtest_alloc
438 edtest2_build.c: gen_edtest2_build; @true
439 gen_edtest2_build: $(srcdir)/edtest2.c
440 cat $(srcdir)/edtest2.c > tmp-edtest2_build.c
441 $(SHELL) $(srcdir)/../move-if-change tmp-edtest2_build.c edtest2_build.c
448 ttest_SOURCES = ttest.c testlib.c
449 ttest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -pthread
450 ttest_LDFLAGS = $(libbacktrace_testing_ldflags)
451 ttest_LDADD = libbacktrace.la
454 check_DATA += ttest.dSYM
457 BUILDTESTS += ttest_alloc
459 ttest_alloc_SOURCES = $(ttest_SOURCES)
460 ttest_alloc_CFLAGS = $(ttest_CFLAGS)
461 ttest_alloc_LDFLAGS = $(libbacktrace_testing_ldflags)
462 ttest_alloc_LDADD = libbacktrace_alloc.la
465 check_DATA += ttest_alloc.dSYM
470 if HAVE_OBJCOPY_DEBUGLINK
472 MAKETESTS += btest_gnudebuglink btest_gnudebuglinkfull
475 $(OBJCOPY) --only-keep-debug $< $@.debug
476 $(OBJCOPY) --strip-debug --add-gnu-debuglink=$@.debug $< $@
478 %_gnudebuglinkfull: %
479 $(OBJCOPY) --only-keep-debug $< $@.debug
480 $(OBJCOPY) --strip-all --add-gnu-debuglink=$@.debug $< $@
482 endif HAVE_OBJCOPY_DEBUGLINK
485 ./install-debuginfo-for-buildid.sh \
486 "$(TEST_BUILD_ID_DIR)" \
488 $(OBJCOPY) --strip-debug $< $@
491 ./install-debuginfo-for-buildid.sh \
492 "$(TEST_BUILD_ID_DIR)" \
494 $(OBJCOPY) --strip-all $< $@
496 if HAVE_COMPRESSED_DEBUG_ZLIB_GNU
498 ctestg_SOURCES = btest.c testlib.c
499 ctestg_CFLAGS = $(libbacktrace_TEST_CFLAGS)
500 ctestg_LDFLAGS = -Wl,--compress-debug-sections=zlib-gnu $(libbacktrace_testing_ldflags)
501 ctestg_LDADD = libbacktrace.la
503 ctestg_alloc_SOURCES = $(ctestg_SOURCES)
504 ctestg_alloc_CFLAGS = $(ctestg_CFLAGS)
505 ctestg_alloc_LDFLAGS = $(ctestg_LDFLAGS) $(libbacktrace_testing_ldflags)
506 ctestg_alloc_LDADD = libbacktrace_alloc.la
508 BUILDTESTS += ctestg ctestg_alloc
512 if HAVE_COMPRESSED_DEBUG_ZLIB_GABI
514 ctesta_SOURCES = btest.c testlib.c
515 ctesta_CFLAGS = $(libbacktrace_TEST_CFLAGS)
516 ctesta_LDFLAGS = -Wl,--compress-debug-sections=zlib-gabi $(libbacktrace_testing_ldflags)
517 ctesta_LDADD = libbacktrace.la
519 ctesta_alloc_SOURCES = $(ctesta_SOURCES)
520 ctesta_alloc_CFLAGS = $(ctesta_CFLAGS)
521 ctesta_alloc_LDFLAGS = $(ctesta_LDFLAGS) $(libbacktrace_testing_ldflags)
522 ctesta_alloc_LDADD = libbacktrace_alloc.la
524 BUILDTESTS += ctesta ctesta_alloc
528 if HAVE_COMPRESSED_DEBUG_ZSTD
530 ctestzstd_SOURCES = btest.c testlib.c
531 ctestzstd_CFLAGS = $(libbacktrace_TEST_CFLAGS)
532 ctestzstd_LDFLAGS = -Wl,--compress-debug-sections=zstd $(libbacktrace_testing_ldflags)
533 ctestzstd_LDADD = libbacktrace.la
535 ctestzstd_alloc_SOURCES = $(ctestzstd_SOURCES)
536 ctestzstd_alloc_CFLAGS = $(ctestzstd_CFLAGS)
537 ctestzstd_alloc_LDFLAGS = $(ctestzstd_LDFLAGS) $(libbacktrace_testing_ldflags)
538 ctestzstd_alloc_LDADD = libbacktrace_alloc.la
540 BUILDTESTS += ctestzstd ctestzstd_alloc
546 dwarf5_SOURCES = btest.c testlib.c
547 dwarf5_CFLAGS = $(libbacktrace_TEST_CFLAGS) -gdwarf-5
548 dwarf5_LDFLAGS = $(libbacktrace_testing_ldflags)
549 dwarf5_LDADD = libbacktrace.la
554 check_DATA += dwarf5.dSYM
557 dwarf5_alloc_SOURCES = $(dwarf5_SOURCES)
558 dwarf5_alloc_CFLAGS = $(dwarf5_CFLAGS)
559 dwarf5_alloc_LDFLAGS = $(libbacktrace_testing_ldflags)
560 dwarf5_alloc_LDADD = libbacktrace_alloc.la
562 BUILDTESTS += dwarf5_alloc
565 check_DATA += dwarf5_alloc.dSYM
570 mtest_SOURCES = mtest.c testlib.c
571 mtest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -O
572 mtest_LDFLAGS = $(libbacktrace_testing_ldflags)
573 mtest_LDADD = libbacktrace.la
578 check_DATA += mtest.dSYM
583 MAKETESTS += mtest_minidebug
586 $(NM) -D $< -P --defined-only | $(AWK) '{ print $$1 }' | sort > $<.dsyms
587 $(NM) $< -P --defined-only | $(AWK) '{ if ($$2 == "T" || $$2 == "t" || $$2 == "D") print $$1 }' | sort > $<.fsyms
588 $(COMM) -13 $<.dsyms $<.fsyms > $<.keepsyms
589 $(OBJCOPY) --only-keep-debug $< $<.dbg
590 $(OBJCOPY) -S --remove-section .gdb_index --remove-section .comment --keep-symbols=$<.keepsyms $<.dbg $<.mdbg
591 $(OBJCOPY) --strip-all --remove-section ..comment $< $<.strip
594 $(OBJCOPY) --add-section .gnu_debugdata=$<.mdbg.xz $<.strip
599 if HAVE_OBJCOPY_DEBUGLINK
601 m2test_SOURCES = $(mtest_SOURCES)
602 m2test_CFLAGS = $(libbacktrace_TEST_CFLAGS) -O
603 m2test_LDFLAGS = -Wl,--build-id $(libbacktrace_testing_ldflags)
604 m2test_LDADD = libbacktrace_elf_for_test.la
606 check_PROGRAMS += m2test
607 MAKETESTS += m2test_minidebug2
609 # minidebug2 is like minidebug but also adds the gnu_debugdata section
610 # to the debug file, and uses a build ID file. There is no reason to do
611 # this but it was causing an infinite recursion.
613 $(NM) -D $< -P --defined-only | $(AWK) '{ print $$1 }' | sort > $<.dsyms2
614 $(NM) $< -P --defined-only | $(AWK) '{ if ($$2 == "T" || $$2 == "t" || $$2 == "D") print $$1 }' | sort > $<.fsyms2
615 $(COMM) -13 $<.dsyms2 $<.fsyms2 > $<.keepsyms2
616 $(OBJCOPY) --only-keep-debug $< $<.dbg2
617 $(OBJCOPY) -S --remove-section .gdb_index --remove-section .comment --keep-symbols=$<.keepsyms2 $<.dbg2 $<.mdbg2
618 $(OBJCOPY) --strip-all --remove-section ..comment $< $<.strip2
621 $(OBJCOPY) --add-section .gnu_debugdata=$<.mdbg2.xz $<.dbg2
622 $(OBJCOPY) --add-section .gnu_debugdata=$<.mdbg2.xz $<.strip2
623 $(SHELL) ./install-debuginfo-for-buildid.sh $(TEST_BUILD_ID_DIR) $<.dbg2
626 endif HAVE_OBJCOPY_DEBUGLINK
636 xztest_SOURCES = xztest.c testlib.c
637 xztest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -DSRCDIR=\"$(srcdir)\"
638 xztest_LDFLAGS = $(libbacktrace_testing_ldflags)
639 xztest_LDADD = libbacktrace.la
641 xztest_alloc_SOURCES = $(xztest_SOURCES)
642 xztest_alloc_CFLAGS = $(xztest_CFLAGS)
643 xztest_alloc_LDFLAGS = $(libbacktrace_testing_ldflags)
644 xztest_alloc_LDADD = libbacktrace_alloc.la
647 xztest_LDADD += -llzma
648 xztest_alloc_LDADD += -llzma
651 xztest_LDADD += $(CLOCK_GETTIME_LINK)
652 xztest_alloc_LDADD += $(CLOCK_GETTIME_LINK)
654 BUILDTESTS += xztest xztest_alloc
658 check_PROGRAMS += $(BUILDTESTS)
660 TESTS += $(MAKETESTS) $(BUILDTESTS)
663 $(MAKETESTS) $(BUILDTESTS) *.debug elf_for_test.c edtest2_build.c \
665 *.dsyms *.fsyms *.keepsyms *.dbg *.mdbg *.mdbg.xz *.strip \
666 *.dsyms2 *.fsyms2 *.keepsyms2 *.dbg2 *.mdbg2 *.mdbg2.xz *.strip2
671 # We can't use automake's automatic dependency tracking, because it
672 # breaks when using bootstrap-lean. Automatic dependency tracking
673 # with GCC bootstrap will cause some of the objects to depend on
674 # header files in prev-gcc/include, e.g., stddef.h and stdarg.h. When
675 # using bootstrap-lean, prev-gcc is removed after each stage. When
676 # running "make install", those header files will be gone, causing the
677 # library to be rebuilt at install time. That may not succeed.
679 # These manual dependencies do not include dependencies on unwind.h,
680 # even though that is part of GCC, because where to find it depends on
681 # whether we are being built as a host library or a target library.
683 INCDIR = $(top_srcdir)/../include
684 alloc.lo: config.h backtrace.h internal.h
685 backtrace.lo: config.h backtrace.h internal.h
686 btest.lo: $(INCDIR)/filenames.h backtrace.h backtrace-supported.h
687 dwarf.lo: config.h $(INCDIR)/dwarf2.h $(INCDIR)/dwarf2.def \
688 $(INCDIR)/filenames.h backtrace.h internal.h
689 elf.lo: config.h backtrace.h internal.h
690 fileline.lo: config.h backtrace.h internal.h
691 macho.lo: config.h backtrace.h internal.h
692 mmap.lo: config.h backtrace.h internal.h
693 mmapio.lo: config.h backtrace.h internal.h
694 mtest.lo: backtrace.h backtrace-supported.h
695 nounwind.lo: config.h internal.h
696 pecoff.lo: config.h backtrace.h internal.h
697 posix.lo: config.h backtrace.h internal.h
698 print.lo: config.h backtrace.h internal.h
699 read.lo: config.h backtrace.h internal.h
700 simple.lo: config.h backtrace.h internal.h
701 sort.lo: config.h backtrace.h internal.h
702 stest.lo: config.h backtrace.h internal.h
703 state.lo: config.h backtrace.h backtrace-supported.h internal.h
704 unknown.lo: config.h backtrace.h internal.h
705 xcoff_32.lo: config.h backtrace.h internal.h
706 xcoff_64.lo: config.h backtrace.h internal.h
707 xztest.lo: config.h backtrace.h backtrace-supported.h internal.h testlib.h
708 ztest.lo: config.h backtrace.h backtrace-supported.h internal.h testlib.h
710 include $(top_srcdir)/../multilib.am