2015-11-15 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / libsanitizer / asan / Makefile.am
blob4500e2130da7685aa62b606211ded946fa252e54
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)
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 @OBSTACK_DEFS@
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
15 toolexeclib_LTLIBRARIES = libasan.la
16 nodist_toolexeclib_HEADERS = libasan_preinit.o
18 asan_files = \
19         asan_activation.cc \
20         asan_allocator.cc \
21         asan_debugging.cc \
22         asan_fake_stack.cc \
23         asan_flags.cc \
24         asan_globals.cc \
25         asan_interceptors.cc \
26         asan_linux.cc \
27         asan_mac.cc \
28         asan_malloc_linux.cc \
29         asan_malloc_mac.cc \
30         asan_malloc_win.cc \
31         asan_new_delete.cc \
32         asan_poisoning.cc \
33         asan_posix.cc \
34         asan_report.cc \
35         asan_rtl.cc \
36         asan_stack.cc \
37         asan_stats.cc \
38         asan_suppressions.cc \
39         asan_thread.cc \
40         asan_win.cc \
41         asan_win_dll_thunk.cc \
42         asan_win_dynamic_runtime_thunk.cc
44 libasan_la_SOURCES = $(asan_files)
45 libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/lsan/libsanitizer_lsan.la
46 if !USING_MAC_INTERPOSE
47 libasan_la_LIBADD += $(top_builddir)/interception/libinterception.la
48 endif
49 if LIBBACKTRACE_SUPPORTED
50 libasan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la
51 endif
52 libasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS)
54 libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libasan)
56 libasan_preinit.o: asan_preinit.o
57         cp $< $@
59 # Work around what appears to be a GNU make bug handling MAKEFLAGS
60 # values defined in terms of make variables, as is the case for CC and
61 # friends when we are called from the top level Makefile.
62 AM_MAKEFLAGS = \
63         "AR_FLAGS=$(AR_FLAGS)" \
64         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
65         "CFLAGS=$(CFLAGS)" \
66         "CXXFLAGS=$(CXXFLAGS)" \
67         "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
68         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
69         "INSTALL=$(INSTALL)" \
70         "INSTALL_DATA=$(INSTALL_DATA)" \
71         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
72         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
73         "JC1FLAGS=$(JC1FLAGS)" \
74         "LDFLAGS=$(LDFLAGS)" \
75         "LIBCFLAGS=$(LIBCFLAGS)" \
76         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
77         "MAKE=$(MAKE)" \
78         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
79         "PICFLAG=$(PICFLAG)" \
80         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
81         "SHELL=$(SHELL)" \
82         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
83         "exec_prefix=$(exec_prefix)" \
84         "infodir=$(infodir)" \
85         "libdir=$(libdir)" \
86         "prefix=$(prefix)" \
87         "includedir=$(includedir)" \
88         "AR=$(AR)" \
89         "AS=$(AS)" \
90         "LD=$(LD)" \
91         "LIBCFLAGS=$(LIBCFLAGS)" \
92         "NM=$(NM)" \
93         "PICFLAG=$(PICFLAG)" \
94         "RANLIB=$(RANLIB)" \
95         "DESTDIR=$(DESTDIR)"
97 MAKEOVERRIDES=
99 ## ################################################################