1AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir) 2 3# May be used by toolexeclibdir. 4gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) 5 6DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DASAN_HAS_EXCEPTIONS=1 -DASAN_NEEDS_SEGV=1 -DCAN_SANITIZE_UB=0 7if USING_MAC_INTERPOSE 8DEFS += -DMAC_INTERPOSE_FUNCTIONS -DMISSING_BLOCKS_SUPPORT -DASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION=0 9endif 10AM_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 11AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS) 12AM_CXXFLAGS += -std=gnu++11 13AM_CXXFLAGS += $(EXTRA_CXXFLAGS) 14ACLOCAL_AMFLAGS = -I $(top_srcdir) -I $(top_srcdir)/config 15 16toolexeclib_LTLIBRARIES = libasan.la 17nodist_toolexeclib_HEADERS = libasan_preinit.o 18 19asan_files = \ 20 asan_activation.cc \ 21 asan_allocator.cc \ 22 asan_debugging.cc \ 23 asan_descriptions.cc \ 24 asan_errors.cc \ 25 asan_fake_stack.cc \ 26 asan_flags.cc \ 27 asan_globals.cc \ 28 asan_interceptors.cc \ 29 asan_interceptors_memintrinsics.cc \ 30 asan_linux.cc \ 31 asan_mac.cc \ 32 asan_malloc_linux.cc \ 33 asan_malloc_mac.cc \ 34 asan_malloc_win.cc \ 35 asan_memory_profile.cc \ 36 asan_new_delete.cc \ 37 asan_poisoning.cc \ 38 asan_posix.cc \ 39 asan_premap_shadow.cc \ 40 asan_report.cc \ 41 asan_rtems.cc \ 42 asan_rtl.cc \ 43 asan_shadow_setup.cc \ 44 asan_stack.cc \ 45 asan_stats.cc \ 46 asan_suppressions.cc \ 47 asan_thread.cc \ 48 asan_win.cc \ 49 asan_win_dll_thunk.cc \ 50 asan_win_dynamic_runtime_thunk.cc 51 52libasan_la_SOURCES = $(asan_files) 53libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/lsan/libsanitizer_lsan.la 54if !USING_MAC_INTERPOSE 55libasan_la_LIBADD += $(top_builddir)/interception/libinterception.la 56endif 57if LIBBACKTRACE_SUPPORTED 58libasan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la 59endif 60libasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) 61 62libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libasan) 63 64libasan_preinit.o: asan_preinit.o 65 cp $< $@ 66 67# Work around what appears to be a GNU make bug handling MAKEFLAGS 68# values defined in terms of make variables, as is the case for CC and 69# friends when we are called from the top level Makefile. 70AM_MAKEFLAGS = \ 71 "AR_FLAGS=$(AR_FLAGS)" \ 72 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ 73 "CFLAGS=$(CFLAGS)" \ 74 "CXXFLAGS=$(CXXFLAGS)" \ 75 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ 76 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ 77 "INSTALL=$(INSTALL)" \ 78 "INSTALL_DATA=$(INSTALL_DATA)" \ 79 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ 80 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ 81 "JC1FLAGS=$(JC1FLAGS)" \ 82 "LDFLAGS=$(LDFLAGS)" \ 83 "LIBCFLAGS=$(LIBCFLAGS)" \ 84 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ 85 "MAKE=$(MAKE)" \ 86 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ 87 "PICFLAG=$(PICFLAG)" \ 88 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ 89 "SHELL=$(SHELL)" \ 90 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ 91 "exec_prefix=$(exec_prefix)" \ 92 "infodir=$(infodir)" \ 93 "libdir=$(libdir)" \ 94 "prefix=$(prefix)" \ 95 "includedir=$(includedir)" \ 96 "AR=$(AR)" \ 97 "AS=$(AS)" \ 98 "LD=$(LD)" \ 99 "LIBCFLAGS=$(LIBCFLAGS)" \ 100 "NM=$(NM)" \ 101 "PICFLAG=$(PICFLAG)" \ 102 "RANLIB=$(RANLIB)" \ 103 "DESTDIR=$(DESTDIR)" 104 105MAKEOVERRIDES= 106 107## ################################################################ 108 109