1 include $(top_srcdir)/Makefile.tool.am 2 3 SUBDIRS += perf 4 5 EXTRA_DIST = docs/mc-manual.xml docs/mc-tech-docs.xml 6 7 #---------------------------------------------------------------------------- 8 # Headers 9 #---------------------------------------------------------------------------- 10 11 pkginclude_HEADERS = \ 12 memcheck.h 13 14 noinst_HEADERS = \ 15 mc_include.h 16 17 #---------------------------------------------------------------------------- 18 # memcheck-<platform> 19 #---------------------------------------------------------------------------- 20 21 noinst_PROGRAMS = memcheck-@VGCONF_ARCH_PRI@-@VGCONF_OS@ 22 if VGCONF_HAVE_PLATFORM_SEC 23 noinst_PROGRAMS += memcheck-@VGCONF_ARCH_SEC@-@VGCONF_OS@ 24 endif 25 26 MEMCHECK_SOURCES_COMMON = \ 27 mc_leakcheck.c \ 28 mc_malloc_wrappers.c \ 29 mc_main.c \ 30 mc_translate.c \ 31 mc_machine.c \ 32 mc_errors.c 33 34 memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES = \ 35 $(MEMCHECK_SOURCES_COMMON) 36 memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CPPFLAGS = \ 37 $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) 38 memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = \ 39 $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -O2 40 memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_DEPENDENCIES = \ 41 $(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_PRI_CAPS@) 42 memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDADD = \ 43 $(TOOL_LDADD_@VGCONF_PLATFORM_PRI_CAPS@) 44 memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = \ 45 $(TOOL_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) 46 memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LINK = \ 47 $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \ 48 @VALT_LOAD_ADDRESS_PRI@ \ 49 $(LINK) \ 50 $(memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS) \ 51 $(memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS) 52 53 if VGCONF_HAVE_PLATFORM_SEC 54 memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_SOURCES = \ 55 $(MEMCHECK_SOURCES_COMMON) 56 memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CPPFLAGS = \ 57 $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) 58 memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS = \ 59 $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -O2 60 memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_DEPENDENCIES = \ 61 $(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_SEC_CAPS@) 62 memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDADD = \ 63 $(TOOL_LDADD_@VGCONF_PLATFORM_SEC_CAPS@) 64 memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS = \ 65 $(TOOL_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) 66 memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LINK = \ 67 $(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \ 68 @VALT_LOAD_ADDRESS_SEC@ \ 69 $(LINK) \ 70 $(memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS) \ 71 $(memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS) 72 endif 73 74 mc_main.o: CFLAGS += -fomit-frame-pointer 75 76 #---------------------------------------------------------------------------- 77 # vgpreload_memcheck-<platform>.so 78 #---------------------------------------------------------------------------- 79 80 noinst_PROGRAMS += vgpreload_memcheck-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so 81 if VGCONF_HAVE_PLATFORM_SEC 82 noinst_PROGRAMS += vgpreload_memcheck-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so 83 endif 84 85 if VGCONF_OS_IS_DARWIN 86 noinst_DSYMS = $(noinst_PROGRAMS) 87 endif 88 89 VGPRELOAD_MEMCHECK_SOURCES_COMMON = mc_replace_strmem.c 90 91 vgpreload_memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES = \ 92 $(VGPRELOAD_MEMCHECK_SOURCES_COMMON) 93 vgpreload_memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS = \ 94 $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) 95 vgpreload_memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CFLAGS = \ 96 $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(AM_CFLAGS_PIC) -O2 97 vgpreload_memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_DEPENDENCIES = \ 98 $(LIBREPLACEMALLOC_@VGCONF_PLATFORM_PRI_CAPS@) 99 vgpreload_memcheck_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS = \ 100 $(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) \ 101 $(LIBREPLACEMALLOC_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) 102 103 if VGCONF_HAVE_PLATFORM_SEC 104 vgpreload_memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES = \ 105 $(VGPRELOAD_MEMCHECK_SOURCES_COMMON) 106 vgpreload_memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS = \ 107 $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) 108 vgpreload_memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CFLAGS = \ 109 $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(AM_CFLAGS_PIC) -O2 110 vgpreload_memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_DEPENDENCIES = \ 111 $(LIBREPLACEMALLOC_@VGCONF_PLATFORM_SEC_CAPS@) 112 vgpreload_memcheck_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS = \ 113 $(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) \ 114 $(LIBREPLACEMALLOC_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) 115 endif 116 117 mc_replace_strmem.o: CFLAGS += -fno-omit-frame-pointer 118 119