2014-09-19 Michael Meissner <meissner@linux.vnet.ibm.com>
[official-gcc.git] / libsanitizer / ubsan / Makefile.am
blob80b79e1cb82c86ef472ab98b63432eb58f609973
1 AM_CPPFLAGS = -I $(top_srcdir) -I $(top_srcdir)/include
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 
7 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
8 AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
9 ACLOCAL_AMFLAGS = -I m4
11 toolexeclib_LTLIBRARIES = libubsan.la
13 ubsan_files = \
14         ubsan_diag.cc \
15         ubsan_handlers.cc \
16         ubsan_handlers_cxx.cc \
17         ubsan_type_hash.cc \
18         ubsan_value.cc
20 libubsan_la_SOURCES = $(ubsan_files) 
21 libubsan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la 
22 if !USING_MAC_INTERPOSE
23 libubsan_la_LIBADD += $(top_builddir)/interception/libinterception.la
24 endif
25 if LIBBACKTRACE_SUPPORTED
26 libubsan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la
27 endif
28 libubsan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS)
29 libubsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libubsan)
31 # Use special rules for files that require RTTI support.
32 ubsan_handlers_cxx.% ubsan_type_hash.% : AM_CXXFLAGS += -frtti
34 # Work around what appears to be a GNU make bug handling MAKEFLAGS
35 # values defined in terms of make variables, as is the case for CC and
36 # friends when we are called from the top level Makefile.
37 AM_MAKEFLAGS = \
38         "AR_FLAGS=$(AR_FLAGS)" \
39         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
40         "CFLAGS=$(CFLAGS)" \
41         "CXXFLAGS=$(CXXFLAGS)" \
42         "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
43         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
44         "INSTALL=$(INSTALL)" \
45         "INSTALL_DATA=$(INSTALL_DATA)" \
46         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
47         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
48         "JC1FLAGS=$(JC1FLAGS)" \
49         "LDFLAGS=$(LDFLAGS)" \
50         "LIBCFLAGS=$(LIBCFLAGS)" \
51         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
52         "MAKE=$(MAKE)" \
53         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
54         "PICFLAG=$(PICFLAG)" \
55         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
56         "SHELL=$(SHELL)" \
57         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
58         "exec_prefix=$(exec_prefix)" \
59         "infodir=$(infodir)" \
60         "libdir=$(libdir)" \
61         "prefix=$(prefix)" \
62         "includedir=$(includedir)" \
63         "AR=$(AR)" \
64         "AS=$(AS)" \
65         "LD=$(LD)" \
66         "LIBCFLAGS=$(LIBCFLAGS)" \
67         "NM=$(NM)" \
68         "PICFLAG=$(PICFLAG)" \
69         "RANLIB=$(RANLIB)" \
70         "DESTDIR=$(DESTDIR)"
72 MAKEOVERRIDES=
74 ## ################################################################