blob: e042a6b6c0873bb1c0ba3a1686629b7cc7762cc9 [file] [log] [blame]
nethercote4388a402004-09-01 23:20:49 +00001include $(top_srcdir)/Makefile.tool.am
njn25e49d8e72002-09-23 09:36:25 +00002
njn29a5c012009-05-06 06:15:55 +00003SUBDIRS += perf
4
tomfb7bcde2005-11-07 15:24:38 +00005noinst_PROGRAMS =
njn7fd6d382009-01-22 21:56:32 +00006if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
tomfb7bcde2005-11-07 15:24:38 +00007noinst_PROGRAMS += memcheck-x86-linux vgpreload_memcheck-x86-linux.so
8endif
njn7fd6d382009-01-22 21:56:32 +00009if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
tomfb7bcde2005-11-07 15:24:38 +000010noinst_PROGRAMS += memcheck-amd64-linux vgpreload_memcheck-amd64-linux.so
11endif
njn7fd6d382009-01-22 21:56:32 +000012if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
tomfb7bcde2005-11-07 15:24:38 +000013noinst_PROGRAMS += memcheck-ppc32-linux vgpreload_memcheck-ppc32-linux.so
14endif
njn7fd6d382009-01-22 21:56:32 +000015if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
sewardj2c48c7b2005-11-29 13:05:56 +000016noinst_PROGRAMS += memcheck-ppc64-linux vgpreload_memcheck-ppc64-linux.so
17endif
njn7fd6d382009-01-22 21:56:32 +000018if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
sewardj1eff82b2006-10-17 00:56:43 +000019noinst_PROGRAMS += memcheck-ppc32-aix5 vgpreload_memcheck-ppc32-aix5.so
20endif
njn7fd6d382009-01-22 21:56:32 +000021if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
sewardj1eff82b2006-10-17 00:56:43 +000022noinst_PROGRAMS += memcheck-ppc64-aix5 vgpreload_memcheck-ppc64-aix5.so
23endif
sewardjde4a1d02002-03-22 01:27:54 +000024
njn1d0825f2006-03-27 11:37:07 +000025VGPRELOAD_MEMCHECK_SOURCES_COMMON = mc_replace_strmem.c
fitzhardinge98abfc72003-12-16 02:05:15 +000026
tomfb7bcde2005-11-07 15:24:38 +000027vgpreload_memcheck_x86_linux_so_SOURCES = $(VGPRELOAD_MEMCHECK_SOURCES_COMMON)
28vgpreload_memcheck_x86_linux_so_CPPFLAGS = $(AM_CPPFLAGS_X86_LINUX)
29vgpreload_memcheck_x86_linux_so_CFLAGS = $(AM_CFLAGS_X86_LINUX) $(AM_CFLAGS_PIC) -O2
30vgpreload_memcheck_x86_linux_so_CCASFLAGS = $(AM_CCASFLAGS_X86_LINUX)
31vgpreload_memcheck_x86_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_X86_LINUX)
32vgpreload_memcheck_x86_linux_so_LDFLAGS = \
33 $(PRELOAD_LDFLAGS_X86_LINUX) \
34 $(LIBREPLACEMALLOC_LDFLAGS_X86_LINUX)
sewardjde4a1d02002-03-22 01:27:54 +000035
tomfb7bcde2005-11-07 15:24:38 +000036vgpreload_memcheck_amd64_linux_so_SOURCES = $(VGPRELOAD_MEMCHECK_SOURCES_COMMON)
37vgpreload_memcheck_amd64_linux_so_CPPFLAGS = $(AM_CPPFLAGS_AMD64_LINUX)
38vgpreload_memcheck_amd64_linux_so_CFLAGS = $(AM_CFLAGS_AMD64_LINUX) $(AM_CFLAGS_PIC) -O2
39vgpreload_memcheck_amd64_linux_so_CCASFLAGS = $(AM_CCASFLAGS_AMD64_LINUX)
40vgpreload_memcheck_amd64_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_AMD64_LINUX)
41vgpreload_memcheck_amd64_linux_so_LDFLAGS = \
42 $(PRELOAD_LDFLAGS_AMD64_LINUX) \
43 $(LIBREPLACEMALLOC_LDFLAGS_AMD64_LINUX)
44
45vgpreload_memcheck_ppc32_linux_so_SOURCES = $(VGPRELOAD_MEMCHECK_SOURCES_COMMON)
46vgpreload_memcheck_ppc32_linux_so_CPPFLAGS = $(AM_CPPFLAGS_PPC32_LINUX)
47vgpreload_memcheck_ppc32_linux_so_CFLAGS = $(AM_CFLAGS_PPC32_LINUX) $(AM_CFLAGS_PIC) -O2
48vgpreload_memcheck_ppc32_linux_so_CCASFLAGS = $(AM_CCASFLAGS_PPC32_LINUX)
49vgpreload_memcheck_ppc32_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC32_LINUX)
50vgpreload_memcheck_ppc32_linux_so_LDFLAGS = \
51 $(PRELOAD_LDFLAGS_PPC32_LINUX) \
52 $(LIBREPLACEMALLOC_LDFLAGS_PPC32_LINUX)
53
sewardj2c48c7b2005-11-29 13:05:56 +000054vgpreload_memcheck_ppc64_linux_so_SOURCES = $(VGPRELOAD_MEMCHECK_SOURCES_COMMON)
55vgpreload_memcheck_ppc64_linux_so_CPPFLAGS = $(AM_CPPFLAGS_PPC64_LINUX)
56vgpreload_memcheck_ppc64_linux_so_CFLAGS = $(AM_CFLAGS_PPC64_LINUX) $(AM_CFLAGS_PIC) -O2
57vgpreload_memcheck_ppc64_linux_so_CCASFLAGS = $(AM_CCASFLAGS_PPC64_LINUX)
58vgpreload_memcheck_ppc64_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC64_LINUX)
59vgpreload_memcheck_ppc64_linux_so_LDFLAGS = \
60 $(PRELOAD_LDFLAGS_PPC64_LINUX) \
61 $(LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX)
62
sewardj1eff82b2006-10-17 00:56:43 +000063vgpreload_memcheck_ppc32_aix5_so_SOURCES = $(VGPRELOAD_MEMCHECK_SOURCES_COMMON)
64vgpreload_memcheck_ppc32_aix5_so_CPPFLAGS = $(AM_CPPFLAGS_PPC32_AIX5)
65vgpreload_memcheck_ppc32_aix5_so_CFLAGS = $(AM_CFLAGS_PPC32_AIX5) $(AM_CFLAGS_PIC) -O2
66vgpreload_memcheck_ppc32_aix5_so_CCASFLAGS = $(AM_CCASFLAGS_PPC32_AIX5)
67vgpreload_memcheck_ppc32_aix5_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC32_AIX5)
68vgpreload_memcheck_ppc32_aix5_so_LDFLAGS = \
69 $(PRELOAD_LDFLAGS_PPC32_AIX5) \
70 $(LIBREPLACEMALLOC_LDFLAGS_PPC32_AIX5)
71
72vgpreload_memcheck_ppc64_aix5_so_SOURCES = $(VGPRELOAD_MEMCHECK_SOURCES_COMMON)
73vgpreload_memcheck_ppc64_aix5_so_CPPFLAGS = $(AM_CPPFLAGS_PPC64_AIX5)
74vgpreload_memcheck_ppc64_aix5_so_CFLAGS = $(AM_CFLAGS_PPC64_AIX5) $(AM_CFLAGS_PIC) -O2
75vgpreload_memcheck_ppc64_aix5_so_CCASFLAGS = $(AM_CCASFLAGS_PPC64_AIX5)
76vgpreload_memcheck_ppc64_aix5_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC64_AIX5)
77vgpreload_memcheck_ppc64_aix5_so_LDFLAGS = \
78 $(PRELOAD_LDFLAGS_PPC64_AIX5) \
79 $(LIBREPLACEMALLOC_LDFLAGS_PPC64_AIX5)
80
tomfb7bcde2005-11-07 15:24:38 +000081MEMCHECK_SOURCES_COMMON = \
njn1d0825f2006-03-27 11:37:07 +000082 mc_leakcheck.c \
83 mc_malloc_wrappers.c \
njn86f12dc2005-03-14 01:16:05 +000084 mc_main.c \
sewardj7cf4e6b2008-05-01 20:24:26 +000085 mc_translate.c \
sewardj7ce71662008-05-02 10:33:15 +000086 mc_machine.c \
87 mc_errors.c
tomfb7bcde2005-11-07 15:24:38 +000088
89memcheck_x86_linux_SOURCES = $(MEMCHECK_SOURCES_COMMON)
90memcheck_x86_linux_CPPFLAGS = $(AM_CPPFLAGS_X86_LINUX)
91memcheck_x86_linux_CFLAGS = $(AM_CFLAGS_X86_LINUX) -O2
92memcheck_x86_linux_CCASFLAGS = $(AM_CCASFLAGS_X86_LINUX)
93memcheck_x86_linux_DEPENDENCIES = $(COREGRIND_LIBS_X86_LINUX)
94memcheck_x86_linux_LDADD = $(TOOL_LDADD_X86_LINUX)
95memcheck_x86_linux_LDFLAGS = $(TOOL_LDFLAGS_X86_LINUX)
96
97memcheck_amd64_linux_SOURCES = $(MEMCHECK_SOURCES_COMMON)
98memcheck_amd64_linux_CPPFLAGS = $(AM_CPPFLAGS_AMD64_LINUX)
99memcheck_amd64_linux_CFLAGS = $(AM_CFLAGS_AMD64_LINUX) -O2
100memcheck_amd64_linux_CCASFLAGS = $(AM_CCASFLAGS_AMD64_LINUX)
101memcheck_amd64_linux_DEPENDENCIES = $(COREGRIND_LIBS_AMD64_LINUX)
102memcheck_amd64_linux_LDADD = $(TOOL_LDADD_AMD64_LINUX)
103memcheck_amd64_linux_LDFLAGS = $(TOOL_LDFLAGS_AMD64_LINUX)
104
105memcheck_ppc32_linux_SOURCES = $(MEMCHECK_SOURCES_COMMON)
106memcheck_ppc32_linux_CPPFLAGS = $(AM_CPPFLAGS_PPC32_LINUX)
107memcheck_ppc32_linux_CFLAGS = $(AM_CFLAGS_PPC32_LINUX) -O2
108memcheck_ppc32_linux_CCASFLAGS = $(AM_CCASFLAGS_PPC32_LINUX)
109memcheck_ppc32_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_LINUX)
110memcheck_ppc32_linux_LDADD = $(TOOL_LDADD_PPC32_LINUX)
111memcheck_ppc32_linux_LDFLAGS = $(TOOL_LDFLAGS_PPC32_LINUX)
njn25e49d8e72002-09-23 09:36:25 +0000112
sewardj2c48c7b2005-11-29 13:05:56 +0000113memcheck_ppc64_linux_SOURCES = $(MEMCHECK_SOURCES_COMMON)
114memcheck_ppc64_linux_CPPFLAGS = $(AM_CPPFLAGS_PPC64_LINUX)
115memcheck_ppc64_linux_CFLAGS = $(AM_CFLAGS_PPC64_LINUX) -O2
116memcheck_ppc64_linux_CCASFLAGS = $(AM_CCASFLAGS_PPC64_LINUX)
117memcheck_ppc64_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC64_LINUX)
118memcheck_ppc64_linux_LDADD = $(TOOL_LDADD_PPC64_LINUX)
119memcheck_ppc64_linux_LDFLAGS = $(TOOL_LDFLAGS_PPC64_LINUX)
120
sewardj1eff82b2006-10-17 00:56:43 +0000121memcheck_ppc32_aix5_SOURCES = $(MEMCHECK_SOURCES_COMMON)
122memcheck_ppc32_aix5_CPPFLAGS = $(AM_CPPFLAGS_PPC32_AIX5)
123memcheck_ppc32_aix5_CFLAGS = $(AM_CFLAGS_PPC32_AIX5) -O2
124memcheck_ppc32_aix5_CCASFLAGS = $(AM_CCASFLAGS_PPC32_AIX5)
125memcheck_ppc32_aix5_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_AIX5)
126memcheck_ppc32_aix5_LDADD = $(TOOL_LDADD_PPC32_AIX5)
127memcheck_ppc32_aix5_LDFLAGS = $(TOOL_LDFLAGS_PPC32_AIX5)
128
129memcheck_ppc64_aix5_SOURCES = $(MEMCHECK_SOURCES_COMMON)
130memcheck_ppc64_aix5_CPPFLAGS = $(AM_CPPFLAGS_PPC64_AIX5)
131memcheck_ppc64_aix5_CFLAGS = $(AM_CFLAGS_PPC64_AIX5) -O2
132memcheck_ppc64_aix5_CCASFLAGS = $(AM_CCASFLAGS_PPC64_AIX5)
133memcheck_ppc64_aix5_DEPENDENCIES = $(COREGRIND_LIBS_PPC64_AIX5)
134memcheck_ppc64_aix5_LDADD = $(TOOL_LDADD_PPC64_AIX5)
135memcheck_ppc64_aix5_LDFLAGS = $(TOOL_LDFLAGS_PPC64_AIX5)
136
njn683c6ee2002-11-12 10:53:31 +0000137mcincludedir = $(includedir)/valgrind
138
139mcinclude_HEADERS = \
njn25cac76cb2002-09-23 11:21:57 +0000140 memcheck.h
sewardjde4a1d02002-03-22 01:27:54 +0000141
sewardjb4db4022002-12-08 22:19:04 +0000142noinst_HEADERS = \
njn683c6ee2002-11-12 10:53:31 +0000143 mc_include.h
144
njn1d0825f2006-03-27 11:37:07 +0000145mc_replace_strmem.o: CFLAGS += -fno-omit-frame-pointer
njn3e884182003-04-15 13:03:23 +0000146
sewardj23eb2fd2005-04-22 16:29:19 +0000147mc_main.o: CFLAGS += -fomit-frame-pointer