njn | 83b62cb | 2009-04-15 03:12:43 +0000 | [diff] [blame] | 1 | # This file is used for tool tests, and also in perf/Makefile.am. |
| 2 | |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 3 | include $(top_srcdir)/Makefile.all.am |
njn | 5304457 | 2009-02-19 09:52:05 +0000 | [diff] [blame] | 4 | |
| 5 | AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \ |
| 6 | -I$(top_srcdir)/coregrind -I$(top_builddir)/include \ |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 7 | -I$(top_srcdir)/VEX/pub \ |
mjw | e299020 | 2014-05-09 13:34:13 +0000 | [diff] [blame] | 8 | -I$(top_builddir)/VEX/pub \ |
sewardj | c644459 | 2011-07-11 22:10:14 +0000 | [diff] [blame] | 9 | -DVGA_@VGCONF_ARCH_PRI@=1 \ |
| 10 | -DVGO_@VGCONF_OS@=1 \ |
| 11 | -DVGP_@VGCONF_ARCH_PRI@_@VGCONF_OS@=1 \ |
| 12 | -DVGPV_@VGCONF_ARCH_PRI@_@VGCONF_OS@_@VGCONF_PLATVARIANT@=1 |
florian | 5bdb9ec | 2012-05-06 03:51:00 +0000 | [diff] [blame] | 13 | |
| 14 | if VGCONF_HAVE_PLATFORM_SEC |
| 15 | AM_CPPFLAGS += -DVGA_SEC_@VGCONF_ARCH_SEC@=1 \ |
| 16 | -DVGP_SEC_@VGCONF_ARCH_PRI@_@VGCONF_OS@=1 |
| 17 | endif |
| 18 | |
njn | 07891f9 | 2009-02-22 23:38:10 +0000 | [diff] [blame] | 19 | # Nb: Tools need to augment these flags with an arch-selection option, such |
| 20 | # as $(AM_FLAG_M3264_PRI). |
florian | 26a790a | 2014-12-03 22:53:00 +0000 | [diff] [blame] | 21 | AM_CFLAGS = -Winline -Wall -Wshadow -Wno-long-long -g \ |
| 22 | @FLAG_FNO_STACK_PROTECTOR@ |
| 23 | AM_CXXFLAGS = -Winline -Wall -Wshadow -Wno-long-long -g \ |
| 24 | @FLAG_FNO_STACK_PROTECTOR@ |
njn | c9a6f4b | 2009-04-24 20:17:07 +0000 | [diff] [blame] | 25 | # Include AM_CPPFLAGS in AM_CCASFLAGS to allow for older versions of |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 26 | # automake; see comments in Makefile.all.am for more detail. |
njn | c9a6f4b | 2009-04-24 20:17:07 +0000 | [diff] [blame] | 27 | AM_CCASFLAGS = $(AM_CPPFLAGS) |
njn | 5304457 | 2009-02-19 09:52:05 +0000 | [diff] [blame] | 28 | |
sewardj | 8eb8bab | 2015-07-21 14:44:28 +0000 | [diff] [blame] | 29 | if VGCONF_OS_IS_SOLARIS |
| 30 | # Make sure that all test programs have threaded errno. |
| 31 | AM_CFLAGS += -D_REENTRANT |
| 32 | endif |
| 33 | |
njn | f76d27a | 2009-05-28 01:53:07 +0000 | [diff] [blame] | 34 | if VGCONF_OS_IS_DARWIN |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 35 | noinst_DSYMS = $(check_PROGRAMS) |
| 36 | endif |
njn | f76d27a | 2009-05-28 01:53:07 +0000 | [diff] [blame] | 37 | |
florian | 3d9368e | 2013-10-04 21:12:17 +0000 | [diff] [blame] | 38 | if COMPILER_IS_CLANG |
florian | 26a790a | 2014-12-03 22:53:00 +0000 | [diff] [blame] | 39 | AM_CFLAGS += -Wno-format-extra-args # perf/tinycc.c |
| 40 | AM_CFLAGS += -Wno-literal-range # none/tests/amd64/fxtract.c |
| 41 | AM_CFLAGS += -Wno-tautological-constant-out-of-range-compare # ...../aes.c |
| 42 | AM_CFLAGS += -Wno-self-assign # memcheck/tests/unit_libcbase.c |
| 43 | AM_CFLAGS += -Wno-string-plus-int # drd/tests/annotate_ignore_rw.c |
| 44 | AM_CFLAGS += -Wno-uninitialized # clang 3.4.2 and earlier |
| 45 | AM_CFLAGS += -Wno-unused-value # clang 3.0.0 |
| 46 | AM_CXXFLAGS += -Wno-unused-private-field # drd/tests/tsan_unittest.cpp |
florian | 3d9368e | 2013-10-04 21:12:17 +0000 | [diff] [blame] | 47 | endif |
| 48 | |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 49 | check-local: build-noinst_DSYMS |
| 50 | |
| 51 | clean-local: clean-noinst_DSYMS |