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