valgrind.h: Suppress client request code generation on x32
[valgrind.git] / memcheck / Makefile.am
blob476bc70dfa7954f6e561eeb26131c53a91a2979d
1 include $(top_srcdir)/Makefile.tool.am
3 EXTRA_DIST = docs/mc-manual.xml docs/mc-tech-docs.xml
5 #----------------------------------------------------------------------------
6 # Headers
7 #----------------------------------------------------------------------------
9 pkginclude_HEADERS = \
10         memcheck.h
12 noinst_HEADERS = \
13         mc_include.h
15 #----------------------------------------------------------------------------
16 # memcheck-<platform>
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@
22 endif
24 MEMCHECK_SOURCES_COMMON = \
25         mc_leakcheck.c \
26         mc_malloc_wrappers.c \
27         mc_main.c \
28         mc_translate.c \
29         mc_machine.c \
30         mc_errors.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       = \
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@ \
47         $(LINK) \
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       = \
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@ \
67         $(LINK) \
68         $(memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS) \
69         $(memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS)
70 endif
72 # mc_main.c contains the helper function for memcheck that get called
73 # all the time. To maximise performance compile with -fomit-frame-pointer
74 # Primary beneficiary is x86.
75 mc_main.o: CFLAGS += -fomit-frame-pointer
77 #----------------------------------------------------------------------------
78 # vgpreload_memcheck-<platform>.so
79 #----------------------------------------------------------------------------
81 noinst_PROGRAMS += vgpreload_memcheck-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so
82 if VGCONF_HAVE_PLATFORM_SEC
83 noinst_PROGRAMS += vgpreload_memcheck-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so
84 endif
86 if VGCONF_OS_IS_DARWIN
87 noinst_DSYMS = $(noinst_PROGRAMS)
88 endif
90 VGPRELOAD_MEMCHECK_SOURCES_COMMON = mc_replace_strmem.c
92 vgpreload_memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES      = \
93         $(VGPRELOAD_MEMCHECK_SOURCES_COMMON)
94 vgpreload_memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS     = \
95         $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
96 vgpreload_memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CFLAGS       = \
97         $(AM_CFLAGS_PSO_@VGCONF_PLATFORM_PRI_CAPS@) -O2
98 vgpreload_memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_DEPENDENCIES = \
99         $(LIBREPLACEMALLOC_@VGCONF_PLATFORM_PRI_CAPS@)
100 vgpreload_memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS      = \
101         $(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) \
102         $(LIBREPLACEMALLOC_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
104 if VGCONF_HAVE_PLATFORM_SEC
105 vgpreload_memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES      = \
106         $(VGPRELOAD_MEMCHECK_SOURCES_COMMON)
107 vgpreload_memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS     = \
108         $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
109 vgpreload_memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CFLAGS       = \
110         $(AM_CFLAGS_PSO_@VGCONF_PLATFORM_SEC_CAPS@) -O2
111 vgpreload_memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_DEPENDENCIES = \
112         $(LIBREPLACEMALLOC_@VGCONF_PLATFORM_SEC_CAPS@)
113 vgpreload_memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS      = \
114         $(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) \
115         $(LIBREPLACEMALLOC_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
116 endif
118 # mc_replace_strmem.c runs on the simulated CPU, and it often appears
119 # in stack traces shown to the user.  It is built with
120 # -fno-omit-frame-pointer so as to guarantee robust backtraces on x86,
121 # on which CFI based unwinding is not the "normal" case and so is
122 # sometimes fragile.
123 mc_replace_strmem.o: CFLAGS += -fno-omit-frame-pointer