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