blob: b27724fbb3c0bd742396de66480b38d292c860c5 [file] [log] [blame]
njn83b62cb2009-04-15 03:12:43 +00001# This file is used for tool tests, and also in perf/Makefile.am.
2
njn8b68b642009-06-24 00:37:09 +00003include $(top_srcdir)/Makefile.all.am
njn53044572009-02-19 09:52:05 +00004
5AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \
6 -I$(top_srcdir)/coregrind -I$(top_builddir)/include \
njn8b68b642009-06-24 00:37:09 +00007 -I$(top_srcdir)/VEX/pub \
mjwe2990202014-05-09 13:34:13 +00008 -I$(top_builddir)/VEX/pub \
sewardjc6444592011-07-11 22:10:14 +00009 -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
florian5bdb9ec2012-05-06 03:51:00 +000013
14if VGCONF_HAVE_PLATFORM_SEC
15AM_CPPFLAGS += -DVGA_SEC_@VGCONF_ARCH_SEC@=1 \
16 -DVGP_SEC_@VGCONF_ARCH_PRI@_@VGCONF_OS@=1
17endif
18
njn07891f92009-02-22 23:38:10 +000019# Nb: Tools need to augment these flags with an arch-selection option, such
20# as $(AM_FLAG_M3264_PRI).
florian26a790a2014-12-03 22:53:00 +000021AM_CFLAGS = -Winline -Wall -Wshadow -Wno-long-long -g \
22 @FLAG_FNO_STACK_PROTECTOR@
23AM_CXXFLAGS = -Winline -Wall -Wshadow -Wno-long-long -g \
24 @FLAG_FNO_STACK_PROTECTOR@
njnc9a6f4b2009-04-24 20:17:07 +000025# Include AM_CPPFLAGS in AM_CCASFLAGS to allow for older versions of
njn8b68b642009-06-24 00:37:09 +000026# automake; see comments in Makefile.all.am for more detail.
njnc9a6f4b2009-04-24 20:17:07 +000027AM_CCASFLAGS = $(AM_CPPFLAGS)
njn53044572009-02-19 09:52:05 +000028
sewardj8eb8bab2015-07-21 14:44:28 +000029if VGCONF_OS_IS_SOLARIS
30# Make sure that all test programs have threaded errno.
Elliott Hughesed398002017-06-21 14:41:24 -070031# Disable largefile support as there are test cases explicitly enabling it.
Elliott Hughesa0664b92017-04-18 17:46:52 -070032AM_CFLAGS += -D_REENTRANT @SOLARIS_UNDEF_LARGESOURCE@
sewardj8eb8bab2015-07-21 14:44:28 +000033endif
34
njnf76d27a2009-05-28 01:53:07 +000035if VGCONF_OS_IS_DARWIN
njn8b68b642009-06-24 00:37:09 +000036noinst_DSYMS = $(check_PROGRAMS)
37endif
njnf76d27a2009-05-28 01:53:07 +000038
florian3d9368e2013-10-04 21:12:17 +000039if COMPILER_IS_CLANG
florian26a790a2014-12-03 22:53:00 +000040AM_CFLAGS += -Wno-format-extra-args # perf/tinycc.c
41AM_CFLAGS += -Wno-literal-range # none/tests/amd64/fxtract.c
42AM_CFLAGS += -Wno-tautological-constant-out-of-range-compare # ...../aes.c
43AM_CFLAGS += -Wno-self-assign # memcheck/tests/unit_libcbase.c
44AM_CFLAGS += -Wno-string-plus-int # drd/tests/annotate_ignore_rw.c
45AM_CFLAGS += -Wno-uninitialized # clang 3.4.2 and earlier
46AM_CFLAGS += -Wno-unused-value # clang 3.0.0
47AM_CXXFLAGS += -Wno-unused-private-field # drd/tests/tsan_unittest.cpp
florian3d9368e2013-10-04 21:12:17 +000048endif
49
njn8b68b642009-06-24 00:37:09 +000050check-local: build-noinst_DSYMS
51
52clean-local: clean-noinst_DSYMS