xref: /netbsd-src/external/gpl3/gcc.old/dist/libsanitizer/asan/Makefile.am (revision 212397c69a103ae7e5eafa8731ddfae671d2dee7)
1AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir)
2
3# May be used by toolexeclibdir.
4gcc_version := $(shell cat $(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_FLEXIBLE_MAPPING_AND_OFFSET=0 -DASAN_NEEDS_SEGV=1
7if USING_MAC_INTERPOSE
8DEFS += -DMAC_INTERPOSE_FUNCTIONS -DMISSING_BLOCKS_SUPPORT
9endif
10AM_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
11AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
12ACLOCAL_AMFLAGS = -I $(top_srcdir) -I $(top_srcdir)/config
13
14toolexeclib_LTLIBRARIES = libasan.la
15nodist_toolexeclib_HEADERS = libasan_preinit.o
16
17asan_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
39libasan_la_SOURCES = $(asan_files)
40if USING_MAC_INTERPOSE
41libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la
42else
43libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la
44endif
45libasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS)
46
47libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lpthread -ldl
48
49libasan_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.
55AM_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
90MAKEOVERRIDES=
91
92## ################################################################
93
94