blob: 6bcbfedc093b287ead54ecc51f166e4ec5fbb695 [file] [log] [blame]
nethercote4388a402004-09-01 23:20:49 +00001
nethercote4388a402004-09-01 23:20:49 +00002SUBDIRS = . tests docs
3
nethercoteb35a8b92004-09-11 16:45:27 +00004include $(top_srcdir)/Makefile.all.am
njnb7fda4c2009-02-06 04:05:43 +00005include $(top_srcdir)/Makefile.flags.am
tomfb7bcde2005-11-07 15:24:38 +00006include $(top_srcdir)/Makefile.install.am
njn717cde52005-05-10 02:47:21 +00007
njnb7fda4c2009-02-06 04:05:43 +00008
tomfb7bcde2005-11-07 15:24:38 +00009LIBREPLACEMALLOC_X86_LINUX = \
10 $(top_builddir)/coregrind/libreplacemalloc_toolpreload_x86_linux.a
sewardj45f4e7c2005-09-27 19:20:21 +000011
tomfb7bcde2005-11-07 15:24:38 +000012LIBREPLACEMALLOC_AMD64_LINUX = \
13 $(top_builddir)/coregrind/libreplacemalloc_toolpreload_amd64_linux.a
14
15LIBREPLACEMALLOC_PPC32_LINUX = \
16 $(top_builddir)/coregrind/libreplacemalloc_toolpreload_ppc32_linux.a
17
sewardj2c48c7b2005-11-29 13:05:56 +000018LIBREPLACEMALLOC_PPC64_LINUX = \
19 $(top_builddir)/coregrind/libreplacemalloc_toolpreload_ppc64_linux.a
20
sewardj1eff82b2006-10-17 00:56:43 +000021LIBREPLACEMALLOC_PPC32_AIX5 = \
22 $(top_builddir)/coregrind/libreplacemalloc_toolpreload_ppc32_aix5.a
23
24LIBREPLACEMALLOC_PPC64_AIX5 = \
25 $(top_builddir)/coregrind/libreplacemalloc_toolpreload_ppc64_aix5.a
26
njnb7fda4c2009-02-06 04:05:43 +000027
tomfb7bcde2005-11-07 15:24:38 +000028COREGRIND_LIBS_X86_LINUX = \
29 $(top_builddir)/coregrind/libcoregrind_x86_linux.a \
30 @VEX_DIR@/libvex_x86_linux.a
31
32COREGRIND_LIBS_AMD64_LINUX = \
33 $(top_builddir)/coregrind/libcoregrind_amd64_linux.a \
34 @VEX_DIR@/libvex_amd64_linux.a
35
36COREGRIND_LIBS_PPC32_LINUX = \
37 $(top_builddir)/coregrind/libcoregrind_ppc32_linux.a \
38 @VEX_DIR@/libvex_ppc32_linux.a
sewardj45f4e7c2005-09-27 19:20:21 +000039
sewardj2c48c7b2005-11-29 13:05:56 +000040COREGRIND_LIBS_PPC64_LINUX = \
41 $(top_builddir)/coregrind/libcoregrind_ppc64_linux.a \
42 @VEX_DIR@/libvex_ppc64_linux.a
43
sewardj1eff82b2006-10-17 00:56:43 +000044COREGRIND_LIBS_PPC32_AIX5 = \
45 $(top_builddir)/coregrind/libcoregrind_ppc32_aix5.a \
46 @VEX_DIR@/libvex_ppc32_aix5.a
47
48COREGRIND_LIBS_PPC64_AIX5 = \
49 $(top_builddir)/coregrind/libcoregrind_ppc64_aix5.a \
50 @VEX_DIR@/libvex_ppc64_aix5.a
51
njnb7fda4c2009-02-06 04:05:43 +000052
sewardj45f4e7c2005-09-27 19:20:21 +000053##.PHONY: @VEX_DIR@/libvex.a
54
tomfb7bcde2005-11-07 15:24:38 +000055@VEX_DIR@/libvex_x86_linux.a: @VEX_DIR@/priv/main/vex_svnversion.h
sewardj1eff82b2006-10-17 00:56:43 +000056 $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \
57 libvex_x86_linux.a \
sewardja72c26d2007-05-01 13:44:08 +000058 EXTRA_CFLAGS="$(AM_CFLAGS_X86_LINUX) @FLAG_WDECL_AFTER_STMT@ \
59 @FLAG_FNO_STACK_PROTECTOR@"
tomfb7bcde2005-11-07 15:24:38 +000060
61@VEX_DIR@/libvex_amd64_linux.a: @VEX_DIR@/priv/main/vex_svnversion.h
sewardj1eff82b2006-10-17 00:56:43 +000062 $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \
63 libvex_amd64_linux.a \
sewardja72c26d2007-05-01 13:44:08 +000064 EXTRA_CFLAGS="$(AM_CFLAGS_AMD64_LINUX) @FLAG_WDECL_AFTER_STMT@ \
65 @FLAG_FNO_STACK_PROTECTOR@"
tomfb7bcde2005-11-07 15:24:38 +000066
67@VEX_DIR@/libvex_ppc32_linux.a: @VEX_DIR@/priv/main/vex_svnversion.h
sewardj1eff82b2006-10-17 00:56:43 +000068 $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \
69 libvex_ppc32_linux.a \
sewardja72c26d2007-05-01 13:44:08 +000070 EXTRA_CFLAGS="$(AM_CFLAGS_PPC32_LINUX) @FLAG_WDECL_AFTER_STMT@ \
71 @FLAG_FNO_STACK_PROTECTOR@"
sewardj45f4e7c2005-09-27 19:20:21 +000072
sewardj2c48c7b2005-11-29 13:05:56 +000073@VEX_DIR@/libvex_ppc64_linux.a: @VEX_DIR@/priv/main/vex_svnversion.h
sewardj1eff82b2006-10-17 00:56:43 +000074 $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" \
75 libvex_ppc64_linux.a \
sewardja72c26d2007-05-01 13:44:08 +000076 EXTRA_CFLAGS="$(AM_CFLAGS_PPC64_LINUX) @FLAG_WDECL_AFTER_STMT@ \
77 @FLAG_FNO_STACK_PROTECTOR@"
sewardj2c48c7b2005-11-29 13:05:56 +000078
sewardj1eff82b2006-10-17 00:56:43 +000079@VEX_DIR@/libvex_ppc32_aix5.a: @VEX_DIR@/priv/main/vex_svnversion.h
80 $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR) -X32" \
81 libvex_ppc32_aix5.a \
sewardja72c26d2007-05-01 13:44:08 +000082 EXTRA_CFLAGS="$(AM_CFLAGS_PPC32_AIX5) @FLAG_WDECL_AFTER_STMT@ \
83 @FLAG_FNO_STACK_PROTECTOR@"
sewardj1eff82b2006-10-17 00:56:43 +000084
85@VEX_DIR@/libvex_ppc64_aix5.a: @VEX_DIR@/priv/main/vex_svnversion.h
86 $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR) -X64" \
87 libvex_ppc64_aix5.a \
sewardja72c26d2007-05-01 13:44:08 +000088 EXTRA_CFLAGS="$(AM_CFLAGS_PPC64_AIX5) @FLAG_WDECL_AFTER_STMT@ \
89 @FLAG_FNO_STACK_PROTECTOR@"
sewardj1eff82b2006-10-17 00:56:43 +000090
sewardj45f4e7c2005-09-27 19:20:21 +000091@VEX_DIR@/priv/main/vex_svnversion.h:
92 $(MAKE) -C @VEX_DIR@ CC="$(CC)" version
93
njnb7fda4c2009-02-06 04:05:43 +000094
tomfb7bcde2005-11-07 15:24:38 +000095TOOL_LDADD_COMMON = -lgcc
sewardj1eff82b2006-10-17 00:56:43 +000096TOOL_LDFLAGS_COMMON_LINUX = -static \
sewardj45f4e7c2005-09-27 19:20:21 +000097 -Wl,-defsym,valt_load_address=@VALT_LOAD_ADDRESS@ \
sewardj45f4e7c2005-09-27 19:20:21 +000098 -nodefaultlibs -nostartfiles -u _start
sewardj1eff82b2006-10-17 00:56:43 +000099TOOL_LDFLAGS_COMMON_AIX5 = -static -Wl,-e_start_valgrind
100
njn717cde52005-05-10 02:47:21 +0000101
tomfb7bcde2005-11-07 15:24:38 +0000102TOOL_LDADD_X86_LINUX = $(COREGRIND_LIBS_X86_LINUX) $(TOOL_LDADD_COMMON)
103TOOL_LDFLAGS_X86_LINUX = \
sewardj1eff82b2006-10-17 00:56:43 +0000104 $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ \
tomfb7bcde2005-11-07 15:24:38 +0000105 -Wl,-T,$(top_builddir)/valt_load_address_x86_linux.lds
106
107TOOL_LDADD_AMD64_LINUX = $(COREGRIND_LIBS_AMD64_LINUX) $(TOOL_LDADD_COMMON)
108TOOL_LDFLAGS_AMD64_LINUX = \
sewardj1eff82b2006-10-17 00:56:43 +0000109 $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ \
tomfb7bcde2005-11-07 15:24:38 +0000110 -Wl,-T,$(top_builddir)/valt_load_address_amd64_linux.lds
111
112TOOL_LDADD_PPC32_LINUX = $(COREGRIND_LIBS_PPC32_LINUX) $(TOOL_LDADD_COMMON)
113TOOL_LDFLAGS_PPC32_LINUX = \
sewardj1eff82b2006-10-17 00:56:43 +0000114 $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ \
tomfb7bcde2005-11-07 15:24:38 +0000115 -Wl,-T,$(top_builddir)/valt_load_address_ppc32_linux.lds
116
sewardj2c48c7b2005-11-29 13:05:56 +0000117TOOL_LDADD_PPC64_LINUX = $(COREGRIND_LIBS_PPC64_LINUX) $(TOOL_LDADD_COMMON)
118TOOL_LDFLAGS_PPC64_LINUX = \
sewardj1eff82b2006-10-17 00:56:43 +0000119 $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ \
sewardj2c48c7b2005-11-29 13:05:56 +0000120 -Wl,-T,$(top_builddir)/valt_load_address_ppc64_linux.lds
121
sewardj1eff82b2006-10-17 00:56:43 +0000122TOOL_LDADD_PPC32_AIX5 = $(COREGRIND_LIBS_PPC32_AIX5) $(TOOL_LDADD_COMMON)
123TOOL_LDFLAGS_PPC32_AIX5 = \
124 $(TOOL_LDFLAGS_COMMON_AIX5) @FLAG_MAIX32@
125
126TOOL_LDADD_PPC64_AIX5 = $(COREGRIND_LIBS_PPC64_AIX5) $(TOOL_LDADD_COMMON)
127TOOL_LDFLAGS_PPC64_AIX5 = \
128 $(TOOL_LDFLAGS_COMMON_AIX5) @FLAG_MAIX64@ -Wl,-bbigtoc
tomfb7bcde2005-11-07 15:24:38 +0000129
130LIBREPLACEMALLOC_LDFLAGS_X86_LINUX = \
131 -Wl,--whole-archive \
132 $(LIBREPLACEMALLOC_X86_LINUX) \
133 -Wl,--no-whole-archive
njnb7fda4c2009-02-06 04:05:43 +0000134
tomfb7bcde2005-11-07 15:24:38 +0000135LIBREPLACEMALLOC_LDFLAGS_AMD64_LINUX = \
136 -Wl,--whole-archive \
137 $(LIBREPLACEMALLOC_AMD64_LINUX) \
138 -Wl,--no-whole-archive
njnb7fda4c2009-02-06 04:05:43 +0000139
tomfb7bcde2005-11-07 15:24:38 +0000140LIBREPLACEMALLOC_LDFLAGS_PPC32_LINUX = \
141 -Wl,--whole-archive \
142 $(LIBREPLACEMALLOC_PPC32_LINUX) \
143 -Wl,--no-whole-archive
njnb7fda4c2009-02-06 04:05:43 +0000144
sewardj2c48c7b2005-11-29 13:05:56 +0000145LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX = \
146 -Wl,--whole-archive \
147 $(LIBREPLACEMALLOC_PPC64_LINUX) \
148 -Wl,--no-whole-archive
njnb7fda4c2009-02-06 04:05:43 +0000149
sewardj1eff82b2006-10-17 00:56:43 +0000150LIBREPLACEMALLOC_LDFLAGS_PPC32_AIX5 = \
151 $(LIBREPLACEMALLOC_PPC32_AIX5)
njnb7fda4c2009-02-06 04:05:43 +0000152
sewardj1eff82b2006-10-17 00:56:43 +0000153LIBREPLACEMALLOC_LDFLAGS_PPC64_AIX5 = \
154 $(LIBREPLACEMALLOC_PPC64_AIX5)
njn3e653402009-02-06 07:12:57 +0000155
156
njnac31b052009-02-12 00:30:02 +0000157all-local: inplace-noinst_PROGRAMS
158
159install-exec-local: install-noinst_PROGRAMS
160