njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 1 | |
tom | d9fa751 | 2005-11-30 00:03:58 +0000 | [diff] [blame] | 2 | AUTOMAKE_OPTIONS = foreign 1.7 dist-bzip2 |
sewardj | 31f6cb5 | 2003-03-01 01:26:55 +0000 | [diff] [blame] | 3 | |
njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 4 | include $(top_srcdir)/Makefile.all.am |
nethercote | 4388a40 | 2004-09-01 23:20:49 +0000 | [diff] [blame] | 5 | |
njn | 86f12dc | 2005-03-14 01:16:05 +0000 | [diff] [blame] | 6 | TOOLS = memcheck \ |
njn | 6a3009b | 2005-03-20 00:20:06 +0000 | [diff] [blame] | 7 | cachegrind \ |
weidendo | a17f2a3 | 2006-03-20 10:27:30 +0000 | [diff] [blame] | 8 | callgrind \ |
njn | 6a3009b | 2005-03-20 00:20:06 +0000 | [diff] [blame] | 9 | massif \ |
| 10 | lackey \ |
sewardj | 99a2ceb | 2007-11-09 12:30:36 +0000 | [diff] [blame] | 11 | none \ |
bart | ccf17de | 2008-07-04 15:14:35 +0000 | [diff] [blame] | 12 | helgrind \ |
| 13 | drd |
sewardj | bbec772 | 2007-11-25 14:08:53 +0000 | [diff] [blame] | 14 | |
sewardj | 9c606bd | 2008-09-18 18:12:50 +0000 | [diff] [blame] | 15 | EXP_TOOLS = exp-omega \ |
| 16 | exp-ptrcheck |
sewardj | b5f6f51 | 2005-03-10 23:59:00 +0000 | [diff] [blame] | 17 | |
njn | 3f7e911 | 2005-06-19 05:43:21 +0000 | [diff] [blame] | 18 | # Put docs last because building the HTML is slow and we want to get |
| 19 | # everything else working before we try it. |
sewardj | bbec772 | 2007-11-25 14:08:53 +0000 | [diff] [blame] | 20 | SUBDIRS = include coregrind . tests perf auxprogs $(TOOLS) $(EXP_TOOLS) docs |
njn | 1d0825f | 2006-03-27 11:37:07 +0000 | [diff] [blame] | 21 | DIST_SUBDIRS = $(SUBDIRS) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 22 | |
njn | a63e2d7 | 2003-06-12 14:13:05 +0000 | [diff] [blame] | 23 | SUPP_FILES = \ |
sewardj | 9977424 | 2006-10-14 14:03:51 +0000 | [diff] [blame] | 24 | glibc-2.2.supp glibc-2.3.supp glibc-2.4.supp glibc-2.5.supp \ |
sewardj | 84eb487 | 2008-06-03 20:58:46 +0000 | [diff] [blame] | 25 | glibc-2.6.supp glibc-2.7.supp glibc-2.X.supp.in \ |
| 26 | aix5libc.supp xfree-3.supp xfree-4.supp \ |
sewardj | 68c80c1 | 2007-11-18 14:40:02 +0000 | [diff] [blame] | 27 | glibc-2.34567-NPTL-helgrind.supp \ |
sewardj | bbec772 | 2007-11-25 14:08:53 +0000 | [diff] [blame] | 28 | glibc-2.2-LinuxThreads-helgrind.supp \ |
| 29 | glibc-2.X-drd.supp |
gobry | 3b77789 | 2002-04-04 09:18:39 +0000 | [diff] [blame] | 30 | |
nethercote | 537e894 | 2004-08-25 11:40:07 +0000 | [diff] [blame] | 31 | dist_val_DATA = $(SUPP_FILES) default.supp |
gobry | 3b77789 | 2002-04-04 09:18:39 +0000 | [diff] [blame] | 32 | |
mueller | bddd607 | 2003-11-19 21:50:07 +0000 | [diff] [blame] | 33 | pkgconfigdir = $(libdir)/pkgconfig |
| 34 | pkgconfig_DATA = valgrind.pc |
| 35 | |
njn | 541e50e | 2005-07-26 23:06:18 +0000 | [diff] [blame] | 36 | incincdir = $(includedir)/valgrind |
tom | 9724520 | 2005-07-27 09:25:08 +0000 | [diff] [blame] | 37 | nodist_incinc_HEADERS = $(VEX_PUBLIC_HDRS) |
njn | 541e50e | 2005-07-26 23:06:18 +0000 | [diff] [blame] | 38 | |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 39 | BUILT_SOURCES = default.supp valgrind.pc |
| 40 | CLEANFILES = |
njn | da762d4 | 2003-09-29 20:50:49 +0000 | [diff] [blame] | 41 | DISTCLEANFILES = default.supp |
daywalker | f5ef185 | 2003-02-25 01:48:15 +0000 | [diff] [blame] | 42 | |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 43 | if VGP_X86_LINUX |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 44 | BUILT_SOURCES += valt_load_address_x86_linux.lds |
| 45 | CLEANFILES += valt_load_address_x86_linux.lds |
| 46 | endif |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 47 | if VGP_AMD64_LINUX |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 48 | BUILT_SOURCES += valt_load_address_amd64_linux.lds |
| 49 | CLEANFILES += valt_load_address_amd64_linux.lds |
| 50 | endif |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 51 | if VGP_PPC32_LINUX |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 52 | BUILT_SOURCES += valt_load_address_ppc32_linux.lds |
| 53 | CLEANFILES += valt_load_address_ppc32_linux.lds |
| 54 | endif |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 55 | if VGP_PPC64_LINUX |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 56 | BUILT_SOURCES += valt_load_address_ppc64_linux.lds |
| 57 | CLEANFILES += valt_load_address_ppc64_linux.lds |
| 58 | endif |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 59 | if VGP_PPC32_AIX5 |
| 60 | # No need to generate valt_load_address*.lds; the final executables |
| 61 | # can be linked to be at any address. They will be relocated by |
| 62 | # AIX kernel when they are loaded. |
| 63 | endif |
| 64 | if VGP_PPC64_AIX5 |
| 65 | # Ditto |
| 66 | endif |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 67 | |
gobry | 3b77789 | 2002-04-04 09:18:39 +0000 | [diff] [blame] | 68 | default.supp: $(SUPP_FILES) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 69 | |
njn | 71fe3e6 | 2003-04-23 21:48:20 +0000 | [diff] [blame] | 70 | ## Preprend @PERL@ because tests/vg_regtest isn't executable |
daywalker | c60b3a1 | 2003-04-23 16:39:31 +0000 | [diff] [blame] | 71 | regtest: check |
njn | ad4e8ab | 2008-02-10 22:19:58 +0000 | [diff] [blame] | 72 | @PERL@ tests/vg_regtest $(TOOLS) $(EXP_TOOLS) |
| 73 | nonexp-regtest: check |
sewardj | b5f6f51 | 2005-03-10 23:59:00 +0000 | [diff] [blame] | 74 | @PERL@ tests/vg_regtest $(TOOLS) |
sewardj | bbec772 | 2007-11-25 14:08:53 +0000 | [diff] [blame] | 75 | exp-regtest: check |
| 76 | @PERL@ tests/vg_regtest $(EXP_TOOLS) |
njn | 55b98e9 | 2003-04-08 10:29:13 +0000 | [diff] [blame] | 77 | |
njn | ec0c27a | 2005-12-10 23:11:28 +0000 | [diff] [blame] | 78 | ## Preprend @PERL@ because tests/vg_per isn't executable |
| 79 | perf: check |
| 80 | @PERL@ perf/vg_perf perf |
| 81 | |
nethercote | 537e894 | 2004-08-25 11:40:07 +0000 | [diff] [blame] | 82 | EXTRA_DIST = \ |
fitzhardinge | cf826ad | 2004-01-07 08:47:44 +0000 | [diff] [blame] | 83 | ACKNOWLEDGEMENTS \ |
nethercote | 16b59ee | 2004-10-09 15:59:05 +0000 | [diff] [blame] | 84 | README_DEVELOPERS \ |
nethercote | 5da1e17 | 2003-12-03 21:44:45 +0000 | [diff] [blame] | 85 | README_PACKAGERS \ |
njn | f7c00b1 | 2005-07-19 21:46:19 +0000 | [diff] [blame] | 86 | README_MISSING_SYSCALL_OR_IOCTL \ |
njn | 22ae5c0 | 2005-07-24 23:21:28 +0000 | [diff] [blame] | 87 | valgrind.spec.in valgrind.pc.in \ |
njn | 73dc2c7 | 2005-08-28 04:48:12 +0000 | [diff] [blame] | 88 | Makefile.all.am Makefile.tool.am Makefile.core.am \ |
sewardj | 85a9dca | 2005-07-26 10:42:57 +0000 | [diff] [blame] | 89 | Makefile.tool-inplace.am \ |
dirk | 9f9ab89 | 2006-12-07 15:31:57 +0000 | [diff] [blame] | 90 | $(vex_primary_sources) |
sewardj | fed4dd0 | 2002-04-14 14:32:54 +0000 | [diff] [blame] | 91 | |
gobry | b0a955e | 2002-04-14 15:31:19 +0000 | [diff] [blame] | 92 | install-exec-hook: |
daywalker | 47160d6 | 2002-04-15 00:54:13 +0000 | [diff] [blame] | 93 | $(mkinstalldirs) $(DESTDIR)$(valdir) |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 94 | |
fitzhardinge | 98abfc7 | 2003-12-16 02:05:15 +0000 | [diff] [blame] | 95 | all-local: |
nethercote | b7dceef | 2004-08-25 11:50:46 +0000 | [diff] [blame] | 96 | mkdir -p $(inplacedir) |
| 97 | rm -f $(addprefix $(inplacedir)/,default.supp $(SUPP_FILES)) |
| 98 | ln -s ../default.supp $(inplacedir) |
| 99 | ln -s $(addprefix ../$(top_srcdir)/,$(SUPP_FILES)) $(inplacedir) |
fitzhardinge | 98abfc7 | 2003-12-16 02:05:15 +0000 | [diff] [blame] | 100 | |
thughes | 734160c | 2004-06-28 21:52:40 +0000 | [diff] [blame] | 101 | distclean-local: |
nethercote | b7dceef | 2004-08-25 11:50:46 +0000 | [diff] [blame] | 102 | rm -rf $(inplacedir) |
sewardj | 85a9dca | 2005-07-26 10:42:57 +0000 | [diff] [blame] | 103 | |
tom | ab568f6 | 2005-07-27 07:36:22 +0000 | [diff] [blame] | 104 | # These list the bits of vex we need to install |
sewardj | 85a9dca | 2005-07-26 10:42:57 +0000 | [diff] [blame] | 105 | |
njn | 541e50e | 2005-07-26 23:06:18 +0000 | [diff] [blame] | 106 | VEX_PUBLIC_HDRS = \ |
tom | ab568f6 | 2005-07-27 07:36:22 +0000 | [diff] [blame] | 107 | @VEX_DIR@/pub/libvex_guest_amd64.h \ |
| 108 | @VEX_DIR@/pub/libvex_ir.h \ |
| 109 | @VEX_DIR@/pub/libvex_guest_ppc32.h \ |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 110 | @VEX_DIR@/pub/libvex_guest_ppc64.h \ |
tom | ab568f6 | 2005-07-27 07:36:22 +0000 | [diff] [blame] | 111 | @VEX_DIR@/pub/libvex_basictypes.h \ |
| 112 | @VEX_DIR@/pub/libvex_guest_offsets.h \ |
| 113 | @VEX_DIR@/pub/libvex_emwarn.h \ |
| 114 | @VEX_DIR@/pub/libvex.h \ |
| 115 | @VEX_DIR@/pub/libvex_trc_values.h \ |
| 116 | @VEX_DIR@/pub/libvex_guest_arm.h \ |
| 117 | @VEX_DIR@/pub/libvex_guest_x86.h |
| 118 | |
| 119 | # These list the bits of vex we need to copy into the tarball |
| 120 | |
dirk | 9f9ab89 | 2006-12-07 15:31:57 +0000 | [diff] [blame] | 121 | vex_primary_sources = \ |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 122 | VEX/quote.txt \ |
| 123 | VEX/newline.txt \ |
sewardj | b191672 | 2005-08-03 16:39:44 +0000 | [diff] [blame] | 124 | VEX/HACKING.README \ |
| 125 | VEX/LICENSE.README \ |
| 126 | VEX/LICENSE.GPL \ |
tom | ab568f6 | 2005-07-27 07:36:22 +0000 | [diff] [blame] | 127 | VEX/Makefile \ |
| 128 | VEX/auxprogs/genoffsets.c \ |
sewardj | 85a9dca | 2005-07-26 10:42:57 +0000 | [diff] [blame] | 129 | VEX/pub/libvex_guest_amd64.h \ |
| 130 | VEX/pub/libvex_ir.h \ |
| 131 | VEX/pub/libvex_guest_ppc32.h \ |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 132 | VEX/pub/libvex_guest_ppc64.h \ |
sewardj | 85a9dca | 2005-07-26 10:42:57 +0000 | [diff] [blame] | 133 | VEX/pub/libvex_basictypes.h \ |
| 134 | VEX/pub/libvex_guest_offsets.h \ |
| 135 | VEX/pub/libvex_emwarn.h \ |
| 136 | VEX/pub/libvex.h \ |
| 137 | VEX/pub/libvex_trc_values.h \ |
| 138 | VEX/pub/libvex_guest_arm.h \ |
tom | ab568f6 | 2005-07-27 07:36:22 +0000 | [diff] [blame] | 139 | VEX/pub/libvex_guest_x86.h \ |
sewardj | 85a9dca | 2005-07-26 10:42:57 +0000 | [diff] [blame] | 140 | VEX/priv/ir/irmatch.c \ |
| 141 | VEX/priv/ir/irmatch.h \ |
| 142 | VEX/priv/ir/irdefs.c \ |
| 143 | VEX/priv/ir/iropt.c \ |
| 144 | VEX/priv/ir/iropt.h \ |
cerion | 0fe1441 | 2005-12-23 11:44:40 +0000 | [diff] [blame] | 145 | VEX/priv/host-ppc/isel.c \ |
| 146 | VEX/priv/host-ppc/hdefs.c \ |
| 147 | VEX/priv/host-ppc/hdefs.h \ |
sewardj | 85a9dca | 2005-07-26 10:42:57 +0000 | [diff] [blame] | 148 | VEX/priv/main/vex_svnversion.h \ |
| 149 | VEX/priv/main/vex_globals.c \ |
| 150 | VEX/priv/main/vex_globals.h \ |
| 151 | VEX/priv/main/vex_main.c \ |
| 152 | VEX/priv/main/vex_util.c \ |
| 153 | VEX/priv/main/vex_util.h \ |
| 154 | VEX/priv/guest-arm/ghelpers.c \ |
| 155 | VEX/priv/guest-arm/gdefs.h \ |
| 156 | VEX/priv/guest-arm/toIR.c \ |
| 157 | VEX/priv/guest-x86/ghelpers.c \ |
| 158 | VEX/priv/guest-x86/gdefs.h \ |
| 159 | VEX/priv/guest-x86/toIR.c \ |
| 160 | VEX/priv/guest-generic/g_generic_x87.c \ |
| 161 | VEX/priv/guest-generic/g_generic_x87.h \ |
| 162 | VEX/priv/guest-generic/bb_to_IR.c \ |
| 163 | VEX/priv/guest-generic/bb_to_IR.h \ |
| 164 | VEX/priv/host-arm/isel.c \ |
| 165 | VEX/priv/host-arm/hdefs.c \ |
| 166 | VEX/priv/host-arm/hdefs.h \ |
| 167 | VEX/priv/host-x86/isel.c \ |
| 168 | VEX/priv/host-x86/hdefs.c \ |
| 169 | VEX/priv/host-x86/hdefs.h \ |
| 170 | VEX/priv/guest-amd64/ghelpers.c \ |
| 171 | VEX/priv/guest-amd64/gdefs.h \ |
| 172 | VEX/priv/guest-amd64/toIR.c \ |
cerion | 0fe1441 | 2005-12-23 11:44:40 +0000 | [diff] [blame] | 173 | VEX/priv/guest-ppc/ghelpers.c \ |
| 174 | VEX/priv/guest-ppc/gdefs.h \ |
| 175 | VEX/priv/guest-ppc/toIR.c \ |
sewardj | 85a9dca | 2005-07-26 10:42:57 +0000 | [diff] [blame] | 176 | VEX/priv/host-generic/reg_alloc2.c \ |
| 177 | VEX/priv/host-generic/h_generic_regs.c \ |
| 178 | VEX/priv/host-generic/h_generic_regs.h \ |
| 179 | VEX/priv/host-generic/h_generic_simd64.c \ |
| 180 | VEX/priv/host-generic/h_generic_simd64.h \ |
| 181 | VEX/priv/host-amd64/isel.c \ |
| 182 | VEX/priv/host-amd64/hdefs.c \ |
| 183 | VEX/priv/host-amd64/hdefs.h |
sewardj | 45f4e7c | 2005-09-27 19:20:21 +0000 | [diff] [blame] | 184 | |
| 185 | |
| 186 | # Generate a linker script for linking the binaries. This is the |
| 187 | # standard gcc linker script, except hacked so that an alternative |
| 188 | # load address can be specified by (1) asking gcc to use this script |
| 189 | # (-Wl,-T,valt_load_address.lds) and (2) setting the symbol |
| 190 | # valt_load_address to the required value |
| 191 | # (-Wl,-defsym,valt_load_address=0x70000000). |
| 192 | # |
| 193 | # Extract ld's default linker script and hack it to our needs. |
| 194 | # First we cut everything above and below the "=====..." lines at the top |
| 195 | # and bottom. |
| 196 | # Then we have to replace the load address with "valt_load_address". |
| 197 | # The line to replace in has one of the following two forms: |
| 198 | # |
| 199 | # . = 0x08048000 + SIZEOF_HEADERS; |
| 200 | # |
| 201 | # or |
| 202 | # PROVIDE (__executable_start = 0x08048000); . = 0x08048000 + SIZEOF_HEADERS; |
| 203 | # |
| 204 | # So we search for the line with a hex value "+ SIZEOF_HEADERS", and replace |
| 205 | # all the hex values in that line with "valt_load_address". |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 206 | valt_load_address_x86_linux.lds: Makefile |
| 207 | $(CC) @FLAG_M32@ -Wl,--verbose -nostdlib 2>&1 | sed \ |
sewardj | 45f4e7c | 2005-09-27 19:20:21 +0000 | [diff] [blame] | 208 | -e '1,/^=====\+$$/d' \ |
| 209 | -e '/^=====\+$$/d' \ |
| 210 | -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ |
| 211 | || rm -f $@ |
| 212 | |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 213 | valt_load_address_amd64_linux.lds: Makefile |
| 214 | $(CC) -m64 -Wl,--verbose -nostdlib 2>&1 | sed \ |
| 215 | -e '1,/^=====\+$$/d' \ |
| 216 | -e '/^=====\+$$/d' \ |
| 217 | -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ |
| 218 | || rm -f $@ |
| 219 | |
| 220 | valt_load_address_ppc32_linux.lds: Makefile |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 221 | $(CC) @FLAG_M32@ -Wl,--verbose -nostdlib 2>&1 | sed \ |
| 222 | -e '1,/^=====\+$$/d' \ |
| 223 | -e '/^=====\+$$/d' \ |
| 224 | -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ |
| 225 | || rm -f $@ |
| 226 | |
| 227 | valt_load_address_ppc64_linux.lds: Makefile |
| 228 | $(CC) -m64 -Wl,--verbose -nostdlib 2>&1 | sed \ |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 229 | -e '1,/^=====\+$$/d' \ |
| 230 | -e '/^=====\+$$/d' \ |
| 231 | -e '/\. = 0x[0-9A-Fa-f]\+ + SIZEOF_HEADERS/s/0x[0-9A-Fa-f]\+/valt_load_address/g' > $@ \ |
| 232 | || rm -f $@ |