blob: a367eedc200bbdf585b816571277abbfe8447457 [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 \
Tommi Rantala7263a972012-09-17 14:28:46 +03006 Gtest-nomalloc.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 Rantalabe230ad2012-09-14 14:29:02 +030048 test-mem test-setjmp test-ptrace Ltest-varargs \
Tommi Rantala643fc922012-09-17 14:06:05 +030049 Ltest-nomalloc Ltest-nocalloc Lrs-race
Martin Milata0f9a5402012-05-17 17:00:59 +020050 noinst_PROGRAMS_cdep = forker crasher mapper test-ptrace-misc \
Sven Neumannf195c9a2011-08-19 10:16:51 +020051 Gperf-simple Lperf-simple
52
Tommi Rantala8203c952012-08-31 11:29:26 +030053 noinst_PROGRAMS_cdep += Gperf-trace Lperf-trace
mostang.com!davidm0378f952004-01-21 06:36:35 +000054
Arun Sharmac2d78042010-04-12 12:08:21 -070055if SUPPORT_CXX_EXCEPTIONS
56 check_PROGRAMS_cdep += Ltest-cxx-exceptions
57endif
58
Martin Milata0f9a5402012-05-17 17:00:59 +020059if OS_LINUX
Cody P Schafer3a5d7ff2012-09-14 17:11:50 -070060if BUILD_COREDUMP
Martin Milata0f9a5402012-05-17 17:00:59 +020061 check_SCRIPTS_cdep += run-coredump-unwind
62 noinst_PROGRAMS_cdep += test-coredump-unwind
Martin Milata4ab9e5d2012-08-08 14:08:49 +020063
64if HAVE_LZMA
65 check_SCRIPTS_cdep += run-coredump-unwind-mdi
Cody P Schafer3a5d7ff2012-09-14 17:11:50 -070066endif # HAVE_LZMA
67endif # BUILD_COREDUMP
68endif # OS_LINUX
Martin Milata0f9a5402012-05-17 17:00:59 +020069
Arun Sharma741a5a22011-03-24 23:47:25 -070070perf: perf-startup Gperf-simple Lperf-simple Lperf-trace
mostang.com!davidm0378f952004-01-21 06:36:35 +000071 @echo "########## Basic performance of generic libunwind:"
72 @./Gperf-simple
73 @echo "########## Basic performance of local-only libunwind:"
74 @./Lperf-simple
Arun Sharma741a5a22011-03-24 23:47:25 -070075 @echo "########## Performance of fast unwind:"
76 @./Lperf-trace
mostang.com!davidm0378f952004-01-21 06:36:35 +000077 @echo "########## Startup overhead:"
78 @$(srcdir)/perf-startup @arch@
79
hp.com!davidm0f1a0c42002-04-03 06:51:34 +000080endif
81
mostang.com!davidm405a7d82003-02-27 09:58:57 +000082check_PROGRAMS = $(check_PROGRAMS_common) $(check_PROGRAMS_cdep) \
83 $(check_PROGRAMS_arch)
84check_SCRIPTS = $(check_SCRIPTS_common) $(check_SCRIPTS_cdep) \
85 $(check_SCRIPTS_arch)
mostang.com!davidm282413e2003-01-23 18:47:51 +000086
mostang.com!davidm405a7d82003-02-27 09:58:57 +000087
88TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
mostang.com!davidm282413e2003-01-23 18:47:51 +000089
90noinst_PROGRAMS = $(noinst_PROGRAMS_common) $(noinst_PROGRAMS_cdep) \
91 $(noinst_PROGRAMS_arch)
92
hp.com!davidm86bef152004-05-06 20:26:29 +000093Lia64_test_readonly_SOURCES = Lia64-test-readonly.c ia64-test-readonly-asm.S
94Gia64_test_readonly_SOURCES = Gia64-test-readonly.c ia64-test-readonly-asm.S
mostang.com!davidm623c4cb2003-03-06 06:14:36 +000095Lia64_test_stack_SOURCES = Lia64-test-stack.c ia64-test-stack-asm.S \
96 ia64-test-stack.h
97Gia64_test_stack_SOURCES = Gia64-test-stack.c ia64-test-stack-asm.S \
98 ia64-test-stack.h
99Lia64_test_rbs_SOURCES = Lia64-test-rbs.c ia64-test-rbs-asm.S ia64-test-rbs.h
100Gia64_test_rbs_SOURCES = Gia64-test-rbs.c ia64-test-rbs-asm.S ia64-test-rbs.h
mostang.com!davidm899323c2004-02-14 07:53:31 +0000101Lia64_test_nat_SOURCES = Lia64-test-nat.c ia64-test-nat-asm.S
102Gia64_test_nat_SOURCES = Gia64-test-nat.c ia64-test-nat-asm.S
Tommi Rantalaaed6c8b2012-08-30 14:18:33 +0300103ia64_test_dyn1_SOURCES = ia64-test-dyn1.c ia64-dyn-asm.S flush-cache.S \
104 flush-cache.h
Jose Flavio Aguilar Paulinob33021e2007-08-02 09:59:43 -0600105ppc64_test_altivec_SOURCES = ppc64-test-altivec.c ppc64-test-altivec-utils.c
mostang.com!davidm9fe5e682003-03-28 07:43:22 +0000106Gtest_init_SOURCES = Gtest-init.cxx
107Ltest_init_SOURCES = Ltest-init.cxx
Arun Sharmac2d78042010-04-12 12:08:21 -0700108Ltest_cxx_exceptions_SOURCES = Ltest-cxx-exceptions.cxx
109
Tommi Rantalaaed6c8b2012-08-30 14:18:33 +0300110Gtest_dyn1_SOURCES = Gtest-dyn1.c flush-cache.S flush-cache.h
111Ltest_dyn1_SOURCES = Ltest-dyn1.c flush-cache.S flush-cache.h
mostang.com!davidm0378f952004-01-21 06:36:35 +0000112test_static_link_SOURCES = test-static-link-loc.c test-static-link-gen.c
mostang.com!davidm4de259b2004-05-04 22:24:50 +0000113test_static_link_LDFLAGS = -static
114forker_LDFLAGS = -static
hp.com!davidmb4f14592004-10-15 13:48:38 +0000115Gtest_bt_SOURCES = Gtest-bt.c ident.c
116Ltest_bt_SOURCES = Ltest-bt.c ident.c
117test_ptrace_misc_SOURCES = test-ptrace-misc.c ident.c
Arun Sharma576b59e2009-03-15 11:24:43 -0700118Ltest_nomalloc_SOURCES = Ltest-nomalloc.c
Arun Sharmad86155f2011-04-05 20:46:24 -0700119Ltest_nocalloc_SOURCES = Ltest-nocalloc.c
Lassi Tuura9e98f152011-03-19 10:00:48 +0100120Gtest_trace_SOURCES = Gtest-trace.c ident.c
121Ltest_trace_SOURCES = Ltest-trace.c ident.c
Arun Sharma576b59e2009-03-15 11:24:43 -0700122
Ken Wernerd589e202011-04-06 10:27:51 +0200123LIBUNWIND = $(top_builddir)/src/libunwind-$(arch).la
Arun Sharma201bb872012-08-18 12:37:00 -0700124LIBUNWIND_ptrace = $(top_builddir)/src/libunwind-ptrace.la
Martin Milatade28c512012-06-29 11:28:29 +0200125LIBUNWIND_coredump = $(top_builddir)/src/libunwind-coredump.la
Arun Sharma57695512011-03-22 08:34:33 -0700126
127if USE_ELF32
128LIBUNWIND_ELF = $(top_builddir)/src/libunwind-elf32.la
129endif
130if USE_ELF64
131LIBUNWIND_ELF = $(top_builddir)/src/libunwind-elf64.la
132endif
133if USE_ELFXX
134LIBUNWIND_ELF = $(top_builddir)/src/libunwind-elfxx.la
135endif
136
Ken Wernerc2cc1222011-03-02 17:40:06 +0100137LIBUNWIND_setjmp = $(top_builddir)/src/libunwind-setjmp.la \
Arun Sharma57695512011-03-22 08:34:33 -0700138 $(LIBUNWIND_ELF) $(LIBUNWIND)
Zachary T Welch7e767a22010-11-08 17:16:34 -0800139
Ken Wernerd589e202011-04-06 10:27:51 +0200140test_async_sig_LDADD = $(LIBUNWIND_local) -lpthread
141test_flush_cache_LDADD = $(LIBUNWIND_local)
Arun Sharma42b67082011-10-15 22:55:35 -0700142test_init_remote_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
143test_mem_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
Ken Wernerc2cc1222011-03-02 17:40:06 +0100144test_ptrace_LDADD = $(LIBUNWIND_ptrace) $(LIBUNWIND)
145test_proc_info_LDADD = $(LIBUNWIND)
146test_static_link_LDADD = $(LIBUNWIND)
147test_strerror_LDADD = $(LIBUNWIND)
Tommi Rantala643fc922012-09-17 14:06:05 +0300148Lrs_race_LDADD = $(LIBUNWIND_local) -lpthread
Tommi Rantalabe230ad2012-09-14 14:29:02 +0300149Ltest_varargs_LDADD = $(LIBUNWIND_local)
Zachary T Welch7e767a22010-11-08 17:16:34 -0800150
Arun Sharma42b67082011-10-15 22:55:35 -0700151Gtest_bt_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
152Gtest_concurrent_LDADD = $(LIBUNWIND) $(LIBUNWIND_local) -lpthread
Ken Wernerd589e202011-04-06 10:27:51 +0200153Gtest_dyn1_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
Arun Sharma42b67082011-10-15 22:55:35 -0700154Gtest_exc_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
155Gtest_init_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
156Gtest_resume_sig_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
Tommi Rantala5b55e552012-08-10 10:54:09 +0300157Gtest_resume_sig_rt_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
Arun Sharma1d8e2c12011-09-10 19:56:54 -0700158Gperf_simple_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
Ken Wernerd589e202011-04-06 10:27:51 +0200159Gtest_trace_LDADD=$(LIBUNWIND) $(LIBUNWIND_local)
Arun Sharma1d8e2c12011-09-10 19:56:54 -0700160Gperf_trace_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
Zachary T Welch7e767a22010-11-08 17:16:34 -0800161
162Ltest_bt_LDADD = $(LIBUNWIND_local)
163Ltest_concurrent_LDADD = $(LIBUNWIND_local) -lpthread
164Ltest_dyn1_LDADD = $(LIBUNWIND_local)
165Ltest_exc_LDADD = $(LIBUNWIND_local)
166Ltest_init_LDADD = $(LIBUNWIND_local)
167Ltest_nomalloc_LDADD = $(LIBUNWIND_local) @DLLIB@
Arun Sharmad86155f2011-04-05 20:46:24 -0700168Ltest_nocalloc_LDADD = $(LIBUNWIND_local) @DLLIB@ -lpthread
Ken Wernerd589e202011-04-06 10:27:51 +0200169Ltest_resume_sig_LDADD = $(LIBUNWIND_local)
Tommi Rantala5b55e552012-08-10 10:54:09 +0300170Ltest_resume_sig_rt_LDADD = $(LIBUNWIND_local)
Zachary T Welch7e767a22010-11-08 17:16:34 -0800171Lperf_simple_LDADD = $(LIBUNWIND_local)
Arun Sharma7ff83c02011-03-24 23:25:43 -0700172Ltest_trace_LDADD = $(LIBUNWIND_local)
Arun Sharma741a5a22011-03-24 23:47:25 -0700173Lperf_trace_LDADD = $(LIBUNWIND_local)
Zachary T Welch7e767a22010-11-08 17:16:34 -0800174
Ken Wernerc2cc1222011-03-02 17:40:06 +0100175test_setjmp_LDADD = $(LIBUNWIND_setjmp)
176ia64_test_setjmp_LDADD = $(LIBUNWIND_setjmp)
Arun Sharma7ff83c02011-03-24 23:25:43 -0700177
Cody P Schafer3a5d7ff2012-09-14 17:11:50 -0700178if BUILD_COREDUMP
Arun Sharmaf0bb8062012-03-12 19:07:28 -0700179test_coredump_unwind_LDADD = $(LIBUNWIND_coredump) $(LIBUNWIND)
Cody P Schafer3a5d7ff2012-09-14 17:11:50 -0700180endif
Martin Milatad93d96a2012-05-22 11:51:06 +0200181
182Gia64_test_nat_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
183Gia64_test_stack_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
184Gia64_test_rbs_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
185Gia64_test_readonly_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
186Lia64_test_nat_LDADD = $(LIBUNWIND_local)
187Lia64_test_stack_LDADD = $(LIBUNWIND_local)
188Lia64_test_rbs_LDADD = $(LIBUNWIND_local)
189Lia64_test_readonly_LDADD = $(LIBUNWIND_local)
190ia64_test_dyn1_LDADD = $(LIBUNWIND)
191ia64_test_sig_LDADD = $(LIBUNWIND)