blob: cd1566984bb877eb496aea935e543ab1d5aa1904 [file] [log] [blame]
sewardj01262142006-01-04 01:20:28 +00001
2# For AM_FLAG_M3264_PRI
3include $(top_srcdir)/Makefile.flags.am
4
tomef567322005-11-11 14:33:43 +00005SUBDIRS = .
6if VG_X86_LINUX
7SUBDIRS += x86
8endif
9if VG_AMD64_LINUX
10SUBDIRS += amd64
11endif
12if VG_PPC32_LINUX
13SUBDIRS += ppc32
14endif
sewardj2c48c7b2005-11-29 13:05:56 +000015if VG_PPC64_LINUX
16SUBDIRS += ppc64
17endif
tomef567322005-11-11 14:33:43 +000018
njna5f1bcd2004-11-27 16:47:42 +000019DIST_SUBDIRS = ${VG_ARCH_ALL} .
njn25e49d8e72002-09-23 09:36:25 +000020
njnd0eab5f2003-09-30 16:52:47 +000021noinst_SCRIPTS = filter_allocs filter_leak_check_size \
sewardjebf67cc2005-05-24 14:46:02 +000022 filter_stderr filter_stderr_backtrace filter_xml
daywalker677e0612003-04-24 00:40:38 +000023
njna63e2d72003-06-12 14:13:05 +000024EXTRA_DIST = $(noinst_SCRIPTS) \
sewardjb5f6f512005-03-10 23:59:00 +000025 addressable.stderr.exp addressable.stdout.exp addressable.vgtest \
njnd8ced862003-04-08 00:47:05 +000026 badaddrvalue.stderr.exp \
njn254d542432002-09-23 16:09:39 +000027 badaddrvalue.stdout.exp badaddrvalue.vgtest \
28 badfree-2trace.stderr.exp badfree-2trace.vgtest \
29 badfree.stderr.exp badfree.vgtest \
30 badjump.stderr.exp badjump.vgtest \
nethercote4d714382004-10-13 09:47:24 +000031 badjump2.stderr.exp badjump2.vgtest \
njn254d542432002-09-23 16:09:39 +000032 badloop.stderr.exp badloop.vgtest \
nethercoteeb0592d2004-11-05 12:02:27 +000033 badpoll.stderr.exp badpoll.vgtest \
njnc2699f62003-09-05 23:29:33 +000034 badrw.stderr.exp badrw.vgtest \
njn7360f8e2003-09-04 20:57:51 +000035 brk.stderr.exp brk.vgtest \
nethercotece471262004-08-25 13:43:44 +000036 brk2.stderr.exp brk2.vgtest \
sewardjf0814a02005-05-04 12:27:48 +000037 buflen_check.stderr.exp buflen_check.stderr.exp2 buflen_check.vgtest \
njnd8ced862003-04-08 00:47:05 +000038 clientperm.stderr.exp \
njn4d5490d2002-10-04 14:16:38 +000039 clientperm.stdout.exp clientperm.vgtest \
njn10785452003-05-20 16:38:24 +000040 custom_alloc.stderr.exp custom_alloc.vgtest \
sewardjfc3b5ba2006-04-04 17:35:48 +000041 deep_templates.vgtest \
42 deep_templates.stdout.exp deep_templates.stderr.exp \
sewardjb5f6f512005-03-10 23:59:00 +000043 describe-block.stderr.exp describe-block.vgtest \
njn254d542432002-09-23 16:09:39 +000044 doublefree.stderr.exp doublefree.vgtest \
njn0087c502005-07-01 04:15:36 +000045 erringfds.stderr.exp erringfds.stdout.exp erringfds.vgtest \
njn1140b242003-04-22 20:58:02 +000046 error_counts.stderr.exp error_counts.stdout.exp error_counts.vgtest \
njn254d542432002-09-23 16:09:39 +000047 errs1.stderr.exp errs1.vgtest \
48 exitprog.stderr.exp exitprog.vgtest \
sewardj7aaa59e2005-05-31 19:49:28 +000049 execve.stderr.exp execve.stderr.exp2 execve.vgtest \
50 execve2.stderr.exp execve2.stderr.exp2 execve2.vgtest \
njn254d542432002-09-23 16:09:39 +000051 fprw.stderr.exp fprw.vgtest \
sewardj45a6abb2005-11-08 01:24:23 +000052 fwrite.stderr.exp fwrite.stderr.exp2 fwrite.vgtest \
njn254d542432002-09-23 16:09:39 +000053 inits.stderr.exp inits.vgtest \
54 inline.stderr.exp inline.stdout.exp inline.vgtest \
sewardjb5f6f512005-03-10 23:59:00 +000055 leak-0.vgtest leak-0.stderr.exp \
sewardj1f443862005-05-05 01:29:11 +000056 leak-cycle.vgtest leak-cycle.stderr.exp leak-cycle.stderr.exp64 \
sewardjb8b03e52005-05-23 14:02:51 +000057 leak-tree.vgtest leak-tree.stderr.exp \
58 leak-tree.stderr.exp2 leak-tree.stderr.exp64 \
sewardjb5f6f512005-03-10 23:59:00 +000059 leak-regroot.vgtest leak-regroot.stderr.exp \
60 leakotron.vgtest leakotron.stdout.exp leakotron.stderr.exp \
njn2dc09e62005-08-17 04:03:31 +000061 malloc_usable.stderr.exp malloc_usable.vgtest \
njn254d542432002-09-23 16:09:39 +000062 malloc1.stderr.exp malloc1.vgtest \
63 malloc2.stderr.exp malloc2.vgtest \
njn3e884182003-04-15 13:03:23 +000064 malloc3.stderr.exp malloc3.stdout.exp malloc3.vgtest \
njn254d542432002-09-23 16:09:39 +000065 manuel1.stderr.exp manuel1.stdout.exp manuel1.vgtest \
sewardj1323d1d2005-05-05 01:23:50 +000066 manuel2.stderr.exp manuel2.stderr.exp64 manuel2.stdout.exp manuel2.vgtest \
njn254d542432002-09-23 16:09:39 +000067 manuel3.stderr.exp manuel3.vgtest \
njn499eaad2005-03-11 05:05:50 +000068 match-overrun.stderr.exp match-overrun.vgtest match-overrun.supp \
njn254d542432002-09-23 16:09:39 +000069 memalign_test.stderr.exp memalign_test.vgtest \
nethercote2d5b8162004-08-11 09:40:52 +000070 memalign2.stderr.exp memalign2.vgtest \
njn16eeb4e2005-06-16 03:56:58 +000071 memcmptest.stderr.exp memcmptest.stderr.exp2 \
72 memcmptest.stdout.exp memcmptest.vgtest \
sewardj1f443862005-05-05 01:29:11 +000073 mempool.stderr.exp mempool.stderr.exp64 mempool.vgtest \
sewardj7d32a732005-05-05 01:32:24 +000074 mismatches.stderr.exp mismatches.stderr.exp64 mismatches.vgtest \
njn254d542432002-09-23 16:09:39 +000075 mmaptest.stderr.exp mmaptest.vgtest \
76 nanoleak.stderr.exp nanoleak.vgtest \
njn3e884182003-04-15 13:03:23 +000077 nanoleak_supp.stderr.exp nanoleak_supp.vgtest nanoleak.supp \
njn32a17d12003-10-10 11:01:44 +000078 new_nothrow.stderr.exp new_nothrow.vgtest \
nethercoteea169c02004-07-18 12:05:37 +000079 new_override.stderr.exp new_override.stdout.exp new_override.vgtest \
njn0c5fac82003-05-02 16:19:10 +000080 null_socket.stderr.exp null_socket.vgtest \
sewardjea5cf542003-07-16 19:03:10 +000081 overlap.stderr.exp overlap.stdout.exp overlap.vgtest \
njn7b880bc2005-08-14 22:43:53 +000082 oset_test.stderr.exp oset_test.stdout.exp oset_test.vgtest \
sewardj16031ba2005-07-06 19:01:53 +000083 partiallydefinedeq.vgtest partiallydefinedeq.stderr.exp \
sewardj2da8f332006-01-19 03:57:06 +000084 partiallydefinedeq.stderr.exp2 \
sewardj16031ba2005-07-06 19:01:53 +000085 partiallydefinedeq.stdout.exp \
sewardj2fa01f12005-11-19 01:32:17 +000086 partial_load_ok.vgtest partial_load_ok.stderr.exp partial_load_ok.stderr.exp64 \
87 partial_load_dflt.vgtest partial_load_dflt.stderr.exp partial_load_dflt.stderr.exp64 \
njn1d0825f2006-03-27 11:37:07 +000088 pdb-realloc.stderr.exp pdb-realloc.vgtest \
sewardje26e42f2006-05-03 00:43:20 +000089 pdb-realloc2.stderr.exp pdb-realloc2.stdout.exp pdb-realloc2.vgtest \
njnf4ef1822005-09-24 19:42:41 +000090 pipe.stderr.exp pipe.vgtest \
njn3f7e9112005-06-19 05:43:21 +000091 pointer-trace.vgtest \
sewardj1323d1d2005-05-05 01:23:50 +000092 pointer-trace.stderr.exp pointer-trace.stderr.exp64 \
sewardjb5f6f512005-03-10 23:59:00 +000093 post-syscall.stderr.exp post-syscall.stdout.exp post-syscall.vgtest \
njn254d542432002-09-23 16:09:39 +000094 realloc1.stderr.exp realloc1.vgtest \
95 realloc2.stderr.exp realloc2.vgtest \
njn398044f2003-07-24 17:39:59 +000096 realloc3.stderr.exp realloc3.vgtest \
njn1d0825f2006-03-27 11:37:07 +000097 sh-mem.stderr.exp sh-mem.vgtest \
sewardje2504122006-04-04 15:43:30 +000098 sh-mem-random.stderr.exp sh-mem-random.stdout.exp64 \
sewardjbca134f2006-04-02 02:59:35 +000099 sh-mem-random.stdout.exp sh-mem-random.vgtest \
njn254d542432002-09-23 16:09:39 +0000100 sigaltstack.stderr.exp sigaltstack.vgtest \
sewardj2fa01f12005-11-19 01:32:17 +0000101 sigkill.stderr.exp sigkill.stderr.exp2 sigkill.stderr.exp3 sigkill.vgtest \
nethercote7fbe08a2004-11-15 19:03:27 +0000102 signal2.stderr.exp signal2.stdout.exp signal2.vgtest \
tom42d63672005-11-02 15:46:07 +0000103 sigprocmask.stderr.exp sigprocmask.stderr.exp2 sigprocmask.vgtest \
sewardj2da8f332006-01-19 03:57:06 +0000104 stack_changes.stderr.exp stack_changes.stdout.exp \
105 stack_changes.stdout.exp2 stack_changes.vgtest \
tom2fb8f7a2005-11-11 17:21:20 +0000106 stack_switch.stderr.exp stack_switch.vgtest \
tom81afd4b2005-11-02 15:17:43 +0000107 strchr.stderr.exp strchr.stderr.exp2 strchr.vgtest \
nethercoted91ea072004-11-07 10:58:19 +0000108 str_tester.stderr.exp str_tester.vgtest \
njn966d6632005-08-18 15:49:21 +0000109 supp_unknown.stderr.exp supp_unknown.vgtest supp_unknown.supp \
njn254d542432002-09-23 16:09:39 +0000110 supp1.stderr.exp supp1.vgtest \
111 supp2.stderr.exp supp2.vgtest \
112 supp.supp \
113 suppfree.stderr.exp suppfree.vgtest \
nethercote57e36b32004-07-10 14:56:28 +0000114 toobig-allocs.stderr.exp toobig-allocs.vgtest \
njn254d542432002-09-23 16:09:39 +0000115 trivialleak.stderr.exp trivialleak.vgtest \
sewardj1c85d5c2006-03-08 13:24:21 +0000116 metadata.stderr.exp metadata.stdout.exp metadata.vgtest \
sewardj46712cd2006-01-22 16:44:35 +0000117 vcpu_bz2.stdout.exp vcpu_bz2.stderr.exp vcpu_bz2.vgtest \
sewardj48e7bc42006-01-23 03:36:40 +0000118 vcpu_fbench.stdout.exp vcpu_fbench.stderr.exp vcpu_fbench.vgtest \
sewardj02fd0d72006-01-24 00:40:35 +0000119 vcpu_fnfns.stdout.exp vcpu_fnfns.stderr.exp vcpu_fnfns.vgtest \
njnc0392a82005-09-27 19:52:02 +0000120 vgtest_ume.stderr.exp vgtest_ume.disabled \
sewardj0ec07f32006-01-12 12:32:32 +0000121 wrap1.vgtest wrap1.stdout.exp wrap1.stderr.exp \
122 wrap2.vgtest wrap2.stdout.exp wrap2.stderr.exp \
123 wrap3.vgtest wrap3.stdout.exp wrap3.stderr.exp \
124 wrap4.vgtest wrap4.stdout.exp wrap4.stderr.exp \
125 wrap5.vgtest wrap5.stdout.exp wrap5.stderr.exp \
126 wrap6.vgtest wrap6.stdout.exp wrap6.stderr.exp \
sewardj134d1aa2006-01-20 14:21:28 +0000127 wrap7.vgtest wrap7.stdout.exp wrap7.stderr.exp \
128 wrap8.vgtest wrap8.stdout.exp wrap8.stderr.exp \
sewardjc8858442006-01-20 15:17:20 +0000129 wrap8.stdout.exp2 wrap8.stderr.exp2 \
sewardjce7ec7d2005-03-16 13:10:44 +0000130 writev.stderr.exp writev.stderr.exp2 writev.stderr.exp3 writev.vgtest \
tom81afd4b2005-11-02 15:17:43 +0000131 xml1.stderr.exp xml1.stderr.exp2 xml1.stderr.exp3 \
132 xml1.stderr.exp64 xml1.stderr.exp64_2 xml1.stdout.exp \
njn01e755d2005-07-02 21:14:19 +0000133 xml1.vgtest \
njn94260f22005-07-02 17:36:11 +0000134 zeropage.stderr.exp zeropage.stderr.exp2 zeropage.stdout.exp \
135 zeropage.vgtest
njn254d542432002-09-23 16:09:39 +0000136
sewardj45f4e7c2005-09-27 19:20:21 +0000137# vgtest_ume is not working
daywalkerc42d8bc2003-04-17 17:00:43 +0000138check_PROGRAMS = \
sewardjb5f6f512005-03-10 23:59:00 +0000139 addressable \
nethercote4d714382004-10-13 09:47:24 +0000140 badaddrvalue badfree badjump badjump2 \
nethercoteeb0592d2004-11-05 12:02:27 +0000141 badloop badpoll badrw brk brk2 buflen_check \
njn7360f8e2003-09-04 20:57:51 +0000142 clientperm custom_alloc \
sewardjfc3b5ba2006-04-04 17:35:48 +0000143 deep_templates \
sewardjb5f6f512005-03-10 23:59:00 +0000144 describe-block \
njn0087c502005-07-01 04:15:36 +0000145 doublefree error_counts errs1 exitprog execve execve2 erringfds \
nethercote4a02e1e2004-10-20 11:43:01 +0000146 fprw fwrite hello inits inline \
sewardjb5f6f512005-03-10 23:59:00 +0000147 leak-0 leak-cycle leak-tree leak-regroot leakotron \
njn2dc09e62005-08-17 04:03:31 +0000148 malloc_usable malloc1 malloc2 malloc3 manuel1 manuel2 manuel3 \
njn499eaad2005-03-11 05:05:50 +0000149 match-overrun \
nethercote2d5b8162004-08-11 09:40:52 +0000150 memalign_test memalign2 memcmptest mempool mmaptest \
151 nanoleak new_nothrow \
njn7b880bc2005-08-14 22:43:53 +0000152 null_socket oset_test overlap \
sewardj16031ba2005-07-06 19:01:53 +0000153 partiallydefinedeq \
sewardje26e42f2006-05-03 00:43:20 +0000154 partial_load pdb-realloc pdb-realloc2 \
njnf4ef1822005-09-24 19:42:41 +0000155 pipe pointer-trace \
sewardjb5f6f512005-03-10 23:59:00 +0000156 post-syscall \
nethercote8b305af2004-11-14 17:58:27 +0000157 realloc1 realloc2 realloc3 \
sewardjdc6734b2006-04-02 01:53:01 +0000158 sh-mem sh-mem-random \
njn0087c502005-07-01 04:15:36 +0000159 sigaltstack signal2 sigprocmask sigkill \
tom2fb8f7a2005-11-11 17:21:20 +0000160 stack_changes stack_switch strchr str_tester \
161 supp_unknown supp1 supp2 suppfree \
tom8e9cb432005-11-02 13:58:39 +0000162 trivialleak \
sewardjf69e0bc2005-05-04 00:26:57 +0000163 mismatches new_override metadata \
sewardj02fd0d72006-01-24 00:40:35 +0000164 vcpu_bz2 vcpu_fbench vcpu_fnfns \
sewardj45f4e7c2005-09-27 19:20:21 +0000165 xml1 \
sewardj134d1aa2006-01-20 14:21:28 +0000166 wrap1 wrap2 wrap3 wrap4 wrap5 wrap6 wrap7 wrap7so.so wrap8 \
nethercotee65e47b2004-10-14 08:38:06 +0000167 writev zeropage
168
njn25e49d8e72002-09-23 09:36:25 +0000169
sewardj01262142006-01-04 01:20:28 +0000170AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \
171 -I$(top_srcdir)/coregrind -I$(top_builddir)/include \
172 -I@VEX_DIR@/pub
173AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
daywalkerc42d8bc2003-04-17 17:00:43 +0000174AM_CXXFLAGS = $(AM_CFLAGS)
njn25e49d8e72002-09-23 09:36:25 +0000175
njn5d8a2302005-07-02 18:24:58 +0000176# Extra stuff for C tests
sewardj01262142006-01-04 01:20:28 +0000177memcmptest_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -fno-builtin-memcmp
178oset_test_CFLAGS = $(AM_FLAG_M3264_PRI) \
sewardj48540da2006-01-04 04:23:30 +0000179 -DVGA_$(VG_ARCH)=1 -DVGO_$(VG_OS)=1 \
180 -DVGP_$(VG_ARCH)_$(VG_OS)=1
sewardj46712cd2006-01-22 16:44:35 +0000181vcpu_bz2_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
sewardj02fd0d72006-01-24 00:40:35 +0000182vcpu_fbench_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
183vcpu_fnfns_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
184vcpu_fnfns_LDADD = -lm
sewardjf4f22d52006-03-11 13:20:41 +0000185wrap6_CFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O2 -g
sewardj134d1aa2006-01-20 14:21:28 +0000186
njn036a4912005-03-16 02:49:11 +0000187# Don't allow GCC to inline memcpy(), because then we can't intercept it
188overlap_CFLAGS = $(AM_CFLAGS) -fno-builtin-memcpy
tom2fb8f7a2005-11-11 17:21:20 +0000189stack_switch_LDADD = -lpthread
nethercoted91ea072004-11-07 10:58:19 +0000190str_tester_CFLAGS = $(AM_CFLAGS) -Wno-shadow
njn966d6632005-08-18 15:49:21 +0000191supp_unknown_SOURCES = badjump.c
njn5d8a2302005-07-02 18:24:58 +0000192supp1_SOURCES = supp.c
193supp2_SOURCES = supp.c
njn25e49d8e72002-09-23 09:36:25 +0000194
njn5d8a2302005-07-02 18:24:58 +0000195# C++ tests
njn25e49d8e72002-09-23 09:36:25 +0000196mismatches_SOURCES = mismatches.cpp
njn32a17d12003-10-10 11:01:44 +0000197new_nothrow_SOURCES = new_nothrow.cpp
njn25e49d8e72002-09-23 09:36:25 +0000198new_override_SOURCES = new_override.cpp
sewardjfc3b5ba2006-04-04 17:35:48 +0000199deep_templates_SOURCES = deep_templates.cpp
200deep_templates_CXXFLAGS = $(AM_FLAG_M3264_PRI) $(AM_CFLAGS) -O -gstabs
njn25e49d8e72002-09-23 09:36:25 +0000201
sewardj134d1aa2006-01-20 14:21:28 +0000202# Build shared object for wrap7
203wrap7_SOURCES = wrap7.c
204wrap7_DEPENDENCIES = wrap7so.so
205wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI) \
206 -Wl,-rpath,$(top_builddir)/memcheck/tests
207wrap7_LDADD = wrap7so.so
208wrap7so_so_SOURCES = wrap7so.c
209wrap7so_so_LDADD =
210wrap7so_so_DEPENDENCIES =
211wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) \
212 -Wl,-soname -Wl,wrap7so.so -shared
213wrap7so_so_CFLAGS = -fpic $(AM_FLAG_M3264_PRI)
214
nethercotee65e47b2004-10-14 08:38:06 +0000215# Valgrind unit self-tests
tomfb7bcde2005-11-07 15:24:38 +0000216#hello_LDFLAGS = -Wl,-defsym,valt_load_address=0x50000000 \
217# -Wl,-T,$(top_builddir)/valt_load_address.lds
218#hello_DEPENDENCIES = $(top_builddir)/valt_load_address.lds
nethercote3f131f12004-10-27 12:05:59 +0000219
sewardj45f4e7c2005-09-27 19:20:21 +0000220# vgtest_ume is not working
221#vgtest_ume_CFLAGS = -DVGA_$(VG_ARCH) -DVGO_$(VG_OS)
222#vgtest_ume_LDADD = ../../coregrind/m_ume.o
nethercotee65e47b2004-10-14 08:38:06 +0000223