blob: 3f989ebf0d9a69ba3dea91c574328debf3f78150 [file] [log] [blame]
njna5f1bcd2004-11-27 16:47:42 +00001SUBDIRS = ${VG_ARCH} .
2DIST_SUBDIRS = ${VG_ARCH_ALL} .
njn25e49d8e72002-09-23 09:36:25 +00003
njnd0eab5f2003-09-30 16:52:47 +00004noinst_SCRIPTS = filter_allocs filter_leak_check_size \
nethercote4a02e1e2004-10-20 11:43:01 +00005 filter_stderr filter_stderr_backtrace
daywalker677e0612003-04-24 00:40:38 +00006
nethercote75a8c982004-11-11 19:03:34 +00007noinst_HEADERS = scalar.h
8
njna63e2d72003-06-12 14:13:05 +00009EXTRA_DIST = $(noinst_SCRIPTS) \
sewardjb5f6f512005-03-10 23:59:00 +000010 addressable.stderr.exp addressable.stdout.exp addressable.vgtest \
njnd8ced862003-04-08 00:47:05 +000011 badaddrvalue.stderr.exp \
njn254d542432002-09-23 16:09:39 +000012 badaddrvalue.stdout.exp badaddrvalue.vgtest \
13 badfree-2trace.stderr.exp badfree-2trace.vgtest \
14 badfree.stderr.exp badfree.vgtest \
15 badjump.stderr.exp badjump.vgtest \
nethercote4d714382004-10-13 09:47:24 +000016 badjump2.stderr.exp badjump2.vgtest \
njn254d542432002-09-23 16:09:39 +000017 badloop.stderr.exp badloop.vgtest \
nethercoteeb0592d2004-11-05 12:02:27 +000018 badpoll.stderr.exp badpoll.vgtest \
njnc2699f62003-09-05 23:29:33 +000019 badrw.stderr.exp badrw.vgtest \
njn7360f8e2003-09-04 20:57:51 +000020 brk.stderr.exp brk.vgtest \
nethercotece471262004-08-25 13:43:44 +000021 brk2.stderr.exp brk2.vgtest \
njnd8ced862003-04-08 00:47:05 +000022 buflen_check.stderr.exp buflen_check.vgtest \
23 clientperm.stderr.exp \
njn4d5490d2002-10-04 14:16:38 +000024 clientperm.stdout.exp clientperm.vgtest \
njn10785452003-05-20 16:38:24 +000025 custom_alloc.stderr.exp custom_alloc.vgtest \
sewardjb5f6f512005-03-10 23:59:00 +000026 describe-block.stderr.exp describe-block.vgtest \
njn254d542432002-09-23 16:09:39 +000027 doublefree.stderr.exp doublefree.vgtest \
njn1140b242003-04-22 20:58:02 +000028 error_counts.stderr.exp error_counts.stdout.exp error_counts.vgtest \
njn254d542432002-09-23 16:09:39 +000029 errs1.stderr.exp errs1.vgtest \
30 exitprog.stderr.exp exitprog.vgtest \
nethercotea81e9162004-02-12 14:34:14 +000031 execve.stderr.exp execve.vgtest \
nethercotef6a1d502004-08-09 12:21:57 +000032 execve2.stderr.exp execve2.vgtest \
njn254d542432002-09-23 16:09:39 +000033 fprw.stderr.exp fprw.vgtest \
34 fwrite.stderr.exp fwrite.stdout.exp fwrite.vgtest \
35 inits.stderr.exp inits.vgtest \
36 inline.stderr.exp inline.stdout.exp inline.vgtest \
sewardjb5f6f512005-03-10 23:59:00 +000037 leak-0.vgtest leak-0.stderr.exp \
38 leak-cycle.vgtest leak-cycle.stderr.exp \
39 leak-tree.vgtest leak-tree.stderr.exp \
40 leak-regroot.vgtest leak-regroot.stderr.exp \
41 leakotron.vgtest leakotron.stdout.exp leakotron.stderr.exp \
njn254d542432002-09-23 16:09:39 +000042 malloc1.stderr.exp malloc1.vgtest \
43 malloc2.stderr.exp malloc2.vgtest \
njn3e884182003-04-15 13:03:23 +000044 malloc3.stderr.exp malloc3.stdout.exp malloc3.vgtest \
njn254d542432002-09-23 16:09:39 +000045 manuel1.stderr.exp manuel1.stdout.exp manuel1.vgtest \
46 manuel2.stderr.exp manuel2.stdout.exp manuel2.vgtest \
47 manuel3.stderr.exp manuel3.vgtest \
njn499eaad2005-03-11 05:05:50 +000048 match-overrun.stderr.exp match-overrun.vgtest match-overrun.supp \
njn254d542432002-09-23 16:09:39 +000049 memalign_test.stderr.exp memalign_test.vgtest \
nethercote2d5b8162004-08-11 09:40:52 +000050 memalign2.stderr.exp memalign2.vgtest \
njn254d542432002-09-23 16:09:39 +000051 memcmptest.stderr.exp memcmptest.stdout.exp memcmptest.vgtest \
rjwalshbc0bb832004-06-19 18:12:36 +000052 mempool.stderr.exp mempool.vgtest \
njn254d542432002-09-23 16:09:39 +000053 mismatches.stderr.exp mismatches.vgtest \
54 mmaptest.stderr.exp mmaptest.vgtest \
55 nanoleak.stderr.exp nanoleak.vgtest \
njn3e884182003-04-15 13:03:23 +000056 nanoleak_supp.stderr.exp nanoleak_supp.vgtest nanoleak.supp \
njn32a17d12003-10-10 11:01:44 +000057 new_nothrow.stderr.exp new_nothrow.vgtest \
nethercoteea169c02004-07-18 12:05:37 +000058 new_override.stderr.exp new_override.stdout.exp new_override.vgtest \
njn0c5fac82003-05-02 16:19:10 +000059 null_socket.stderr.exp null_socket.vgtest \
sewardjea5cf542003-07-16 19:03:10 +000060 overlap.stderr.exp overlap.stdout.exp overlap.vgtest \
sewardjb5f6f512005-03-10 23:59:00 +000061 pointer-trace.vgtest pointer-trace.stdout.exp pointer-trace.stderr.exp \
62 post-syscall.stderr.exp post-syscall.stdout.exp post-syscall.vgtest \
njn254d542432002-09-23 16:09:39 +000063 realloc1.stderr.exp realloc1.vgtest \
64 realloc2.stderr.exp realloc2.vgtest \
njn398044f2003-07-24 17:39:59 +000065 realloc3.stderr.exp realloc3.vgtest \
nethercote9b9b74b2004-11-15 16:11:20 +000066 scalar.stderr.exp scalar.vgtest \
nethercote75a8c982004-11-11 19:03:34 +000067 scalar_fork.stderr.exp scalar_fork.vgtest \
nethercote9b9b74b2004-11-15 16:11:20 +000068 scalar_exit_group.stderr.exp scalar_exit_group.vgtest \
nethercote8b305af2004-11-14 17:58:27 +000069 scalar_supp.stderr.exp scalar_supp.vgtest scalar_supp.supp \
nethercote2b0cae62004-11-12 14:57:34 +000070 scalar_vfork.stderr.exp scalar_vfork.vgtest \
njn254d542432002-09-23 16:09:39 +000071 sigaltstack.stderr.exp sigaltstack.vgtest \
nethercote7fbe08a2004-11-15 19:03:27 +000072 signal2.stderr.exp signal2.stdout.exp signal2.vgtest \
73 sigprocmask.stderr.exp sigprocmask.vgtest \
nethercoted91ea072004-11-07 10:58:19 +000074 str_tester.stderr.exp str_tester.vgtest \
njn254d542432002-09-23 16:09:39 +000075 supp1.stderr.exp supp1.vgtest \
76 supp2.stderr.exp supp2.vgtest \
77 supp.supp \
78 suppfree.stderr.exp suppfree.vgtest \
nethercote57e36b32004-07-10 14:56:28 +000079 toobig-allocs.stderr.exp toobig-allocs.vgtest \
njn254d542432002-09-23 16:09:39 +000080 trivialleak.stderr.exp trivialleak.vgtest \
sewardj51a9fe12003-07-07 00:03:52 +000081 weirdioctl.stderr.exp weirdioctl.stdout.exp weirdioctl.vgtest \
sewardj58bef2e2003-07-13 11:13:37 +000082 metadata.stderr.exp metadata.stdout.exp metadata.vgtest \
njnaca67c52003-09-04 21:57:45 +000083 threadederrno.stderr.exp threadederrno.stdout.exp \
84 threadederrno.vgtest \
nethercotee65e47b2004-10-14 08:38:06 +000085 vgtest_ume.stderr.exp vgtest_ume.vgtest \
sewardjce7ec7d2005-03-16 13:10:44 +000086 writev.stderr.exp writev.stderr.exp2 writev.stderr.exp3 writev.vgtest \
thughesd41cd6c2004-10-13 16:48:21 +000087 zeropage.stderr.exp zeropage.stderr.exp2 zeropage.vgtest
njn254d542432002-09-23 16:09:39 +000088
daywalkerc42d8bc2003-04-17 17:00:43 +000089check_PROGRAMS = \
sewardjb5f6f512005-03-10 23:59:00 +000090 addressable \
nethercote4d714382004-10-13 09:47:24 +000091 badaddrvalue badfree badjump badjump2 \
nethercoteeb0592d2004-11-05 12:02:27 +000092 badloop badpoll badrw brk brk2 buflen_check \
njn7360f8e2003-09-04 20:57:51 +000093 clientperm custom_alloc \
sewardjb5f6f512005-03-10 23:59:00 +000094 describe-block \
nethercotef6a1d502004-08-09 12:21:57 +000095 doublefree error_counts errs1 exitprog execve execve2 \
nethercote4a02e1e2004-10-20 11:43:01 +000096 fprw fwrite hello inits inline \
sewardjb5f6f512005-03-10 23:59:00 +000097 leak-0 leak-cycle leak-tree leak-regroot leakotron \
njn3e884182003-04-15 13:03:23 +000098 malloc1 malloc2 malloc3 manuel1 manuel2 manuel3 \
njn499eaad2005-03-11 05:05:50 +000099 match-overrun \
nethercote2d5b8162004-08-11 09:40:52 +0000100 memalign_test memalign2 memcmptest mempool mmaptest \
101 nanoleak new_nothrow \
nethercote4a02e1e2004-10-20 11:43:01 +0000102 null_socket overlap \
sewardjb5f6f512005-03-10 23:59:00 +0000103 pointer-trace \
104 post-syscall \
nethercote8b305af2004-11-14 17:58:27 +0000105 realloc1 realloc2 realloc3 \
nethercote9b9b74b2004-11-15 16:11:20 +0000106 scalar scalar_exit_group scalar_fork scalar_supp scalar_vfork \
nethercote7fbe08a2004-11-15 19:03:27 +0000107 sigaltstack signal2 sigprocmask \
nethercoted91ea072004-11-07 10:58:19 +0000108 str_tester supp1 supp2 suppfree \
nethercote4a02e1e2004-10-20 11:43:01 +0000109 trivialleak weirdioctl \
nethercotee65e47b2004-10-14 08:38:06 +0000110 mismatches new_override metadata threadederrno \
111 vgtest_ume \
112 writev zeropage
113
njn25e49d8e72002-09-23 09:36:25 +0000114
sewardjb5f6f512005-03-10 23:59:00 +0000115AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_builddir)/include -I@VEX_DIR@/pub
daywalkerc42d8bc2003-04-17 17:00:43 +0000116AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g
117AM_CXXFLAGS = $(AM_CFLAGS)
njn25e49d8e72002-09-23 09:36:25 +0000118
119# C ones
sewardjb5f6f512005-03-10 23:59:00 +0000120addressable_SOURCES = addressable.c
njn25e49d8e72002-09-23 09:36:25 +0000121badaddrvalue_SOURCES = badaddrvalue.c
122badfree_SOURCES = badfree.c
123badjump_SOURCES = badjump.c
nethercote4d714382004-10-13 09:47:24 +0000124badjump2_SOURCES = badjump2.c
njn25e49d8e72002-09-23 09:36:25 +0000125badloop_SOURCES = badloop.c
nethercoteeb0592d2004-11-05 12:02:27 +0000126badpoll_SOURCES = badpoll.c
njnc2699f62003-09-05 23:29:33 +0000127badrw_SOURCES = badrw.c
njn7360f8e2003-09-04 20:57:51 +0000128brk_SOURCES = brk.c
nethercotece471262004-08-25 13:43:44 +0000129brk2_SOURCES = brk2.c
njn25e49d8e72002-09-23 09:36:25 +0000130buflen_check_SOURCES = buflen_check.c
njn4d5490d2002-10-04 14:16:38 +0000131clientperm_SOURCES = clientperm.c
njn10785452003-05-20 16:38:24 +0000132custom_alloc_SOURCES = custom_alloc.c
sewardjb5f6f512005-03-10 23:59:00 +0000133describe_block_SOURCES = describe-block.c
njn25e49d8e72002-09-23 09:36:25 +0000134doublefree_SOURCES = doublefree.c
njn47363ab2003-04-21 13:24:40 +0000135error_counts_SOURCES = error_counts.c
njn25e49d8e72002-09-23 09:36:25 +0000136errs1_SOURCES = errs1.c
nethercotea81e9162004-02-12 14:34:14 +0000137execve_SOURCES = execve.c
nethercotef6a1d502004-08-09 12:21:57 +0000138execve2_SOURCES = execve2.c
njn25e49d8e72002-09-23 09:36:25 +0000139exitprog_SOURCES = exitprog.c
140fprw_SOURCES = fprw.c
141fwrite_SOURCES = fwrite.c
142inits_SOURCES = inits.c
143inline_SOURCES = inline.c
sewardjb5f6f512005-03-10 23:59:00 +0000144leak_0_SOURCES = leak-0.c
145leak_cycle_SOURCES = leak-cycle.c
146leak_tree_SOURCES = leak-tree.c
147leak_regroot_SOURCES = leak-regroot.c
148leakotron_SOURCES = leakotron.c
njn25e49d8e72002-09-23 09:36:25 +0000149malloc1_SOURCES = malloc1.c
150malloc2_SOURCES = malloc2.c
njn3e884182003-04-15 13:03:23 +0000151malloc3_SOURCES = malloc3.c
njn25e49d8e72002-09-23 09:36:25 +0000152manuel1_SOURCES = manuel1.c
153manuel2_SOURCES = manuel2.c
154manuel3_SOURCES = manuel3.c
njn499eaad2005-03-11 05:05:50 +0000155match_overrun_SOURCES = match-overrun.c
njn25e49d8e72002-09-23 09:36:25 +0000156mmaptest_SOURCES = mmaptest.c
157memalign_test_SOURCES = memalign_test.c
nethercote2d5b8162004-08-11 09:40:52 +0000158memalign2_SOURCES = memalign2.c
njn25e49d8e72002-09-23 09:36:25 +0000159memcmptest_SOURCES = memcmptest.c
njn036a4912005-03-16 02:49:11 +0000160memcmptest_CFLAGS = $(AM_CFLAGS) -fno-builtin-memcmp
rjwalshbc0bb832004-06-19 18:12:36 +0000161mempool_SOURCES = mempool.c
njn25e49d8e72002-09-23 09:36:25 +0000162nanoleak_SOURCES = nanoleak.c
njn0c5fac82003-05-02 16:19:10 +0000163null_socket_SOURCES = null_socket.c
njn3e884182003-04-15 13:03:23 +0000164overlap_SOURCES = overlap.c
njn036a4912005-03-16 02:49:11 +0000165# Don't allow GCC to inline memcpy(), because then we can't intercept it
166overlap_CFLAGS = $(AM_CFLAGS) -fno-builtin-memcpy
sewardjb5f6f512005-03-10 23:59:00 +0000167pointer_trace_SOURCES = pointer-trace.c
168post_syscall_SOURCES = post-syscall.c
njn25e49d8e72002-09-23 09:36:25 +0000169realloc1_SOURCES = realloc1.c
170realloc2_SOURCES = realloc2.c
njn398044f2003-07-24 17:39:59 +0000171realloc3_SOURCES = realloc3.c
nethercote8b76fe52004-11-08 19:20:09 +0000172scalar_SOURCES = scalar.c
nethercote9b9b74b2004-11-15 16:11:20 +0000173scalar_exit_group_SOURCES = scalar_exit_group.c
nethercote75a8c982004-11-11 19:03:34 +0000174scalar_fork_SOURCES = scalar_fork.c
nethercotee824cc42004-11-09 16:20:46 +0000175scalar_supp_SOURCES = scalar_supp.c
nethercote2b0cae62004-11-12 14:57:34 +0000176scalar_vfork_SOURCES = scalar_vfork.c
njn25e49d8e72002-09-23 09:36:25 +0000177signal2_SOURCES = signal2.c
nethercote7fbe08a2004-11-15 19:03:27 +0000178sigprocmask_SOURCES = sigprocmask.c
njn25e49d8e72002-09-23 09:36:25 +0000179supp1_SOURCES = supp.c
180supp2_SOURCES = supp.c
181suppfree_SOURCES = suppfree.c
182sigaltstack_SOURCES = sigaltstack.c
183trivialleak_SOURCES = trivialleak.c
njn25e49d8e72002-09-23 09:36:25 +0000184weirdioctl_SOURCES = weirdioctl.c
sewardj51a9fe12003-07-07 00:03:52 +0000185metadata_SOURCES = metadata.c
nethercoted91ea072004-11-07 10:58:19 +0000186str_tester_SOURCES = str_tester.c
187str_tester_CFLAGS = $(AM_CFLAGS) -Wno-shadow
sewardj58bef2e2003-07-13 11:13:37 +0000188threadederrno_SOURCES = threadederrno.c
189threadederrno_LDADD = -lpthread
njnaca67c52003-09-04 21:57:45 +0000190writev_SOURCES = writev.c
nethercotedb233322003-12-02 14:56:04 +0000191zeropage_SOURCES = zeropage.c
njn25e49d8e72002-09-23 09:36:25 +0000192
193# C++ ones
194mismatches_SOURCES = mismatches.cpp
njn32a17d12003-10-10 11:01:44 +0000195new_nothrow_SOURCES = new_nothrow.cpp
njn25e49d8e72002-09-23 09:36:25 +0000196new_override_SOURCES = new_override.cpp
197
nethercotee65e47b2004-10-14 08:38:06 +0000198# Valgrind unit self-tests
199hello_SOURCES = hello.c
nethercote3f131f12004-10-27 12:05:59 +0000200## If we support PIE, build hello as a PIE, otherwise vgtest_ume cannot load
201## (I'm not completely sure why, since stage2 can load both PIEs and non-PIEs,
202## maybe it's because stage2 is loaded up high; anyway, it doesn't really
203## matter so long as vgtest_ume can load hello ok. --njn)
204if USE_PIE
205hello_CFLAGS = $(AM_CFLAGS) -fpie
206hello_LDFLAGS = -pie
207else
nethercotee65e47b2004-10-14 08:38:06 +0000208hello_LDFLAGS = -Wl,-defsym,kickstart_base=0x50000000 \
209 -Wl,-T,../../coregrind/${VG_ARCH}/stage2.lds
nethercote3f131f12004-10-27 12:05:59 +0000210hello_DEPENDENCIES = ../../coregrind/${VG_ARCH}/stage2.lds
211endif
212
nethercote543a63f2004-10-14 09:28:11 +0000213vgtest_ume_SOURCES = vgtest_ume.c
nethercotee65e47b2004-10-14 08:38:06 +0000214vgtest_ume_LDADD = ../../coregrind/ume.o \
nethercotee65e47b2004-10-14 08:38:06 +0000215 ../../coregrind/jmp_with_stack.o
216