blob: 74d2ed255e218b0ac031460f27eea735b9fbbc61 [file] [log] [blame]
hp.com!davidm0f1a0c42002-04-03 06:51:34 +00001AM_CPPFLAGS = -I$(top_srcdir)/include
2
hp.com!davidmb4f14592004-10-15 13:48:38 +00003EXTRA_DIST = run-ia64-test-dyn1 run-ptrace-mapper run-ptrace-misc \
Martin Milata0f9a5402012-05-17 17:00:59 +02004 run-check-namespace run-coredump-unwind \
Martin Milata4ab9e5d2012-08-08 14:08:49 +02005 run-coredump-unwind-mdi check-namespace.sh.in \
6 Gtest-nomalloc.c Gtest-nocalloc.c
mostang.com!davidm623c4cb2003-03-06 06:14:36 +00007
Zachary T Welch651e9bb2010-10-28 16:25:51 -07008MAINTAINERCLEANFILES = Makefile.in
9
hp.com!davidm0f1a0c42002-04-03 06:51:34 +000010noinst_PROGRAMS_common =
homeip.net!davidm3eb739d2004-08-19 14:03:54 +000011check_PROGRAMS_common = test-proc-info test-static-link \
bea.com!thallgre42a90f12004-08-18 15:16:46 +000012 test-strerror
mostang.com!davidm5a468e32004-05-05 01:58:44 +000013check_SCRIPTS_common = run-check-namespace
hp.com!davidm0f1a0c42002-04-03 06:51:34 +000014
15if REMOTE_ONLY
mostang.com!davidm405a7d82003-02-27 09:58:57 +000016 check_SCRIPTS_cdep =
17 check_PROGRAMS_cdep =
mostang.com!davidm282413e2003-01-23 18:47:51 +000018 noinst_PROGRAMS_cdep = $(noinst_PROGRAMS_common)
mostang.com!davidm0378f952004-01-21 06:36:35 +000019
20perf:
21
hp.com!davidm0f1a0c42002-04-03 06:51:34 +000022else
Zachary T Welch7e767a22010-11-08 17:16:34 -080023 LIBUNWIND_local = $(top_builddir)/src/libunwind.la
mostang.com!davidm053cda22002-04-25 06:47:29 +000024if ARCH_IA64
hp.com!davidm8f2272c2004-08-31 13:59:10 +000025 noinst_PROGRAMS_arch = ia64-test-dyn1
mostang.com!davidm405a7d82003-02-27 09:58:57 +000026 check_SCRIPTS_arch = run-ia64-test-dyn1
hp.com!davidm86bef152004-05-06 20:26:29 +000027 check_PROGRAMS_arch = Gia64-test-stack Lia64-test-stack \
28 Gia64-test-nat Lia64-test-nat \
29 Gia64-test-rbs Lia64-test-rbs \
hp.com!davidm8f2272c2004-08-31 13:59:10 +000030 Gia64-test-readonly Lia64-test-readonly \
31 ia64-test-setjmp ia64-test-sig
Cody P Schaferb45c27b2012-09-14 17:11:52 -070032else #!ARCH_IA64
Jose Flavio Aguilar Paulinob33021e2007-08-02 09:59:43 -060033if ARCH_PPC64
Arun Sharma0613d4c2011-03-22 08:40:49 -070034if USE_ALTIVEC
Cody P Schaferb45c27b2012-09-14 17:11:52 -070035 noinst_PROGRAMS_arch = ppc64-test-altivec
Jose Flavio Aguilar Paulinoa1e7ee42007-08-06 20:23:42 -060036endif #USE_ALTIVEC
Jose Flavio Aguilar Paulinob33021e2007-08-02 09:59:43 -060037endif #ARCH_PPC64
Cody P Schaferb45c27b2012-09-14 17:11:52 -070038endif #!ARCH_IA64
hp.com!davidmb4f14592004-10-15 13:48:38 +000039 check_SCRIPTS_cdep = run-ptrace-mapper run-ptrace-misc
hp.com!davidmdfa582a2004-09-15 11:37:04 +000040 check_PROGRAMS_cdep = Gtest-bt Ltest-bt Gtest-exc Ltest-exc \
41 Gtest-init Ltest-init \
42 Gtest-concurrent Ltest-concurrent \
43 Gtest-resume-sig Ltest-resume-sig \
Tommi Rantala5b55e552012-08-10 10:54:09 +030044 Gtest-resume-sig-rt Ltest-resume-sig-rt \
hp.com!davidmdfa582a2004-09-15 11:37:04 +000045 Gtest-dyn1 Ltest-dyn1 \
Lassi Tuura9e98f152011-03-19 10:00:48 +010046 Gtest-trace Ltest-trace \
hp.com!davidmdfa582a2004-09-15 11:37:04 +000047 test-async-sig test-flush-cache test-init-remote \
Tommi Rantala8203c952012-08-31 11:29:26 +030048 test-mem test-setjmp test-ptrace test-varargs \
Martin Milata0f9a5402012-05-17 17:00:59 +020049 Ltest-nomalloc Ltest-nocalloc rs-race
50 noinst_PROGRAMS_cdep = forker crasher mapper test-ptrace-misc \
Sven Neumannf195c9a2011-08-19 10:16:51 +020051 Gperf-simple Lperf-simple
52
53if HAVE_BACKTRACE
Tommi Rantala8203c952012-08-31 11:29:26 +030054 noinst_PROGRAMS_cdep += Gperf-trace Lperf-trace
Sven Neumannf195c9a2011-08-19 10:16:51 +020055endif
mostang.com!davidm0378f952004-01-21 06:36:35 +000056
Arun Sharmac2d78042010-04-12 12:08:21 -070057if SUPPORT_CXX_EXCEPTIONS
58 check_PROGRAMS_cdep += Ltest-cxx-exceptions
59endif
60
Martin Milata0f9a5402012-05-17 17:00:59 +020061if OS_LINUX
Cody P Schafer3a5d7ff2012-09-14 17:11:50 -070062if BUILD_COREDUMP
Martin Milata0f9a5402012-05-17 17:00:59 +020063 check_SCRIPTS_cdep += run-coredump-unwind
64 noinst_PROGRAMS_cdep += test-coredump-unwind
Martin Milata4ab9e5d2012-08-08 14:08:49 +020065
66if HAVE_LZMA
67 check_SCRIPTS_cdep += run-coredump-unwind-mdi
Cody P Schafer3a5d7ff2012-09-14 17:11:50 -070068endif # HAVE_LZMA
69endif # BUILD_COREDUMP
70endif # OS_LINUX
Martin Milata0f9a5402012-05-17 17:00:59 +020071
Arun Sharma741a5a22011-03-24 23:47:25 -070072perf: perf-startup Gperf-simple Lperf-simple Lperf-trace
mostang.com!davidm0378f952004-01-21 06:36:35 +000073 @echo "########## Basic performance of generic libunwind:"
74 @./Gperf-simple
75 @echo "########## Basic performance of local-only libunwind:"
76 @./Lperf-simple
Arun Sharma741a5a22011-03-24 23:47:25 -070077 @echo "########## Performance of fast unwind:"
78 @./Lperf-trace
mostang.com!davidm0378f952004-01-21 06:36:35 +000079 @echo "########## Startup overhead:"
80 @$(srcdir)/perf-startup @arch@
81
hp.com!davidm0f1a0c42002-04-03 06:51:34 +000082endif
83
mostang.com!davidm405a7d82003-02-27 09:58:57 +000084check_PROGRAMS = $(check_PROGRAMS_common) $(check_PROGRAMS_cdep) \
85 $(check_PROGRAMS_arch)
86check_SCRIPTS = $(check_SCRIPTS_common) $(check_SCRIPTS_cdep) \
87 $(check_SCRIPTS_arch)
mostang.com!davidm282413e2003-01-23 18:47:51 +000088
mostang.com!davidm405a7d82003-02-27 09:58:57 +000089
90TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
mostang.com!davidm282413e2003-01-23 18:47:51 +000091
92noinst_PROGRAMS = $(noinst_PROGRAMS_common) $(noinst_PROGRAMS_cdep) \
93 $(noinst_PROGRAMS_arch)
94
hp.com!davidm86bef152004-05-06 20:26:29 +000095Lia64_test_readonly_SOURCES = Lia64-test-readonly.c ia64-test-readonly-asm.S
96Gia64_test_readonly_SOURCES = Gia64-test-readonly.c ia64-test-readonly-asm.S
mostang.com!davidm623c4cb2003-03-06 06:14:36 +000097Lia64_test_stack_SOURCES = Lia64-test-stack.c ia64-test-stack-asm.S \
98 ia64-test-stack.h
99Gia64_test_stack_SOURCES = Gia64-test-stack.c ia64-test-stack-asm.S \
100 ia64-test-stack.h
101Lia64_test_rbs_SOURCES = Lia64-test-rbs.c ia64-test-rbs-asm.S ia64-test-rbs.h
102Gia64_test_rbs_SOURCES = Gia64-test-rbs.c ia64-test-rbs-asm.S ia64-test-rbs.h
mostang.com!davidm899323c2004-02-14 07:53:31 +0000103Lia64_test_nat_SOURCES = Lia64-test-nat.c ia64-test-nat-asm.S
104Gia64_test_nat_SOURCES = Gia64-test-nat.c ia64-test-nat-asm.S
Tommi Rantalaaed6c8b2012-08-30 14:18:33 +0300105ia64_test_dyn1_SOURCES = ia64-test-dyn1.c ia64-dyn-asm.S flush-cache.S \
106 flush-cache.h
Jose Flavio Aguilar Paulinob33021e2007-08-02 09:59:43 -0600107ppc64_test_altivec_SOURCES = ppc64-test-altivec.c ppc64-test-altivec-utils.c
mostang.com!davidm9fe5e682003-03-28 07:43:22 +0000108Gtest_init_SOURCES = Gtest-init.cxx
109Ltest_init_SOURCES = Ltest-init.cxx
Arun Sharmac2d78042010-04-12 12:08:21 -0700110Ltest_cxx_exceptions_SOURCES = Ltest-cxx-exceptions.cxx
111
Tommi Rantalaaed6c8b2012-08-30 14:18:33 +0300112Gtest_dyn1_SOURCES = Gtest-dyn1.c flush-cache.S flush-cache.h
113Ltest_dyn1_SOURCES = Ltest-dyn1.c flush-cache.S flush-cache.h
mostang.com!davidm0378f952004-01-21 06:36:35 +0000114test_static_link_SOURCES = test-static-link-loc.c test-static-link-gen.c
mostang.com!davidm4de259b2004-05-04 22:24:50 +0000115test_static_link_LDFLAGS = -static
116forker_LDFLAGS = -static
hp.com!davidmb4f14592004-10-15 13:48:38 +0000117Gtest_bt_SOURCES = Gtest-bt.c ident.c
118Ltest_bt_SOURCES = Ltest-bt.c ident.c
119test_ptrace_misc_SOURCES = test-ptrace-misc.c ident.c
Arun Sharma576b59e2009-03-15 11:24:43 -0700120Ltest_nomalloc_SOURCES = Ltest-nomalloc.c
Arun Sharmad86155f2011-04-05 20:46:24 -0700121Ltest_nocalloc_SOURCES = Ltest-nocalloc.c
Lassi Tuura9e98f152011-03-19 10:00:48 +0100122Gtest_trace_SOURCES = Gtest-trace.c ident.c
123Ltest_trace_SOURCES = Ltest-trace.c ident.c
Arun Sharma576b59e2009-03-15 11:24:43 -0700124
Ken Wernerd589e202011-04-06 10:27:51 +0200125LIBUNWIND = $(top_builddir)/src/libunwind-$(arch).la
Arun Sharma201bb872012-08-18 12:37:00 -0700126LIBUNWIND_ptrace = $(top_builddir)/src/libunwind-ptrace.la
Martin Milatade28c512012-06-29 11:28:29 +0200127LIBUNWIND_coredump = $(top_builddir)/src/libunwind-coredump.la
Arun Sharma57695512011-03-22 08:34:33 -0700128
129if USE_ELF32
130LIBUNWIND_ELF = $(top_builddir)/src/libunwind-elf32.la
131endif
132if USE_ELF64
133LIBUNWIND_ELF = $(top_builddir)/src/libunwind-elf64.la
134endif
135if USE_ELFXX
136LIBUNWIND_ELF = $(top_builddir)/src/libunwind-elfxx.la
137endif
138
Ken Wernerc2cc1222011-03-02 17:40:06 +0100139LIBUNWIND_setjmp = $(top_builddir)/src/libunwind-setjmp.la \
Arun Sharma57695512011-03-22 08:34:33 -0700140 $(LIBUNWIND_ELF) $(LIBUNWIND)
Zachary T Welch7e767a22010-11-08 17:16:34 -0800141
Ken Wernerd589e202011-04-06 10:27:51 +0200142test_async_sig_LDADD = $(LIBUNWIND_local) -lpthread
143test_flush_cache_LDADD = $(LIBUNWIND_local)
Arun Sharma42b67082011-10-15 22:55:35 -0700144test_init_remote_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
145test_mem_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
Ken Wernerc2cc1222011-03-02 17:40:06 +0100146test_ptrace_LDADD = $(LIBUNWIND_ptrace) $(LIBUNWIND)
147test_proc_info_LDADD = $(LIBUNWIND)
148test_static_link_LDADD = $(LIBUNWIND)
149test_strerror_LDADD = $(LIBUNWIND)
150rs_race_LDADD = $(LIBUNWIND) -lpthread
Tommi Rantala8203c952012-08-31 11:29:26 +0300151test_varargs_LDADD = $(LIBUNWIND_local)
Zachary T Welch7e767a22010-11-08 17:16:34 -0800152
Arun Sharma42b67082011-10-15 22:55:35 -0700153Gtest_bt_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
154Gtest_concurrent_LDADD = $(LIBUNWIND) $(LIBUNWIND_local) -lpthread
Ken Wernerd589e202011-04-06 10:27:51 +0200155Gtest_dyn1_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
Arun Sharma42b67082011-10-15 22:55:35 -0700156Gtest_exc_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
157Gtest_init_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
158Gtest_resume_sig_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
Tommi Rantala5b55e552012-08-10 10:54:09 +0300159Gtest_resume_sig_rt_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
Arun Sharma1d8e2c12011-09-10 19:56:54 -0700160Gperf_simple_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
Ken Wernerd589e202011-04-06 10:27:51 +0200161Gtest_trace_LDADD=$(LIBUNWIND) $(LIBUNWIND_local)
Arun Sharma1d8e2c12011-09-10 19:56:54 -0700162Gperf_trace_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
Zachary T Welch7e767a22010-11-08 17:16:34 -0800163
164Ltest_bt_LDADD = $(LIBUNWIND_local)
165Ltest_concurrent_LDADD = $(LIBUNWIND_local) -lpthread
166Ltest_dyn1_LDADD = $(LIBUNWIND_local)
167Ltest_exc_LDADD = $(LIBUNWIND_local)
168Ltest_init_LDADD = $(LIBUNWIND_local)
169Ltest_nomalloc_LDADD = $(LIBUNWIND_local) @DLLIB@
Arun Sharmad86155f2011-04-05 20:46:24 -0700170Ltest_nocalloc_LDADD = $(LIBUNWIND_local) @DLLIB@ -lpthread
Ken Wernerd589e202011-04-06 10:27:51 +0200171Ltest_resume_sig_LDADD = $(LIBUNWIND_local)
Tommi Rantala5b55e552012-08-10 10:54:09 +0300172Ltest_resume_sig_rt_LDADD = $(LIBUNWIND_local)
Zachary T Welch7e767a22010-11-08 17:16:34 -0800173Lperf_simple_LDADD = $(LIBUNWIND_local)
Arun Sharma7ff83c02011-03-24 23:25:43 -0700174Ltest_trace_LDADD = $(LIBUNWIND_local)
Arun Sharma741a5a22011-03-24 23:47:25 -0700175Lperf_trace_LDADD = $(LIBUNWIND_local)
Zachary T Welch7e767a22010-11-08 17:16:34 -0800176
Ken Wernerc2cc1222011-03-02 17:40:06 +0100177test_setjmp_LDADD = $(LIBUNWIND_setjmp)
178ia64_test_setjmp_LDADD = $(LIBUNWIND_setjmp)
Arun Sharma7ff83c02011-03-24 23:25:43 -0700179
Cody P Schafer3a5d7ff2012-09-14 17:11:50 -0700180if BUILD_COREDUMP
Arun Sharmaf0bb8062012-03-12 19:07:28 -0700181test_coredump_unwind_LDADD = $(LIBUNWIND_coredump) $(LIBUNWIND)
Cody P Schafer3a5d7ff2012-09-14 17:11:50 -0700182endif
Martin Milatad93d96a2012-05-22 11:51:06 +0200183
184Gia64_test_nat_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
185Gia64_test_stack_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
186Gia64_test_rbs_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
187Gia64_test_readonly_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
188Lia64_test_nat_LDADD = $(LIBUNWIND_local)
189Lia64_test_stack_LDADD = $(LIBUNWIND_local)
190Lia64_test_rbs_LDADD = $(LIBUNWIND_local)
191Lia64_test_readonly_LDADD = $(LIBUNWIND_local)
192ia64_test_dyn1_LDADD = $(LIBUNWIND)
193ia64_test_sig_LDADD = $(LIBUNWIND)