manual-core.xml: Fix various xmllint issues.
[valgrind.git] / Makefile.tool.am
blobcc2fa0ee6fa42e99141c6466e14b9c365b107c04
2 SUBDIRS = . tests
4 include $(top_srcdir)/Makefile.all.am
6 #----------------------------------------------------------------------------
7 # <tool>-<platform> stuff
8 #----------------------------------------------------------------------------
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
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
29 # -Wl,--build-id=none is needed when linking tools with a linker that only
30 # knows -Ttext and not -Ttext-segment. Without this flag newer ld versions
31 # (2.20 and later) create a .note.gnu.build-id at the default text segment
32 # address, which of course means the resulting executable
33 # is unusable. So we have to tell ld not to generate that, with
34 # --build-id=none unless the linker supports -Ttext-segment.
35 TOOL_LDFLAGS_COMMON_LINUX = \
36         -static -nodefaultlibs -nostartfiles -u _start @FLAG_NO_BUILD_ID@
37 TOOL_LDFLAGS_COMMON_DARWIN = \
38         -nodefaultlibs -nostartfiles -Wl,-u,__start -Wl,-e,__start
39 TOOL_LDFLAGS_COMMON_SOLARIS = \
40         -static -nodefaultlibs -nostartfiles -u _start \
41         -Wl,-M,/usr/lib/ld/map.noexstk
43 TOOL_LDFLAGS_X86_LINUX = \
44         $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@
46 TOOL_LDFLAGS_AMD64_LINUX = \
47         $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@
49 TOOL_LDFLAGS_PPC32_LINUX = \
50         $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@
52 TOOL_LDFLAGS_PPC64BE_LINUX = \
53         $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@
55 TOOL_LDFLAGS_PPC64LE_LINUX = \
56         $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@
58 TOOL_LDFLAGS_ARM_LINUX = \
59         $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@
61 TOOL_LDFLAGS_ARM64_LINUX = \
62         $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@
64 TOOL_LDFLAGS_S390X_LINUX = \
65         $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@
67 TOOL_LDFLAGS_X86_DARWIN = \
68         $(TOOL_LDFLAGS_COMMON_DARWIN) -arch i386
70 TOOL_LDFLAGS_AMD64_DARWIN = \
71         $(TOOL_LDFLAGS_COMMON_DARWIN) -arch x86_64
73 # MIPS Linux default start symbol is __start, not _start like on x86 or amd
74 TOOL_LDFLAGS_MIPS32_LINUX = \
75         -static -nodefaultlibs -nostartfiles -u __start @FLAG_NO_BUILD_ID@ \
76         @FLAG_M32@
78 TOOL_LDFLAGS_NANOMIPS_LINUX = \
79         -static -nodefaultlibs -nostartfiles -u __start @FLAG_NO_BUILD_ID@ \
80         @FLAG_M32@ -Wl,-no-relax
82 TOOL_LDFLAGS_MIPS64_LINUX = \
83         -static -nodefaultlibs -nostartfiles -u __start @FLAG_NO_BUILD_ID@ \
84         @FLAG_M64@
86 TOOL_LDFLAGS_X86_SOLARIS = \
87         $(TOOL_LDFLAGS_COMMON_SOLARIS) @FLAG_M32@
89 TOOL_LDFLAGS_AMD64_SOLARIS = \
90         $(TOOL_LDFLAGS_COMMON_SOLARIS) @FLAG_M64@
92 # On Android we must ask for non-executable stack, not sure why.
93 if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX
94 if VGCONF_PLATVARIANT_IS_ANDROID
95 TOOL_LDFLAGS_ARM_LINUX += -Wl,-z,noexecstack
96 endif
97 endif
99 # NB for 64-bit darwin.  We may want to set -Wl,-pagezero_size to
100 # something smaller than the default of 4G, so as to facilitate
101 # loading clients who are also linked thusly (currently m_ume.c
102 # will fail to load them).  Although such setting is probably
103 # better done in link_tool_exe.c.
105 #       -Wl,-pagezero_size,0x100000000
108 #----------------------------------------------------------------------------
109 # vgpreload_<tool>-<platform>.a stuff
110 #----------------------------------------------------------------------------
112 LIBREPLACEMALLOC_X86_LINUX = \
113         $(top_builddir)/coregrind/libreplacemalloc_toolpreload-x86-linux.a
115 LIBREPLACEMALLOC_AMD64_LINUX = \
116         $(top_builddir)/coregrind/libreplacemalloc_toolpreload-amd64-linux.a
118 LIBREPLACEMALLOC_PPC32_LINUX = \
119         $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc32-linux.a
121 LIBREPLACEMALLOC_PPC64BE_LINUX = \
122         $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64be-linux.a
124 LIBREPLACEMALLOC_PPC64LE_LINUX = \
125         $(top_builddir)/coregrind/libreplacemalloc_toolpreload-ppc64le-linux.a
127 LIBREPLACEMALLOC_ARM_LINUX = \
128         $(top_builddir)/coregrind/libreplacemalloc_toolpreload-arm-linux.a
130 LIBREPLACEMALLOC_ARM64_LINUX = \
131         $(top_builddir)/coregrind/libreplacemalloc_toolpreload-arm64-linux.a
133 LIBREPLACEMALLOC_X86_DARWIN = \
134         $(top_builddir)/coregrind/libreplacemalloc_toolpreload-x86-darwin.a
136 LIBREPLACEMALLOC_AMD64_DARWIN = \
137         $(top_builddir)/coregrind/libreplacemalloc_toolpreload-amd64-darwin.a
139 LIBREPLACEMALLOC_S390X_LINUX = \
140         $(top_builddir)/coregrind/libreplacemalloc_toolpreload-s390x-linux.a
142 LIBREPLACEMALLOC_MIPS32_LINUX = \
143         $(top_builddir)/coregrind/libreplacemalloc_toolpreload-mips32-linux.a
145 LIBREPLACEMALLOC_MIPS64_LINUX = \
146         $(top_builddir)/coregrind/libreplacemalloc_toolpreload-mips64-linux.a
148 LIBREPLACEMALLOC_X86_SOLARIS = \
149         $(top_builddir)/coregrind/libreplacemalloc_toolpreload-x86-solaris.a
151 LIBREPLACEMALLOC_AMD64_SOLARIS = \
152         $(top_builddir)/coregrind/libreplacemalloc_toolpreload-amd64-solaris.a
154 LIBREPLACEMALLOC_LDFLAGS_X86_LINUX = \
155         -Wl,--whole-archive \
156         $(LIBREPLACEMALLOC_X86_LINUX) \
157         -Wl,--no-whole-archive
159 LIBREPLACEMALLOC_LDFLAGS_AMD64_LINUX = \
160         -Wl,--whole-archive \
161         $(LIBREPLACEMALLOC_AMD64_LINUX) \
162         -Wl,--no-whole-archive
164 LIBREPLACEMALLOC_LDFLAGS_PPC32_LINUX = \
165         -Wl,--whole-archive \
166         $(LIBREPLACEMALLOC_PPC32_LINUX) \
167         -Wl,--no-whole-archive
169 LIBREPLACEMALLOC_LDFLAGS_PPC64BE_LINUX = \
170         -Wl,--whole-archive \
171         $(LIBREPLACEMALLOC_PPC64BE_LINUX) \
172         -Wl,--no-whole-archive
174 LIBREPLACEMALLOC_LDFLAGS_PPC64LE_LINUX = \
175         -Wl,--whole-archive \
176         $(LIBREPLACEMALLOC_PPC64LE_LINUX) \
177         -Wl,--no-whole-archive
179 LIBREPLACEMALLOC_LDFLAGS_ARM_LINUX = \
180         -Wl,--whole-archive \
181         $(LIBREPLACEMALLOC_ARM_LINUX) \
182         -Wl,--no-whole-archive
184 LIBREPLACEMALLOC_LDFLAGS_ARM64_LINUX = \
185         -Wl,--whole-archive \
186         $(LIBREPLACEMALLOC_ARM64_LINUX) \
187         -Wl,--no-whole-archive
189 LIBREPLACEMALLOC_LDFLAGS_X86_DARWIN = \
190         $(LIBREPLACEMALLOC_X86_DARWIN)
192 LIBREPLACEMALLOC_LDFLAGS_AMD64_DARWIN = \
193         $(LIBREPLACEMALLOC_AMD64_DARWIN)
195 LIBREPLACEMALLOC_LDFLAGS_S390X_LINUX = \
196         -Wl,--whole-archive \
197         $(LIBREPLACEMALLOC_S390X_LINUX) \
198         -Wl,--no-whole-archive
200 LIBREPLACEMALLOC_LDFLAGS_MIPS32_LINUX = \
201         -Wl,--whole-archive \
202         $(LIBREPLACEMALLOC_MIPS32_LINUX) \
203         -Wl,--no-whole-archive
205 LIBREPLACEMALLOC_LDFLAGS_MIPS64_LINUX = \
206         -Wl,--whole-archive \
207         $(LIBREPLACEMALLOC_MIPS64_LINUX) \
208         -Wl,--no-whole-archive
210 LIBREPLACEMALLOC_LDFLAGS_X86_SOLARIS = \
211         -Wl,--whole-archive \
212         $(LIBREPLACEMALLOC_X86_SOLARIS) \
213         -Wl,--no-whole-archive
215 LIBREPLACEMALLOC_LDFLAGS_AMD64_SOLARIS = \
216         -Wl,--whole-archive \
217         $(LIBREPLACEMALLOC_AMD64_SOLARIS) \
218         -Wl,--no-whole-archive
220 #----------------------------------------------------------------------------
221 # General stuff
222 #----------------------------------------------------------------------------
224 all-local: inplace-noinst_PROGRAMS inplace-noinst_DSYMS
226 clean-local: clean-noinst_DSYMS
228 install-exec-local: install-noinst_PROGRAMS install-noinst_DSYMS
230 uninstall-local: uninstall-noinst_PROGRAMS uninstall-noinst_DSYMS