summaryrefslogtreecommitdiff
path: root/Makefile.tool.am
blob: 883e21ae8d2a8d94655f29d53057b6cb3af982c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146

SUBDIRS = . tests docs

include $(top_srcdir)/Makefile.all.am
include $(top_srcdir)/Makefile.install.am
include $(top_srcdir)/Makefile.tool-flags.am
include $(top_srcdir)/Makefile.tool-inplace.am

LIBREPLACEMALLOC_X86_LINUX = \
	$(top_builddir)/coregrind/libreplacemalloc_toolpreload_x86_linux.a

LIBREPLACEMALLOC_AMD64_LINUX = \
	$(top_builddir)/coregrind/libreplacemalloc_toolpreload_amd64_linux.a

LIBREPLACEMALLOC_PPC32_LINUX = \
	$(top_builddir)/coregrind/libreplacemalloc_toolpreload_ppc32_linux.a

LIBREPLACEMALLOC_PPC64_LINUX = \
	$(top_builddir)/coregrind/libreplacemalloc_toolpreload_ppc64_linux.a

LIBREPLACEMALLOC_PPC32_AIX5 = \
	$(top_builddir)/coregrind/libreplacemalloc_toolpreload_ppc32_aix5.a

LIBREPLACEMALLOC_PPC64_AIX5 = \
	$(top_builddir)/coregrind/libreplacemalloc_toolpreload_ppc64_aix5.a

COREGRIND_LIBS_X86_LINUX = \
	$(top_builddir)/coregrind/libcoregrind_x86_linux.a \
	@VEX_DIR@/libvex_x86_linux.a

COREGRIND_LIBS_AMD64_LINUX = \
	$(top_builddir)/coregrind/libcoregrind_amd64_linux.a \
	@VEX_DIR@/libvex_amd64_linux.a

COREGRIND_LIBS_PPC32_LINUX = \
	$(top_builddir)/coregrind/libcoregrind_ppc32_linux.a \
	@VEX_DIR@/libvex_ppc32_linux.a

COREGRIND_LIBS_PPC64_LINUX = \
	$(top_builddir)/coregrind/libcoregrind_ppc64_linux.a \
	@VEX_DIR@/libvex_ppc64_linux.a

COREGRIND_LIBS_PPC32_AIX5 = \
	$(top_builddir)/coregrind/libcoregrind_ppc32_aix5.a \
	@VEX_DIR@/libvex_ppc32_aix5.a

COREGRIND_LIBS_PPC64_AIX5 = \
	$(top_builddir)/coregrind/libcoregrind_ppc64_aix5.a \
	@VEX_DIR@/libvex_ppc64_aix5.a

##.PHONY:  @VEX_DIR@/libvex.a

@VEX_DIR@/libvex_x86_linux.a: @VEX_DIR@/priv/main/vex_svnversion.h
	$(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \
	libvex_x86_linux.a \
	EXTRA_CFLAGS="$(AM_CFLAGS_X86_LINUX) @FLAG_WDECL_AFTER_STMT@ \
			@FLAG_FNO_STACK_PROTECTOR@"

@VEX_DIR@/libvex_amd64_linux.a: @VEX_DIR@/priv/main/vex_svnversion.h
	$(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \
	libvex_amd64_linux.a \
	EXTRA_CFLAGS="$(AM_CFLAGS_AMD64_LINUX) @FLAG_WDECL_AFTER_STMT@ \
			@FLAG_FNO_STACK_PROTECTOR@"

@VEX_DIR@/libvex_ppc32_linux.a: @VEX_DIR@/priv/main/vex_svnversion.h
	$(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \
	libvex_ppc32_linux.a \
	EXTRA_CFLAGS="$(AM_CFLAGS_PPC32_LINUX) @FLAG_WDECL_AFTER_STMT@ \
			@FLAG_FNO_STACK_PROTECTOR@"

@VEX_DIR@/libvex_ppc64_linux.a: @VEX_DIR@/priv/main/vex_svnversion.h
	$(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \
	libvex_ppc64_linux.a \
	EXTRA_CFLAGS="$(AM_CFLAGS_PPC64_LINUX) @FLAG_WDECL_AFTER_STMT@ \
			@FLAG_FNO_STACK_PROTECTOR@"

@VEX_DIR@/libvex_ppc32_aix5.a: @VEX_DIR@/priv/main/vex_svnversion.h
	$(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR) -X32" \
	libvex_ppc32_aix5.a \
	EXTRA_CFLAGS="$(AM_CFLAGS_PPC32_AIX5) @FLAG_WDECL_AFTER_STMT@ \
			@FLAG_FNO_STACK_PROTECTOR@"

@VEX_DIR@/libvex_ppc64_aix5.a: @VEX_DIR@/priv/main/vex_svnversion.h
	$(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR) -X64" \
	libvex_ppc64_aix5.a \
	EXTRA_CFLAGS="$(AM_CFLAGS_PPC64_AIX5) @FLAG_WDECL_AFTER_STMT@ \
			@FLAG_FNO_STACK_PROTECTOR@"

@VEX_DIR@/priv/main/vex_svnversion.h:
	$(MAKE) -C @VEX_DIR@ CC="$(CC)" version

TOOL_LDADD_COMMON = -lgcc
TOOL_LDFLAGS_COMMON_LINUX = -static \
	-Wl,-defsym,valt_load_address=@VALT_LOAD_ADDRESS@ \
	-nodefaultlibs -nostartfiles -u _start
TOOL_LDFLAGS_COMMON_AIX5 = -static -Wl,-e_start_valgrind


TOOL_LDADD_X86_LINUX = $(COREGRIND_LIBS_X86_LINUX) $(TOOL_LDADD_COMMON)
TOOL_LDFLAGS_X86_LINUX = \
	$(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ \
	-Wl,-T,$(top_builddir)/valt_load_address_x86_linux.lds

TOOL_LDADD_AMD64_LINUX = $(COREGRIND_LIBS_AMD64_LINUX) $(TOOL_LDADD_COMMON)
TOOL_LDFLAGS_AMD64_LINUX = \
	$(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ \
	-Wl,-T,$(top_builddir)/valt_load_address_amd64_linux.lds

TOOL_LDADD_PPC32_LINUX = $(COREGRIND_LIBS_PPC32_LINUX) $(TOOL_LDADD_COMMON)
TOOL_LDFLAGS_PPC32_LINUX = \
	$(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ \
	-Wl,-T,$(top_builddir)/valt_load_address_ppc32_linux.lds

TOOL_LDADD_PPC64_LINUX = $(COREGRIND_LIBS_PPC64_LINUX) $(TOOL_LDADD_COMMON)
TOOL_LDFLAGS_PPC64_LINUX = \
	$(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ \
	-Wl,-T,$(top_builddir)/valt_load_address_ppc64_linux.lds

TOOL_LDADD_PPC32_AIX5 = $(COREGRIND_LIBS_PPC32_AIX5) $(TOOL_LDADD_COMMON)
TOOL_LDFLAGS_PPC32_AIX5 = \
	$(TOOL_LDFLAGS_COMMON_AIX5) @FLAG_MAIX32@

TOOL_LDADD_PPC64_AIX5 = $(COREGRIND_LIBS_PPC64_AIX5) $(TOOL_LDADD_COMMON)
TOOL_LDFLAGS_PPC64_AIX5 = \
	$(TOOL_LDFLAGS_COMMON_AIX5) @FLAG_MAIX64@ -Wl,-bbigtoc

LIBREPLACEMALLOC_LDFLAGS_X86_LINUX = \
	-Wl,--whole-archive \
	$(LIBREPLACEMALLOC_X86_LINUX) \
	-Wl,--no-whole-archive
LIBREPLACEMALLOC_LDFLAGS_AMD64_LINUX = \
	-Wl,--whole-archive \
	$(LIBREPLACEMALLOC_AMD64_LINUX) \
	-Wl,--no-whole-archive
LIBREPLACEMALLOC_LDFLAGS_PPC32_LINUX = \
	-Wl,--whole-archive \
	$(LIBREPLACEMALLOC_PPC32_LINUX) \
	-Wl,--no-whole-archive
LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX = \
	-Wl,--whole-archive \
	$(LIBREPLACEMALLOC_PPC64_LINUX) \
	-Wl,--no-whole-archive
LIBREPLACEMALLOC_LDFLAGS_PPC32_AIX5 = \
	$(LIBREPLACEMALLOC_PPC32_AIX5)
LIBREPLACEMALLOC_LDFLAGS_PPC64_AIX5 = \
	$(LIBREPLACEMALLOC_PPC64_AIX5)