njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 1 | |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 2 | SUBDIRS = . tests docs |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 3 | |
njn | a63e2d7 | 2003-06-12 14:13:05 +0000 | [diff] [blame] | 4 | all_includes = -I$(top_srcdir)/include |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 5 | |
njn | a63e2d7 | 2003-06-12 14:13:05 +0000 | [diff] [blame] | 6 | AM_CPPFLAGS = $(all_includes) -DVG_LIBDIR="\"$(libdir)"\" |
fitzhardinge | 98abfc7 | 2003-12-16 02:05:15 +0000 | [diff] [blame] | 7 | AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -O2 -fomit-frame-pointer \ |
daywalker | f5ef185 | 2003-02-25 01:48:15 +0000 | [diff] [blame] | 8 | @PREFERRED_STACK_BOUNDARY@ -g |
njn | a63e2d7 | 2003-06-12 14:13:05 +0000 | [diff] [blame] | 9 | AM_CCASFLAGS = $(all_includes) |
daywalker | a0d3ab6 | 2002-04-21 13:32:28 +0000 | [diff] [blame] | 10 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 11 | valdir = $(libdir)/valgrind |
fitzhardinge | e3c6b6f | 2004-03-12 10:51:39 +0000 | [diff] [blame^] | 12 | inplacedir = $(top_builddir)/.in_place |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 13 | |
fitzhardinge | 98abfc7 | 2003-12-16 02:05:15 +0000 | [diff] [blame] | 14 | val_PROGRAMS = vgskin_memcheck.so vgpreload_memcheck.so |
15 | |||||
16 | vgpreload_memcheck_so_SOURCES = \ | ||||
17 | mac_replace_strmem.c | ||||
fitzhardinge | e3c6b6f | 2004-03-12 10:51:39 +0000 | [diff] [blame^] | 18 | vgpreload_memcheck_so_LDADD = $(top_builddir)/coregrind/vg_replace_malloc.o |
19 | vgpreload_memcheck_so_DEPENDENCIES = $(top_builddir)/coregrind/vg_replace_malloc.o | ||||
fitzhardinge | 98abfc7 | 2003-12-16 02:05:15 +0000 | [diff] [blame] | 20 | vgpreload_memcheck_so_LDFLAGS = -shared -Wl,-z,interpose,-z,initfirst |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 21 | |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 22 | vgskin_memcheck_so_SOURCES = \ |
njn | 43c799e | 2003-04-08 00:08:52 +0000 | [diff] [blame] | 23 | mac_leakcheck.c \ |
njn | 3e88418 | 2003-04-15 13:03:23 +0000 | [diff] [blame] | 24 | mac_malloc_wrappers.c \ |
njn | 43c799e | 2003-04-08 00:08:52 +0000 | [diff] [blame] | 25 | mac_needs.c \ |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 26 | mc_main.c \ |
27 | mc_clientreqs.c \ | ||||
28 | mc_errcontext.c \ | ||||
29 | mc_from_ucode.c \ | ||||
30 | mc_translate.c \ | ||||
31 | mc_helpers.S | ||||
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 32 | vgskin_memcheck_so_LDFLAGS = -shared |
33 | |||||
njn | 683c6ee | 2002-11-12 10:53:31 +0000 | [diff] [blame] | 34 | mcincludedir = $(includedir)/valgrind |
35 | |||||
36 | mcinclude_HEADERS = \ | ||||
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 37 | memcheck.h |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 38 | |
sewardj | b4db402 | 2002-12-08 22:19:04 +0000 | [diff] [blame] | 39 | noinst_HEADERS = \ |
njn | 43c799e | 2003-04-08 00:08:52 +0000 | [diff] [blame] | 40 | mac_shared.h \ |
sewardj | b4db402 | 2002-12-08 22:19:04 +0000 | [diff] [blame] | 41 | mc_constants.h \ |
njn | 683c6ee | 2002-11-12 10:53:31 +0000 | [diff] [blame] | 42 | mc_include.h |
43 | |||||
njn | 66fe05a | 2003-07-22 09:12:33 +0000 | [diff] [blame] | 44 | mac_replace_strmem.o: CFLAGS += -fno-omit-frame-pointer |
njn | 3e88418 | 2003-04-15 13:03:23 +0000 | [diff] [blame] | 45 | |
fitzhardinge | 98abfc7 | 2003-12-16 02:05:15 +0000 | [diff] [blame] | 46 | all-local: |
47 | mkdir -p $(inplacedir) | ||||
48 | -rm -f $(addprefix $(inplacedir)/,$(val_PROGRAMS)) | ||||
fitzhardinge | e3c6b6f | 2004-03-12 10:51:39 +0000 | [diff] [blame^] | 49 | ln -f -s $(addprefix $(top_builddir)/$(subdir)/,$(val_PROGRAMS)) $(inplacedir) |