nethercote | 4388a40 | 2004-09-01 23:20:49 +0000 | [diff] [blame] | 1 | |
njn | 7375de3 | 2009-08-05 08:08:18 +0000 | [diff] [blame] | 2 | SUBDIRS = . tests |
nethercote | 4388a40 | 2004-09-01 23:20:49 +0000 | [diff] [blame] | 3 | |
nethercote | b35a8b9 | 2004-09-11 16:45:27 +0000 | [diff] [blame] | 4 | include $(top_srcdir)/Makefile.all.am |
njn | 717cde5 | 2005-05-10 02:47:21 +0000 | [diff] [blame] | 5 | |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 6 | #---------------------------------------------------------------------------- |
| 7 | # <tool>-<platform> stuff |
| 8 | #---------------------------------------------------------------------------- |
| 9 | |
| 10 | TOOL_DEPENDENCIES_@VGCONF_PLATFORM_PRI_CAPS@ = \ |
| 11 | $(top_builddir)/coregrind/libcoregrind-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a \ |
| 12 | $(top_builddir)/VEX/libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a |
| 13 | if VGCONF_HAVE_PLATFORM_SEC |
| 14 | TOOL_DEPENDENCIES_@VGCONF_PLATFORM_SEC_CAPS@ = \ |
| 15 | $(top_builddir)/coregrind/libcoregrind-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a \ |
| 16 | $(top_builddir)/VEX/libvex-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a |
| 17 | endif |
| 18 | |
| 19 | |
| 20 | TOOL_LDADD_COMMON = -lgcc |
| 21 | TOOL_LDADD_@VGCONF_PLATFORM_PRI_CAPS@ = \ |
| 22 | $(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_PRI_CAPS@) $(TOOL_LDADD_COMMON) |
| 23 | if VGCONF_HAVE_PLATFORM_SEC |
| 24 | TOOL_LDADD_@VGCONF_PLATFORM_SEC_CAPS@ = \ |
| 25 | $(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_SEC_CAPS@) $(TOOL_LDADD_COMMON) |
| 26 | endif |
| 27 | |
| 28 | |
bart | 699fbac | 2010-06-08 18:23:59 +0000 | [diff] [blame] | 29 | # -Wl,--build-id=none is needed when linking tools on Linux. Without this |
| 30 | # flag newer ld versions (2.20 and later) create a .note.gnu.build-id at the |
| 31 | # default text segment address, which of course means the resulting executable |
| 32 | # is unusable. So we have to tell ld not to generate that, with --build-id=none. |
sewardj | 9e6428a | 2010-06-02 00:31:34 +0000 | [diff] [blame] | 33 | TOOL_LDFLAGS_COMMON_LINUX = \ |
bart | 699fbac | 2010-06-08 18:23:59 +0000 | [diff] [blame] | 34 | -static -nodefaultlibs -nostartfiles -u _start @FLAG_NO_BUILD_ID@ |
sewardj | 9e6428a | 2010-06-02 00:31:34 +0000 | [diff] [blame] | 35 | TOOL_LDFLAGS_COMMON_AIX5 = \ |
| 36 | -static -Wl,-e_start_valgrind |
| 37 | TOOL_LDFLAGS_COMMON_DARWIN = \ |
njn | ea2d6fd | 2010-07-01 00:20:20 +0000 | [diff] [blame] | 38 | -nodefaultlibs -nostartfiles -Wl,-u,__start -Wl,-e,__start |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 39 | |
| 40 | TOOL_LDFLAGS_X86_LINUX = \ |
sewardj | 9e6428a | 2010-06-02 00:31:34 +0000 | [diff] [blame] | 41 | $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 42 | |
| 43 | TOOL_LDFLAGS_AMD64_LINUX = \ |
sewardj | 9e6428a | 2010-06-02 00:31:34 +0000 | [diff] [blame] | 44 | $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 45 | |
| 46 | TOOL_LDFLAGS_PPC32_LINUX = \ |
sewardj | 9e6428a | 2010-06-02 00:31:34 +0000 | [diff] [blame] | 47 | $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 48 | |
| 49 | TOOL_LDFLAGS_PPC64_LINUX = \ |
sewardj | 9e6428a | 2010-06-02 00:31:34 +0000 | [diff] [blame] | 50 | $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 51 | |
sewardj | 59570ff | 2010-01-01 11:59:33 +0000 | [diff] [blame] | 52 | TOOL_LDFLAGS_ARM_LINUX = \ |
sewardj | 9e6428a | 2010-06-02 00:31:34 +0000 | [diff] [blame] | 53 | $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ |
sewardj | 59570ff | 2010-01-01 11:59:33 +0000 | [diff] [blame] | 54 | |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 55 | TOOL_LDFLAGS_PPC32_AIX5 = \ |
| 56 | $(TOOL_LDFLAGS_COMMON_AIX5) @FLAG_MAIX32@ |
| 57 | |
| 58 | TOOL_LDFLAGS_PPC64_AIX5 = \ |
| 59 | $(TOOL_LDFLAGS_COMMON_AIX5) @FLAG_MAIX64@ -Wl,-bbigtoc |
| 60 | |
| 61 | TOOL_LDFLAGS_X86_DARWIN = \ |
njn | ea2d6fd | 2010-07-01 00:20:20 +0000 | [diff] [blame] | 62 | $(TOOL_LDFLAGS_COMMON_DARWIN) -arch i386 |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 63 | |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 64 | TOOL_LDFLAGS_AMD64_DARWIN = \ |
njn | ea2d6fd | 2010-07-01 00:20:20 +0000 | [diff] [blame] | 65 | $(TOOL_LDFLAGS_COMMON_DARWIN) -arch x86_64 |
| 66 | |
| 67 | # NB for 64-bit darwin. We may want to set -Wl,-pagezero_size to |
| 68 | # something smaller than the default of 4G, so as to facilitate |
| 69 | # loading clients who are also linked thusly (currently m_ume.c |
| 70 | # will fail to load them). Although such setting is probably |
| 71 | # better done in link_tool_exe.c. |
| 72 | # |
| 73 | # -Wl,-pagezero_size,0x100000000 |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 74 | |
| 75 | |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 76 | #---------------------------------------------------------------------------- |
| 77 | # vgpreload_<tool>-<platform>.a stuff |
| 78 | #---------------------------------------------------------------------------- |
njn | b7fda4c | 2009-02-06 04:05:43 +0000 | [diff] [blame] | 79 | |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 80 | LIBREPLACEMALLOC_X86_LINUX = \ |
sewardj | 4d3f7a4 | 2009-02-22 23:40:31 +0000 | [diff] [blame] | 81 | $(top_builddir)/coregrind/libreplacemalloc_toolpreload-x86-linux.a |
sewardj | 45f4e7c | 2005-09-27 19:20:21 +0000 | [diff] [blame] | 82 | |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 83 | LIBREPLACEMALLOC_AMD64_LINUX = \ |
sewardj | 4d3f7a4 | 2009-02-22 23:40:31 +0000 | [diff] [blame] | 84 | $(top_builddir)/coregrind/libreplacemalloc_toolpreload-amd64-linux.a |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 85 | |
| 86 | LIBREPLACEMALLOC_PPC32_LINUX = \ |
sewardj | 4d3f7a4 | 2009-02-22 23:40:31 +0000 | [diff] [blame] | 87 | $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc32-linux.a |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 88 | |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 89 | LIBREPLACEMALLOC_PPC64_LINUX = \ |
sewardj | 4d3f7a4 | 2009-02-22 23:40:31 +0000 | [diff] [blame] | 90 | $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-linux.a |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 91 | |
sewardj | 59570ff | 2010-01-01 11:59:33 +0000 | [diff] [blame] | 92 | LIBREPLACEMALLOC_ARM_LINUX = \ |
| 93 | $(top_builddir)/coregrind/libreplacemalloc_toolpreload-arm-linux.a |
| 94 | |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 95 | LIBREPLACEMALLOC_PPC32_AIX5 = \ |
sewardj | 4d3f7a4 | 2009-02-22 23:40:31 +0000 | [diff] [blame] | 96 | $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc32-aix5.a |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 97 | |
| 98 | LIBREPLACEMALLOC_PPC64_AIX5 = \ |
sewardj | 4d3f7a4 | 2009-02-22 23:40:31 +0000 | [diff] [blame] | 99 | $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64-aix5.a |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 100 | |
njn | f76d27a | 2009-05-28 01:53:07 +0000 | [diff] [blame] | 101 | LIBREPLACEMALLOC_X86_DARWIN = \ |
| 102 | $(top_builddir)/coregrind/libreplacemalloc_toolpreload-x86-darwin.a |
| 103 | |
| 104 | LIBREPLACEMALLOC_AMD64_DARWIN = \ |
| 105 | $(top_builddir)/coregrind/libreplacemalloc_toolpreload-amd64-darwin.a |
| 106 | |
njn | b7fda4c | 2009-02-06 04:05:43 +0000 | [diff] [blame] | 107 | |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 108 | LIBREPLACEMALLOC_LDFLAGS_X86_LINUX = \ |
| 109 | -Wl,--whole-archive \ |
| 110 | $(LIBREPLACEMALLOC_X86_LINUX) \ |
| 111 | -Wl,--no-whole-archive |
njn | b7fda4c | 2009-02-06 04:05:43 +0000 | [diff] [blame] | 112 | |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 113 | LIBREPLACEMALLOC_LDFLAGS_AMD64_LINUX = \ |
| 114 | -Wl,--whole-archive \ |
| 115 | $(LIBREPLACEMALLOC_AMD64_LINUX) \ |
| 116 | -Wl,--no-whole-archive |
njn | b7fda4c | 2009-02-06 04:05:43 +0000 | [diff] [blame] | 117 | |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 118 | LIBREPLACEMALLOC_LDFLAGS_PPC32_LINUX = \ |
| 119 | -Wl,--whole-archive \ |
| 120 | $(LIBREPLACEMALLOC_PPC32_LINUX) \ |
| 121 | -Wl,--no-whole-archive |
njn | b7fda4c | 2009-02-06 04:05:43 +0000 | [diff] [blame] | 122 | |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 123 | LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX = \ |
| 124 | -Wl,--whole-archive \ |
| 125 | $(LIBREPLACEMALLOC_PPC64_LINUX) \ |
| 126 | -Wl,--no-whole-archive |
njn | b7fda4c | 2009-02-06 04:05:43 +0000 | [diff] [blame] | 127 | |
sewardj | 59570ff | 2010-01-01 11:59:33 +0000 | [diff] [blame] | 128 | LIBREPLACEMALLOC_LDFLAGS_ARM_LINUX = \ |
| 129 | -Wl,--whole-archive \ |
| 130 | $(LIBREPLACEMALLOC_ARM_LINUX) \ |
| 131 | -Wl,--no-whole-archive |
| 132 | |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 133 | LIBREPLACEMALLOC_LDFLAGS_PPC32_AIX5 = \ |
| 134 | $(LIBREPLACEMALLOC_PPC32_AIX5) |
njn | b7fda4c | 2009-02-06 04:05:43 +0000 | [diff] [blame] | 135 | |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 136 | LIBREPLACEMALLOC_LDFLAGS_PPC64_AIX5 = \ |
| 137 | $(LIBREPLACEMALLOC_PPC64_AIX5) |
njn | 3e65340 | 2009-02-06 07:12:57 +0000 | [diff] [blame] | 138 | |
njn | f76d27a | 2009-05-28 01:53:07 +0000 | [diff] [blame] | 139 | LIBREPLACEMALLOC_LDFLAGS_X86_DARWIN = \ |
| 140 | $(LIBREPLACEMALLOC_X86_DARWIN) |
njn | 3e65340 | 2009-02-06 07:12:57 +0000 | [diff] [blame] | 141 | |
njn | f76d27a | 2009-05-28 01:53:07 +0000 | [diff] [blame] | 142 | LIBREPLACEMALLOC_LDFLAGS_AMD64_DARWIN = \ |
| 143 | $(LIBREPLACEMALLOC_AMD64_DARWIN) |
njn | ac31b05 | 2009-02-12 00:30:02 +0000 | [diff] [blame] | 144 | |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 145 | #---------------------------------------------------------------------------- |
| 146 | # General stuff |
| 147 | #---------------------------------------------------------------------------- |
njn | f76d27a | 2009-05-28 01:53:07 +0000 | [diff] [blame] | 148 | |
| 149 | all-local: inplace-noinst_PROGRAMS inplace-noinst_DSYMS |
| 150 | |
| 151 | clean-local: clean-noinst_DSYMS |
| 152 | |
| 153 | install-exec-local: install-noinst_PROGRAMS install-noinst_DSYMS |
njn | ac31b05 | 2009-02-12 00:30:02 +0000 | [diff] [blame] | 154 | |