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