blob: a981d635ced01a410f5c3b0392171f9dba146899 [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 \
Arun Sharma982d5902010-08-04 15:11:19 -07004 run-check-namespace check-namespace.sh.in Gtest-nomalloc.c
mostang.com!davidm623c4cb2003-03-06 06:14:36 +00005
Zachary T Welch651e9bb2010-10-28 16:25:51 -07006MAINTAINERCLEANFILES = Makefile.in
7
hp.com!davidm0f1a0c42002-04-03 06:51:34 +00008noinst_PROGRAMS_common =
homeip.net!davidm3eb739d2004-08-19 14:03:54 +00009check_PROGRAMS_common = test-proc-info test-static-link \
bea.com!thallgre42a90f12004-08-18 15:16:46 +000010 test-strerror
mostang.com!davidm5a468e32004-05-05 01:58:44 +000011check_SCRIPTS_common = run-check-namespace
hp.com!davidm0f1a0c42002-04-03 06:51:34 +000012
13if REMOTE_ONLY
mostang.com!davidm405a7d82003-02-27 09:58:57 +000014 check_SCRIPTS_cdep =
15 check_PROGRAMS_cdep =
mostang.com!davidm282413e2003-01-23 18:47:51 +000016 noinst_PROGRAMS_cdep = $(noinst_PROGRAMS_common)
mostang.com!davidm0378f952004-01-21 06:36:35 +000017
18perf:
19
hp.com!davidm0f1a0c42002-04-03 06:51:34 +000020else
Zachary T Welch7e767a22010-11-08 17:16:34 -080021 LIBUNWIND_local = $(top_builddir)/src/libunwind.la
mostang.com!davidm053cda22002-04-25 06:47:29 +000022if ARCH_IA64
hp.com!davidm8f2272c2004-08-31 13:59:10 +000023 noinst_PROGRAMS_arch = ia64-test-dyn1
mostang.com!davidm405a7d82003-02-27 09:58:57 +000024 check_SCRIPTS_arch = run-ia64-test-dyn1
hp.com!davidm86bef152004-05-06 20:26:29 +000025 check_PROGRAMS_arch = Gia64-test-stack Lia64-test-stack \
26 Gia64-test-nat Lia64-test-nat \
27 Gia64-test-rbs Lia64-test-rbs \
hp.com!davidm8f2272c2004-08-31 13:59:10 +000028 Gia64-test-readonly Lia64-test-readonly \
29 ia64-test-setjmp ia64-test-sig
Jose Flavio Aguilar Paulinob33021e2007-08-02 09:59:43 -060030else
31if ARCH_PPC64
Arun Sharma0613d4c2011-03-22 08:40:49 -070032if USE_ALTIVEC
Jose Flavio Aguilar Paulinoa1e7ee42007-08-06 20:23:42 -060033 noinst_PROGRAMS_arch_altivec = ppc64-test-altivec ppc64-test-wchar
34endif #USE_ALTIVEC
Arun Sharma0613d4c2011-03-22 08:40:49 -070035 noinst_PROGRAMS_arch = $(noinst_PROGRAMS_arch_altivec) ppc64-test-wchar
Jose Flavio Aguilar Paulinob33021e2007-08-02 09:59:43 -060036endif #ARCH_PPC64
37endif #ARCH_IA64
hp.com!davidmb4f14592004-10-15 13:48:38 +000038 check_SCRIPTS_cdep = run-ptrace-mapper run-ptrace-misc
hp.com!davidmdfa582a2004-09-15 11:37:04 +000039 check_PROGRAMS_cdep = Gtest-bt Ltest-bt Gtest-exc Ltest-exc \
40 Gtest-init Ltest-init \
41 Gtest-concurrent Ltest-concurrent \
42 Gtest-resume-sig Ltest-resume-sig \
43 Gtest-dyn1 Ltest-dyn1 \
Lassi Tuura9e98f152011-03-19 10:00:48 +010044 Gtest-trace Ltest-trace \
hp.com!davidmdfa582a2004-09-15 11:37:04 +000045 test-async-sig test-flush-cache test-init-remote \
Arun Sharma576b59e2009-03-15 11:24:43 -070046 test-mem test-setjmp test-ptrace \
Paul Pluzhnikov9626d662009-11-24 15:18:48 -080047 Ltest-nomalloc rs-race
hp.com!davidmb4f14592004-10-15 13:48:38 +000048 noinst_PROGRAMS_cdep = forker mapper test-ptrace-misc test-varargs \
49 Gperf-simple Lperf-simple
mostang.com!davidm0378f952004-01-21 06:36:35 +000050
Arun Sharmac2d78042010-04-12 12:08:21 -070051if SUPPORT_CXX_EXCEPTIONS
52 check_PROGRAMS_cdep += Ltest-cxx-exceptions
53endif
54
mostang.com!davidm0378f952004-01-21 06:36:35 +000055perf: perf-startup Gperf-simple Lperf-simple
56 @echo "########## Basic performance of generic libunwind:"
57 @./Gperf-simple
58 @echo "########## Basic performance of local-only libunwind:"
59 @./Lperf-simple
60 @echo "########## Startup overhead:"
61 @$(srcdir)/perf-startup @arch@
62
hp.com!davidm0f1a0c42002-04-03 06:51:34 +000063endif
64
mostang.com!davidm405a7d82003-02-27 09:58:57 +000065check_PROGRAMS = $(check_PROGRAMS_common) $(check_PROGRAMS_cdep) \
66 $(check_PROGRAMS_arch)
67check_SCRIPTS = $(check_SCRIPTS_common) $(check_SCRIPTS_cdep) \
68 $(check_SCRIPTS_arch)
mostang.com!davidm282413e2003-01-23 18:47:51 +000069
mostang.com!davidm405a7d82003-02-27 09:58:57 +000070
71TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
mostang.com!davidm282413e2003-01-23 18:47:51 +000072
73noinst_PROGRAMS = $(noinst_PROGRAMS_common) $(noinst_PROGRAMS_cdep) \
74 $(noinst_PROGRAMS_arch)
75
hp.com!davidm86bef152004-05-06 20:26:29 +000076Lia64_test_readonly_SOURCES = Lia64-test-readonly.c ia64-test-readonly-asm.S
77Gia64_test_readonly_SOURCES = Gia64-test-readonly.c ia64-test-readonly-asm.S
mostang.com!davidm623c4cb2003-03-06 06:14:36 +000078Lia64_test_stack_SOURCES = Lia64-test-stack.c ia64-test-stack-asm.S \
79 ia64-test-stack.h
80Gia64_test_stack_SOURCES = Gia64-test-stack.c ia64-test-stack-asm.S \
81 ia64-test-stack.h
82Lia64_test_rbs_SOURCES = Lia64-test-rbs.c ia64-test-rbs-asm.S ia64-test-rbs.h
83Gia64_test_rbs_SOURCES = Gia64-test-rbs.c ia64-test-rbs-asm.S ia64-test-rbs.h
mostang.com!davidm899323c2004-02-14 07:53:31 +000084Lia64_test_nat_SOURCES = Lia64-test-nat.c ia64-test-nat-asm.S
85Gia64_test_nat_SOURCES = Gia64-test-nat.c ia64-test-nat-asm.S
mostang.com!davidm0231ae52003-03-27 04:29:07 +000086ia64_test_dyn1_SOURCES = ia64-test-dyn1.c ia64-dyn-asm.S flush-cache.S
Jose Flavio Aguilar Paulinob33021e2007-08-02 09:59:43 -060087ppc64_test_altivec_SOURCES = ppc64-test-altivec.c ppc64-test-altivec-utils.c
88ppc64_test_wchar_SOURCES = ppc64-test-wchar.c
mostang.com!davidm9fe5e682003-03-28 07:43:22 +000089Gtest_init_SOURCES = Gtest-init.cxx
90Ltest_init_SOURCES = Ltest-init.cxx
Arun Sharmac2d78042010-04-12 12:08:21 -070091Ltest_cxx_exceptions_SOURCES = Ltest-cxx-exceptions.cxx
92
mostang.com!davidm0231ae52003-03-27 04:29:07 +000093Gtest_dyn1_SOURCES = Gtest-dyn1.c flush-cache.S
94Ltest_dyn1_SOURCES = Ltest-dyn1.c flush-cache.S
mostang.com!davidm0378f952004-01-21 06:36:35 +000095test_static_link_SOURCES = test-static-link-loc.c test-static-link-gen.c
mostang.com!davidm4de259b2004-05-04 22:24:50 +000096test_static_link_LDFLAGS = -static
97forker_LDFLAGS = -static
hp.com!davidmb4f14592004-10-15 13:48:38 +000098Gtest_bt_SOURCES = Gtest-bt.c ident.c
99Ltest_bt_SOURCES = Ltest-bt.c ident.c
100test_ptrace_misc_SOURCES = test-ptrace-misc.c ident.c
Arun Sharma576b59e2009-03-15 11:24:43 -0700101Ltest_nomalloc_SOURCES = Ltest-nomalloc.c
Lassi Tuura9e98f152011-03-19 10:00:48 +0100102Gtest_trace_SOURCES = Gtest-trace.c ident.c
103Ltest_trace_SOURCES = Ltest-trace.c ident.c
Arun Sharma576b59e2009-03-15 11:24:43 -0700104
Arun Sharma0613d4c2011-03-22 08:40:49 -0700105LIBUNWIND = $(top_builddir)/src/libunwind-$(arch).la $(LIBUNWIND_local)
Zachary T Welch7e767a22010-11-08 17:16:34 -0800106LIBUNWIND_ptrace = $(top_builddir)/src/libunwind-ptrace.a
Arun Sharma57695512011-03-22 08:34:33 -0700107
108if USE_ELF32
109LIBUNWIND_ELF = $(top_builddir)/src/libunwind-elf32.la
110endif
111if USE_ELF64
112LIBUNWIND_ELF = $(top_builddir)/src/libunwind-elf64.la
113endif
114if USE_ELFXX
115LIBUNWIND_ELF = $(top_builddir)/src/libunwind-elfxx.la
116endif
117
Ken Wernerc2cc1222011-03-02 17:40:06 +0100118LIBUNWIND_setjmp = $(top_builddir)/src/libunwind-setjmp.la \
Arun Sharma57695512011-03-22 08:34:33 -0700119 $(LIBUNWIND_ELF) $(LIBUNWIND)
Zachary T Welch7e767a22010-11-08 17:16:34 -0800120
Ken Wernerc2cc1222011-03-02 17:40:06 +0100121test_async_sig_LDADD = $(LIBUNWIND) -lpthread
122test_flush_cache_LDADD = $(LIBUNWIND)
123test_init_remote_LDADD = $(LIBUNWIND)
124test_mem_LDADD = $(LIBUNWIND)
125test_ptrace_LDADD = $(LIBUNWIND_ptrace) $(LIBUNWIND)
126test_proc_info_LDADD = $(LIBUNWIND)
127test_static_link_LDADD = $(LIBUNWIND)
128test_strerror_LDADD = $(LIBUNWIND)
129rs_race_LDADD = $(LIBUNWIND) -lpthread
Konstantin Belousov04fc88f2011-03-22 21:29:40 +0200130test_varargs_LDADD = @BACKTRACELIB@
Zachary T Welch7e767a22010-11-08 17:16:34 -0800131
Ken Wernerc2cc1222011-03-02 17:40:06 +0100132Gtest_bt_LDADD = $(LIBUNWIND)
133Gtest_concurrent_LDADD = $(LIBUNWIND) -lpthread
134Gtest_dyn1_LDADD = $(LIBUNWIND)
135Gtest_exc_LDADD = $(LIBUNWIND)
136Gtest_init_LDADD = $(LIBUNWIND)
137Gtest_resume_sig_LDADD = $(LIBUNWIND)
138Gperf_simple_LDADD = $(LIBUNWIND)
Zachary T Welch7e767a22010-11-08 17:16:34 -0800139
140Ltest_bt_LDADD = $(LIBUNWIND_local)
141Ltest_concurrent_LDADD = $(LIBUNWIND_local) -lpthread
142Ltest_dyn1_LDADD = $(LIBUNWIND_local)
143Ltest_exc_LDADD = $(LIBUNWIND_local)
144Ltest_init_LDADD = $(LIBUNWIND_local)
145Ltest_nomalloc_LDADD = $(LIBUNWIND_local) @DLLIB@
Ken Wernerc2cc1222011-03-02 17:40:06 +0100146Ltest_resume_sig_LDADD = $(LIBUNWIND)
Zachary T Welch7e767a22010-11-08 17:16:34 -0800147Lperf_simple_LDADD = $(LIBUNWIND_local)
148
Ken Wernerc2cc1222011-03-02 17:40:06 +0100149test_setjmp_LDADD = $(LIBUNWIND_setjmp)
150ia64_test_setjmp_LDADD = $(LIBUNWIND_setjmp)