1 include $(top_srcdir)/Makefile.tool.am
3 EXTRA_DIST = docs/mc-manual.xml docs/mc-tech-docs.xml
5 #----------------------------------------------------------------------------
7 #----------------------------------------------------------------------------
15 #----------------------------------------------------------------------------
17 #----------------------------------------------------------------------------
19 noinst_PROGRAMS = memcheck-@VGCONF_ARCH_PRI@-@VGCONF_OS@
20 if VGCONF_HAVE_PLATFORM_SEC
21 noinst_PROGRAMS += memcheck-@VGCONF_ARCH_SEC@-@VGCONF_OS@
24 MEMCHECK_SOURCES_COMMON = \
26 mc_malloc_wrappers.c \
27 mc_main.c mc_main_asm.c \
32 memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES = \
33 $(MEMCHECK_SOURCES_COMMON)
34 memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CPPFLAGS = \
35 $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
36 memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = $(LTO_CFLAGS) \
37 $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -O2
38 memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_DEPENDENCIES = \
39 $(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_PRI_CAPS@)
40 memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDADD = \
41 $(TOOL_LDADD_@VGCONF_PLATFORM_PRI_CAPS@)
42 memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = \
43 $(TOOL_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
44 memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LINK = \
45 $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
46 @VALT_LOAD_ADDRESS_PRI@ \
48 $(memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS) \
49 $(memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS)
51 if VGCONF_HAVE_PLATFORM_SEC
52 memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_SOURCES = \
53 $(MEMCHECK_SOURCES_COMMON)
54 memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CPPFLAGS = \
55 $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
56 memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS = $(LTO_CFLAGS) \
57 $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -O2
58 memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_DEPENDENCIES = \
59 $(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_SEC_CAPS@)
60 memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDADD = \
61 $(TOOL_LDADD_@VGCONF_PLATFORM_SEC_CAPS@)
62 memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS = \
63 $(TOOL_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
64 memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LINK = \
65 $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
66 @VALT_LOAD_ADDRESS_SEC@ \
68 $(memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS) \
69 $(memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS)
72 #----------------------------------------------------------------------------
73 # vgpreload_memcheck-<platform>.so
74 #----------------------------------------------------------------------------
76 noinst_PROGRAMS += vgpreload_memcheck-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so
77 if VGCONF_HAVE_PLATFORM_SEC
78 noinst_PROGRAMS += vgpreload_memcheck-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so
81 if VGCONF_OS_IS_DARWIN
82 noinst_DSYMS = $(noinst_PROGRAMS)
85 # mc_replace_strmem.c runs on the simulated CPU, and is built with
86 # AM_CFLAGS_PSO_* (see $(top_srcdir)/Makefile.all.am).
87 VGPRELOAD_MEMCHECK_SOURCES_COMMON = mc_replace_strmem.c
89 vgpreload_memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES = \
90 $(VGPRELOAD_MEMCHECK_SOURCES_COMMON)
91 vgpreload_memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS = \
92 $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
93 vgpreload_memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CFLAGS = \
94 $(AM_CFLAGS_PSO_@VGCONF_PLATFORM_PRI_CAPS@) -O2
95 vgpreload_memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_DEPENDENCIES = \
96 $(LIBREPLACEMALLOC_@VGCONF_PLATFORM_PRI_CAPS@)
97 vgpreload_memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS = \
98 $(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) \
99 $(LIBREPLACEMALLOC_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
101 if VGCONF_HAVE_PLATFORM_SEC
102 vgpreload_memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES = \
103 $(VGPRELOAD_MEMCHECK_SOURCES_COMMON)
104 vgpreload_memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS = \
105 $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
106 vgpreload_memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CFLAGS = \
107 $(AM_CFLAGS_PSO_@VGCONF_PLATFORM_SEC_CAPS@) -O2
108 vgpreload_memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_DEPENDENCIES = \
109 $(LIBREPLACEMALLOC_@VGCONF_PLATFORM_SEC_CAPS@)
110 vgpreload_memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS = \
111 $(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) \
112 $(LIBREPLACEMALLOC_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)