Makefile.am 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. # Makefile.am -- Backtrace Makefile.
  2. # Copyright (C) 2012-2015 Free Software Foundation, Inc.
  3. # Redistribution and use in source and binary forms, with or without
  4. # modification, are permitted provided that the following conditions are
  5. # met:
  6. # (1) Redistributions of source code must retain the above copyright
  7. # notice, this list of conditions and the following disclaimer.
  8. # (2) Redistributions in binary form must reproduce the above copyright
  9. # notice, this list of conditions and the following disclaimer in
  10. # the documentation and/or other materials provided with the
  11. # distribution.
  12. # (3) The name of the author may not be used to
  13. # endorse or promote products derived from this software without
  14. # specific prior written permission.
  15. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  16. # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  17. # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  18. # DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
  19. # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  20. # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  21. # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  22. # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  23. # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  24. # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  25. # POSSIBILITY OF SUCH DAMAGE.
  26. ACLOCAL_AMFLAGS = -I .. -I ../config
  27. AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \
  28. -I ../libgcc
  29. AM_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) $(PIC_FLAG)
  30. noinst_LTLIBRARIES = libbacktrace.la
  31. libbacktrace_la_SOURCES = \
  32. backtrace.h \
  33. atomic.c \
  34. dwarf.c \
  35. fileline.c \
  36. internal.h \
  37. posix.c \
  38. print.c \
  39. sort.c \
  40. state.c
  41. BACKTRACE_FILES = \
  42. backtrace.c \
  43. simple.c \
  44. nounwind.c
  45. FORMAT_FILES = \
  46. elf.c \
  47. unknown.c
  48. VIEW_FILES = \
  49. read.c \
  50. mmapio.c
  51. ALLOC_FILES = \
  52. alloc.c \
  53. mmap.c
  54. EXTRA_libbacktrace_la_SOURCES = \
  55. $(BACKTRACE_FILES) \
  56. $(FORMAT_FILES) \
  57. $(VIEW_FILES) \
  58. $(ALLOC_FILES)
  59. libbacktrace_la_LIBADD = \
  60. $(BACKTRACE_FILE) \
  61. $(FORMAT_FILE) \
  62. $(VIEW_FILE) \
  63. $(ALLOC_FILE)
  64. libbacktrace_la_DEPENDENCIES = $(libbacktrace_la_LIBADD)
  65. # Testsuite.
  66. check_PROGRAMS =
  67. TESTS = $(check_PROGRAMS)
  68. if NATIVE
  69. btest_SOURCES = btest.c
  70. btest_CFLAGS = $(AM_CFLAGS) -g -O
  71. btest_LDADD = libbacktrace.la
  72. check_PROGRAMS += btest
  73. stest_SOURCES = stest.c
  74. stest_LDADD = libbacktrace.la
  75. check_PROGRAMS += stest
  76. endif NATIVE
  77. # We can't use automake's automatic dependency tracking, because it
  78. # breaks when using bootstrap-lean. Automatic dependency tracking
  79. # with GCC bootstrap will cause some of the objects to depend on
  80. # header files in prev-gcc/include, e.g., stddef.h and stdarg.h. When
  81. # using bootstrap-lean, prev-gcc is removed after each stage. When
  82. # running "make install", those header files will be gone, causing the
  83. # library to be rebuilt at install time. That may not succeed.
  84. # These manual dependencies do not include dependencies on unwind.h,
  85. # even though that is part of GCC, because where to find it depends on
  86. # whether we are being built as a host library or a target library.
  87. INCDIR = $(top_srcdir)/../include
  88. alloc.lo: config.h backtrace.h internal.h
  89. backtrace.lo: config.h backtrace.h
  90. btest.lo: (INCDIR)/filenames.h backtrace.h backtrace-supported.h
  91. dwarf.lo: config.h $(INCDIR)/dwarf2.h $(INCDIR)/dwarf2.def \
  92. $(INCDIR)/filenames.h backtrace.h internal.h
  93. elf.lo: config.h backtrace.h internal.h
  94. fileline.lo: config.h backtrace.h internal.h
  95. mmap.lo: config.h backtrace.h internal.h
  96. mmapio.lo: config.h backtrace.h internal.h
  97. nounwind.lo: config.h internal.h
  98. posix.lo: config.h backtrace.h internal.h
  99. print.lo: config.h backtrace.h internal.h
  100. read.lo: config.h backtrace.h internal.h
  101. simple.lo: config.h backtrace.h internal.h
  102. state.lo: config.h backtrace.h backtrace-supported.h internal.h
  103. unknown.lo: config.h backtrace.h internal.h