Makefile.am 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir)
  2. # May be used by toolexeclibdir.
  3. gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
  4. DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DASAN_HAS_EXCEPTIONS=1 -DASAN_FLEXIBLE_MAPPING_AND_OFFSET=0 -DASAN_NEEDS_SEGV=1
  5. if USING_MAC_INTERPOSE
  6. DEFS += -DMAC_INTERPOSE_FUNCTIONS -DMISSING_BLOCKS_SUPPORT
  7. endif
  8. AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros -fno-ipa-icf
  9. AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
  10. AM_CXXFLAGS += -std=gnu++11
  11. ACLOCAL_AMFLAGS = -I $(top_srcdir) -I $(top_srcdir)/config
  12. toolexeclib_LTLIBRARIES = libasan.la
  13. nodist_toolexeclib_HEADERS = libasan_preinit.o
  14. asan_files = \
  15. asan_activation.cc \
  16. asan_allocator2.cc \
  17. asan_debugging.cc \
  18. asan_fake_stack.cc \
  19. asan_globals.cc \
  20. asan_interceptors.cc \
  21. asan_linux.cc \
  22. asan_mac.cc \
  23. asan_malloc_linux.cc \
  24. asan_malloc_mac.cc \
  25. asan_malloc_win.cc \
  26. asan_new_delete.cc \
  27. asan_poisoning.cc \
  28. asan_posix.cc \
  29. asan_report.cc \
  30. asan_rtl.cc \
  31. asan_stack.cc \
  32. asan_stats.cc \
  33. asan_thread.cc \
  34. asan_win.cc \
  35. asan_win_dll_thunk.cc \
  36. asan_win_dynamic_runtime_thunk.cc
  37. libasan_la_SOURCES = $(asan_files)
  38. libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/lsan/libsanitizer_lsan.la
  39. if !USING_MAC_INTERPOSE
  40. libasan_la_LIBADD += $(top_builddir)/interception/libinterception.la
  41. endif
  42. if LIBBACKTRACE_SUPPORTED
  43. libasan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la
  44. endif
  45. libasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS)
  46. libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libasan)
  47. libasan_preinit.o: asan_preinit.o
  48. cp $< $@
  49. # Work around what appears to be a GNU make bug handling MAKEFLAGS
  50. # values defined in terms of make variables, as is the case for CC and
  51. # friends when we are called from the top level Makefile.
  52. AM_MAKEFLAGS = \
  53. "AR_FLAGS=$(AR_FLAGS)" \
  54. "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
  55. "CFLAGS=$(CFLAGS)" \
  56. "CXXFLAGS=$(CXXFLAGS)" \
  57. "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
  58. "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
  59. "INSTALL=$(INSTALL)" \
  60. "INSTALL_DATA=$(INSTALL_DATA)" \
  61. "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
  62. "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
  63. "JC1FLAGS=$(JC1FLAGS)" \
  64. "LDFLAGS=$(LDFLAGS)" \
  65. "LIBCFLAGS=$(LIBCFLAGS)" \
  66. "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
  67. "MAKE=$(MAKE)" \
  68. "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
  69. "PICFLAG=$(PICFLAG)" \
  70. "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
  71. "SHELL=$(SHELL)" \
  72. "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
  73. "exec_prefix=$(exec_prefix)" \
  74. "infodir=$(infodir)" \
  75. "libdir=$(libdir)" \
  76. "prefix=$(prefix)" \
  77. "includedir=$(includedir)" \
  78. "AR=$(AR)" \
  79. "AS=$(AS)" \
  80. "LD=$(LD)" \
  81. "LIBCFLAGS=$(LIBCFLAGS)" \
  82. "NM=$(NM)" \
  83. "PICFLAG=$(PICFLAG)" \
  84. "RANLIB=$(RANLIB)" \
  85. "DESTDIR=$(DESTDIR)"
  86. MAKEOVERRIDES=
  87. ## ################################################################