blob: 9694f064a4c8666b688da5631c60806530cb850a [file] [log] [blame]
njn83b62cb2009-04-15 03:12:43 +00001# This file is used for tool tests, and also in perf/Makefile.am.
2
njn53044572009-02-19 09:52:05 +00003include $(top_srcdir)/Makefile.flags.am # For AM_FLAG_M3264_PRI
4
5AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \
6 -I$(top_srcdir)/coregrind -I$(top_builddir)/include \
7 -I@VEX_DIR@/pub \
8 -DVGA_$(VGCONF_ARCH_PRI)=1 \
9 -DVGO_$(VGCONF_OS)=1 \
10 -DVGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS)=1
njn07891f92009-02-22 23:38:10 +000011# Nb: Tools need to augment these flags with an arch-selection option, such
12# as $(AM_FLAG_M3264_PRI).
njn8d1181d2009-02-25 23:19:46 +000013AM_CFLAGS = -Winline -Wall -Wshadow -g
14AM_CXXFLAGS = -Winline -Wall -Wshadow -g
njnc9a6f4b2009-04-24 20:17:07 +000015# Include AM_CPPFLAGS in AM_CCASFLAGS to allow for older versions of
16# automake; see comments in Makefile.flags.am for more detail.
17AM_CCASFLAGS = $(AM_CPPFLAGS)
njn53044572009-02-19 09:52:05 +000018
njnf76d27a2009-05-28 01:53:07 +000019
20# On Darwin, for a program 'p', the DWARF debug info is stored in the
21# directory 'p.dSYM'. This must be generated after the executable is
22# created, with 'dsymutil p'. We could redefine LINK with a script that
23# executes 'dsymutil' after linking, but that's a pain. Instead we use this
24# hook so that every time "make check" is run, we subsequently invoke
25# 'dsymutil' on all the executables that lack a .dSYM directory, or that are
26# newer than their corresponding .dSYM directory.
27if VGCONF_OS_IS_DARWIN
28check-local:
29 for f in $(check_PROGRAMS) ; do \
30 if [ ! -e $$f.dSYM -o $$f -nt $$f.dSYM ] ; then \
31 echo "dsymutil $$f"; \
32 dsymutil $$f; \
33 fi \
34 done
35
36clean-local:
37 for f in $(check_PROGRAMS) ; do \
38 rm -rf $$f.dSYM; \
39 done
40endif