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 | 5304457 | 2009-02-19 09:52:05 +0000 | [diff] [blame] | 3 | include $(top_srcdir)/Makefile.flags.am # For AM_FLAG_M3264_PRI |
| 4 | |
| 5 | AM_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 |
njn | 07891f9 | 2009-02-22 23:38:10 +0000 | [diff] [blame] | 11 | # Nb: Tools need to augment these flags with an arch-selection option, such |
| 12 | # as $(AM_FLAG_M3264_PRI). |
njn | 8d1181d | 2009-02-25 23:19:46 +0000 | [diff] [blame] | 13 | AM_CFLAGS = -Winline -Wall -Wshadow -g |
| 14 | AM_CXXFLAGS = -Winline -Wall -Wshadow -g |
njn | c9a6f4b | 2009-04-24 20:17:07 +0000 | [diff] [blame] | 15 | # Include AM_CPPFLAGS in AM_CCASFLAGS to allow for older versions of |
| 16 | # automake; see comments in Makefile.flags.am for more detail. |
| 17 | AM_CCASFLAGS = $(AM_CPPFLAGS) |
njn | 5304457 | 2009-02-19 09:52:05 +0000 | [diff] [blame] | 18 | |
njn | f76d27a | 2009-05-28 01:53:07 +0000 | [diff] [blame^] | 19 | |
| 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. |
| 27 | if VGCONF_OS_IS_DARWIN |
| 28 | check-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 | |
| 36 | clean-local: |
| 37 | for f in $(check_PROGRAMS) ; do \ |
| 38 | rm -rf $$f.dSYM; \ |
| 39 | done |
| 40 | endif |