blob: a9db374fa02fc99eca6aa195607b7fddadcb5c0d [file] [log] [blame]
nethercote4388a402004-09-01 23:20:49 +00001include $(top_srcdir)/Makefile.tool.am
njn25e49d8e72002-09-23 09:36:25 +00002
nethercote4388a402004-09-01 23:20:49 +00003## Build Memcheck at a higher optimisation level
4AM_CFLAGS += -O2
sewardjde4a1d02002-03-22 01:27:54 +00005
njn063c5402004-11-22 16:58:05 +00006val_PROGRAMS = vgtool_memcheck.so vgpreload_memcheck.so
fitzhardinge98abfc72003-12-16 02:05:15 +00007
8vgpreload_memcheck_so_SOURCES = \
9 mac_replace_strmem.c
njn717cde52005-05-10 02:47:21 +000010vgpreload_memcheck_so_DEPENDENCIES = \
11 $(LIBREPLACEMALLOC)
nethercote799fb802004-10-20 18:40:40 +000012vgpreload_memcheck_so_LDFLAGS = -shared -Wl,-z,interpose,-z,initfirst \
13 -Wl,--whole-archive \
njn717cde52005-05-10 02:47:21 +000014 $(LIBREPLACEMALLOC) \
nethercote799fb802004-10-20 18:40:40 +000015 -Wl,--no-whole-archive
sewardjde4a1d02002-03-22 01:27:54 +000016
njn063c5402004-11-22 16:58:05 +000017vgtool_memcheck_so_SOURCES = \
njn43c799e2003-04-08 00:08:52 +000018 mac_leakcheck.c \
njn3e884182003-04-15 13:03:23 +000019 mac_malloc_wrappers.c \
njn86f12dc2005-03-14 01:16:05 +000020 mc_main.c \
njn00cae242005-05-09 01:13:44 +000021 mac_shared.c \
njn39b4f012004-11-26 10:35:44 +000022 mc_translate.c
njn063c5402004-11-22 16:58:05 +000023vgtool_memcheck_so_LDFLAGS = -shared
njn25e49d8e72002-09-23 09:36:25 +000024
njn683c6ee2002-11-12 10:53:31 +000025mcincludedir = $(includedir)/valgrind
26
27mcinclude_HEADERS = \
njn25cac76cb2002-09-23 11:21:57 +000028 memcheck.h
sewardjde4a1d02002-03-22 01:27:54 +000029
sewardjb4db4022002-12-08 22:19:04 +000030noinst_HEADERS = \
njn43c799e2003-04-08 00:08:52 +000031 mac_shared.h \
njn683c6ee2002-11-12 10:53:31 +000032 mc_include.h
33
njn66fe05a2003-07-22 09:12:33 +000034mac_replace_strmem.o: CFLAGS += -fno-omit-frame-pointer
njn3e884182003-04-15 13:03:23 +000035
sewardj23eb2fd2005-04-22 16:29:19 +000036mc_main.o: CFLAGS += -fomit-frame-pointer