blob: b87cbab7fba6a160a2bae627a8fc0a50cb1527e4 [file] [log] [blame]
homeip.net!davidmccdd6442004-08-19 10:45:23 +00001SOVERSION=7:0:0 # See comments at end of file.
mostang.com!davidmad7f1472003-02-08 10:10:59 +00002SETJMP_SO_VERSION=0:0:0
hp.com!davidmed32b992004-04-20 16:53:44 +00003#
hp.com!davidm16af7ae2005-05-03 09:13:17 +00004# Don't link with start-files since we don't use any constructors/destructors:
hp.com!davidmed32b992004-04-20 16:53:44 +00005#
hp.com!davidm16af7ae2005-05-03 09:13:17 +00006COMMON_SO_LDFLAGS = -XCClinker -nostartfiles
mostang.com!davidma6d51ee2002-04-25 06:47:29 +00007
Zachary T Welchb07829b2010-11-08 17:16:37 -08008lib_LIBRARIES =
9lib_LTLIBRARIES =
10if !REMOTE_ONLY
11lib_LIBRARIES += libunwind-ptrace.a
12lib_LTLIBRARIES += libunwind.la libunwind-setjmp.la
hp.com!davidm16566632004-01-03 10:50:24 +000013endif
mostang.com!davidmad7f1472003-02-08 10:10:59 +000014
Zachary T Welch02dd6c42010-11-08 17:16:39 -080015noinst_HEADERS =
Zachary T Welch9de666d2010-11-08 17:16:38 -080016noinst_LTLIBRARIES =
17
hp.com!davidm16566632004-01-03 10:50:24 +000018### libunwind-ptrace:
hp.com!davidm1738b3b2004-01-30 00:01:24 +000019libunwind_ptrace_a_SOURCES = \
hp.com!davidm16af7ae2005-05-03 09:13:17 +000020 ptrace/_UPT_elf.c \
hp.com!davidm1738b3b2004-01-30 00:01:24 +000021 ptrace/_UPT_accessors.c ptrace/_UPT_access_fpreg.c \
22 ptrace/_UPT_access_mem.c ptrace/_UPT_access_reg.c \
23 ptrace/_UPT_create.c ptrace/_UPT_destroy.c \
24 ptrace/_UPT_find_proc_info.c ptrace/_UPT_get_dyn_info_list_addr.c \
25 ptrace/_UPT_put_unwind_info.c ptrace/_UPT_get_proc_name.c \
26 ptrace/_UPT_reg_offset.c ptrace/_UPT_resume.c
Zachary T Welch02dd6c42010-11-08 17:16:39 -080027noinst_HEADERS += ptrace/_UPT_internal.h
hp.com!davidm16566632004-01-03 10:50:24 +000028
29### libunwind-setjmp:
hp.com!davidmed32b992004-04-20 16:53:44 +000030libunwind_setjmp_la_LDFLAGS = $(COMMON_SO_LDFLAGS) \
31 -version-info $(SETJMP_SO_VERSION)
Ken Werner4a89b882011-03-02 17:40:08 +010032
33if USE_ELF32
34LIBUNWIND_ELF = libunwind-elf32.la
35endif
36if USE_ELF64
37LIBUNWIND_ELF = libunwind-elf64.la
38endif
39if USE_ELFXX
40LIBUNWIND_ELF = libunwind-elfxx.la
41endif
42
43libunwind_setjmp_la_LIBADD = $(LIBUNWIND_ELF) \
44 libunwind-$(arch).la \
45 libunwind.la -lc
Zachary T Welch02dd6c42010-11-08 17:16:39 -080046libunwind_setjmp_la_SOURCES = setjmp/longjmp.c \
hp.com!davidm16af7ae2005-05-03 09:13:17 +000047 setjmp/siglongjmp.c
Zachary T Welch02dd6c42010-11-08 17:16:39 -080048noinst_HEADERS += setjmp/setjmp_i.h
hp.com!davidm16566632004-01-03 10:50:24 +000049
50### libunwind:
Zachary T Welch9de666d2010-11-08 17:16:38 -080051libunwind_la_LIBADD =
hp.com!davidm16566632004-01-03 10:50:24 +000052
mostang.com!davidma6b0ccf2004-01-14 06:21:52 +000053# List of arch-independent files needed by both local-only and generic
54# libraries:
Arun Sharma516304a2011-02-01 20:35:59 -080055libunwind_la_SOURCES_common = \
56 $(libunwind_la_SOURCES_os) \
bea.com!thallgrecb503ba2004-08-18 15:16:46 +000057 mi/init.c mi/flush_cache.c mi/mempool.c mi/strerror.c
hp.com!davidm16566632004-01-03 10:50:24 +000058
59# List of arch-independent files needed by generic library (libunwind-$ARCH):
Arun Sharma516304a2011-02-01 20:35:59 -080060libunwind_la_SOURCES_generic = \
hp.com!davidm1738b3b2004-01-30 00:01:24 +000061 mi/Gdyn-extract.c mi/Gdyn-remote.c mi/Gfind_dynamic_proc_info.c \
62 mi/Gget_accessors.c \
63 mi/Gget_proc_info_by_ip.c mi/Gget_proc_name.c \
64 mi/Gput_dynamic_unwind_info.c mi/Gdestroy_addr_space.c \
65 mi/Gget_reg.c mi/Gset_reg.c \
66 mi/Gget_fpreg.c mi/Gset_fpreg.c \
67 mi/Gset_caching_policy.c
hp.com!davidm16566632004-01-03 10:50:24 +000068
Arun Sharma8081e822008-06-16 14:28:36 -060069if SUPPORT_CXX_EXCEPTIONS
Arun Sharma516304a2011-02-01 20:35:59 -080070libunwind_la_SOURCES_local_unwind = \
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -070071 unwind/Backtrace.c unwind/DeleteException.c \
72 unwind/FindEnclosingFunction.c unwind/ForcedUnwind.c \
73 unwind/GetBSP.c unwind/GetCFA.c unwind/GetDataRelBase.c \
74 unwind/GetGR.c unwind/GetIP.c unwind/GetLanguageSpecificData.c \
75 unwind/GetRegionStart.c unwind/GetTextRelBase.c \
76 unwind/RaiseException.c unwind/Resume.c \
Arun Sharma4b8404d2009-04-24 11:10:08 -070077 unwind/Resume_or_Rethrow.c unwind/SetGR.c unwind/SetIP.c \
78 unwind/GetIPInfo.c
Arun Sharma2fce5412009-04-02 15:49:37 -070079
Arun Sharma5822fca2009-03-15 21:14:27 -070080# _ReadULEB()/_ReadSLEB() are needed for Intel C++ 8.0 compatibility
Arun Sharma516304a2011-02-01 20:35:59 -080081libunwind_la_SOURCES_os_linux_local = mi/_ReadULEB.c mi/_ReadSLEB.c
Arun Sharma8081e822008-06-16 14:28:36 -060082endif
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -070083
hp.com!davidm16566632004-01-03 10:50:24 +000084# List of arch-independent files needed by local-only library (libunwind):
Arun Sharma516304a2011-02-01 20:35:59 -080085libunwind_la_SOURCES_local_nounwind = \
86 $(libunwind_la_SOURCES_os_local) \
hp.com!davidma50c7802004-03-30 01:56:19 +000087 mi/backtrace.c \
hp.com!davidm1738b3b2004-01-30 00:01:24 +000088 mi/dyn-cancel.c mi/dyn-info-list.c mi/dyn-register.c \
89 mi/Ldyn-extract.c mi/Lfind_dynamic_proc_info.c \
90 mi/Lget_accessors.c \
91 mi/Lget_proc_info_by_ip.c mi/Lget_proc_name.c \
92 mi/Lput_dynamic_unwind_info.c mi/Ldestroy_addr_space.c \
93 mi/Lget_reg.c mi/Lset_reg.c \
94 mi/Lget_fpreg.c mi/Lset_fpreg.c \
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -070095 mi/Lset_caching_policy.c
Arun Sharma516304a2011-02-01 20:35:59 -080096
97libunwind_la_SOURCES_local = \
98 $(libunwind_la_SOURCES_local_nounwind) \
99 $(libunwind_la_SOURCES_local_unwind)
hp.com!davidm02409462003-12-04 07:44:21 +0000100
Zachary T Welch02dd6c42010-11-08 17:16:39 -0800101noinst_HEADERS += os-linux.h
Arun Sharma516304a2011-02-01 20:35:59 -0800102libunwind_la_SOURCES_os_linux = os-linux.c
103
104libunwind_la_SOURCES_os_hpux = os-hpux.c
105
106libunwind_la_SOURCES_os_freebsd = os-freebsd.c
Konstantin Belousov2646e0f2010-03-06 17:47:52 +0200107
Zachary T Welch9de666d2010-11-08 17:16:38 -0800108libunwind_dwarf_common_la_SOURCES = dwarf/global.c
hp.com!davidmf06787a2004-01-22 08:36:15 +0000109
Zachary T Welch9de666d2010-11-08 17:16:38 -0800110libunwind_dwarf_local_la_SOURCES = \
111 dwarf/Lexpr.c dwarf/Lfde.c dwarf/Lparser.c dwarf/Lpe.c dwarf/Lstep.c \
112 dwarf/Lfind_proc_info-lsb.c
113libunwind_dwarf_local_la_LIBADD = libunwind-dwarf-common.la
hp.com!davidm23760812003-12-20 11:50:00 +0000114
Zachary T Welch9de666d2010-11-08 17:16:38 -0800115libunwind_dwarf_generic_la_SOURCES = \
116 dwarf/Gexpr.c dwarf/Gfde.c dwarf/Gparser.c dwarf/Gpe.c dwarf/Gstep.c \
117 dwarf/Gfind_proc_info-lsb.c
118libunwind_dwarf_generic_la_LIBADD = libunwind-dwarf-common.la
119
120if USE_DWARF
121 noinst_LTLIBRARIES += libunwind-dwarf-common.la libunwind-dwarf-generic.la
122if !REMOTE_ONLY
123 noinst_LTLIBRARIES += libunwind-dwarf-local.la
124endif
125 libunwind_la_LIBADD += libunwind-dwarf-local.la
126endif
mostang.com!davidm3ae9b812002-12-19 07:16:50 +0000127
Zachary T Welch02dd6c42010-11-08 17:16:39 -0800128noinst_HEADERS += elf32.h elf64.h elfxx.h
129
Zachary T Welchce847af2010-11-08 17:16:40 -0800130libunwind_elf32_la_SOURCES = elf32.c
131libunwind_elf64_la_SOURCES = elf64.c
132libunwind_elfxx_la_SOURCES = elfxx.c
133
Ken Werner4a89b882011-03-02 17:40:08 +0100134noinst_LTLIBRARIES += $(LIBUNWIND_ELF)
135libunwind_la_LIBADD += $(LIBUNWIND_ELF)
Zachary T Welchce847af2010-11-08 17:16:40 -0800136
Arun Sharma516304a2011-02-01 20:35:59 -0800137# The list of files that go into libunwind and libunwind-arm:
Zachary T Welchaf88cab2010-11-08 17:16:41 -0800138noinst_HEADERS += arm/init.h arm/offsets.h arm/unwind_i.h
Arun Sharma516304a2011-02-01 20:35:59 -0800139libunwind_la_SOURCES_arm_common = $(libunwind_la_SOURCES_common) \
140 arm/is_fpreg.c arm/regname.c
Zachary T Welchaf88cab2010-11-08 17:16:41 -0800141
Arun Sharma516304a2011-02-01 20:35:59 -0800142# The list of files that go into libunwind:
143libunwind_la_SOURCES_arm = $(libunwind_la_SOURCES_arm_common) \
144 $(libunwind_la_SOURCES_local) \
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700145 arm/getcontext.S \
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700146 arm/Lcreate_addr_space.c arm/Lget_proc_info.c arm/Lget_save_loc.c \
147 arm/Lglobal.c arm/Linit.c arm/Linit_local.c arm/Linit_remote.c \
148 arm/Lis_signal_frame.c arm/Lregs.c arm/Lresume.c arm/Lstep.c
149
Arun Sharma516304a2011-02-01 20:35:59 -0800150libunwind_arm_la_SOURCES_arm = $(libunwind_la_SOURCES_arm_common) \
151 $(libunwind_la_SOURCES_generic) \
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700152 arm/Gcreate_addr_space.c arm/Gget_proc_info.c arm/Gget_save_loc.c \
153 arm/Gglobal.c arm/Ginit.c arm/Ginit_local.c arm/Ginit_remote.c \
154 arm/Gis_signal_frame.c arm/Gregs.c arm/Gresume.c arm/Gstep.c
155
Arun Sharma516304a2011-02-01 20:35:59 -0800156# The list of files that go both into libunwind and libunwind-ia64:
Zachary T Welch02dd6c42010-11-08 17:16:39 -0800157noinst_HEADERS += ia64/init.h ia64/offsets.h ia64/regs.h \
158 ia64/ucontext_i.h ia64/unwind_decoder.h ia64/unwind_i.h
Arun Sharma516304a2011-02-01 20:35:59 -0800159libunwind_la_SOURCES_ia64_common = $(libunwind_la_SOURCES_common) \
160 ia64/regname.c
hp.com!davidm16566632004-01-03 10:50:24 +0000161
Arun Sharma516304a2011-02-01 20:35:59 -0800162# The list of files that go into libunwind:
163libunwind_la_SOURCES_ia64 = $(libunwind_la_SOURCES_ia64_common) \
164 $(libunwind_la_SOURCES_local) \
165 \
homeip.net!davidmbf2c4542004-08-17 15:34:28 +0000166 ia64/dyn_info_list.S ia64/getcontext.S \
167 \
168 ia64/Lcreate_addr_space.c ia64/Lget_proc_info.c ia64/Lget_save_loc.c \
169 ia64/Lglobal.c ia64/Linit.c ia64/Linit_local.c ia64/Linit_remote.c \
170 ia64/Linstall_cursor.S ia64/Lis_signal_frame.c ia64/Lparser.c \
171 ia64/Lrbs.c ia64/Lregs.c ia64/Lresume.c ia64/Lscript.c ia64/Lstep.c \
172 ia64/Ltables.c
hp.com!davidm16566632004-01-03 10:50:24 +0000173
Arun Sharma516304a2011-02-01 20:35:59 -0800174# The list of files that go into libunwind-ia64:
175libunwind_ia64_la_SOURCES_ia64 = $(libunwind_la_SOURCES_ia64_common) \
176 $(libunwind_la_SOURCES_generic) \
homeip.net!davidmbf2c4542004-08-17 15:34:28 +0000177 ia64/Gcreate_addr_space.c ia64/Gget_proc_info.c ia64/Gget_save_loc.c \
178 ia64/Gglobal.c ia64/Ginit.c ia64/Ginit_local.c ia64/Ginit_remote.c \
179 ia64/Ginstall_cursor.S ia64/Gis_signal_frame.c ia64/Gparser.c \
180 ia64/Grbs.c ia64/Gregs.c ia64/Gresume.c ia64/Gscript.c ia64/Gstep.c \
181 ia64/Gtables.c
hp.com!davidm6432d812002-04-05 23:37:55 +0000182
Arun Sharma516304a2011-02-01 20:35:59 -0800183# The list of files that go both into libunwind and libunwind-hppa:
Zachary T Welch02dd6c42010-11-08 17:16:39 -0800184noinst_HEADERS += hppa/init.h hppa/offsets.h hppa/unwind_i.h
Arun Sharma516304a2011-02-01 20:35:59 -0800185libunwind_la_SOURCES_hppa_common = $(libunwind_la_SOURCES_common) \
186 hppa/regname.c
hp.com!davidm16af7ae2005-05-03 09:13:17 +0000187
Arun Sharma516304a2011-02-01 20:35:59 -0800188# The list of files that go into libunwind:
189libunwind_la_SOURCES_hppa = $(libunwind_la_SOURCES_hppa_common) \
190 $(libunwind_la_SOURCES_local) \
hp.com!davidm16af7ae2005-05-03 09:13:17 +0000191 hppa/getcontext.S hppa/setcontext.S \
hp.com!davidm16af7ae2005-05-03 09:13:17 +0000192 hppa/Lcreate_addr_space.c hppa/Lget_save_loc.c hppa/Lglobal.c \
193 hppa/Linit.c hppa/Linit_local.c hppa/Linit_remote.c \
194 hppa/Lis_signal_frame.c hppa/Lget_proc_info.c hppa/Lregs.c \
195 hppa/Lresume.c hppa/Lstep.c
196
Arun Sharma516304a2011-02-01 20:35:59 -0800197# The list of files that go into libunwind-hppa:
198libunwind_hppa_la_SOURCES_hppa = $(libunwind_la_SOURCES_hppa_common) \
199 $(libunwind_la_SOURCES_generic) \
hp.com!davidm16af7ae2005-05-03 09:13:17 +0000200 hppa/Gcreate_addr_space.c hppa/Gget_save_loc.c hppa/Gglobal.c \
201 hppa/Ginit.c hppa/Ginit_local.c hppa/Ginit_remote.c \
202 hppa/Gis_signal_frame.c hppa/Gget_proc_info.c hppa/Gregs.c \
203 hppa/Gresume.c hppa/Gstep.c
mostang.com!davidmf6c7a652003-01-14 07:11:56 +0000204
Arun Sharma516304a2011-02-01 20:35:59 -0800205# The list of files that go info libunwind and libunwind-mips:
Zachary T Welch02dd6c42010-11-08 17:16:39 -0800206noinst_HEADERS += mips/init.h mips/offsets.h
Arun Sharma516304a2011-02-01 20:35:59 -0800207libunwind_la_SOURCES_mips_common = $(libunwind_la_SOURCES_common) \
208 mips/is_fpreg.c mips/regname.c
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700209
Arun Sharma516304a2011-02-01 20:35:59 -0800210# The list of files that go into libunwind:
211libunwind_la_SOURCES_mips = $(libunwind_la_SOURCES_mips_common) \
212 $(libunwind_la_SOURCES_local) \
213 mips/getcontext.S \
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700214 mips/Lcreate_addr_space.c mips/Lget_proc_info.c mips/Lget_save_loc.c \
215 mips/Lglobal.c mips/Linit.c mips/Linit_local.c mips/Linit_remote.c \
216 mips/Lis_signal_frame.c mips/Lregs.c mips/Lresume.c mips/Lstep.c
217
Arun Sharma516304a2011-02-01 20:35:59 -0800218libunwind_mips_la_SOURCES_mips = $(libunwind_la_SOURCES_mips_common) \
219 $(libunwind_la_SOURCES_generic) \
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700220 mips/Gcreate_addr_space.c mips/Gget_proc_info.c mips/Gget_save_loc.c \
Arun Sharma516304a2011-02-01 20:35:59 -0800221 mips/Gglobal.c mips/Ginit.c mips/Ginit_local.c mips/Ginit_remote.c \
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700222 mips/Gis_signal_frame.c mips/Gregs.c mips/Gresume.c mips/Gstep.c
223
Arun Sharma516304a2011-02-01 20:35:59 -0800224# The list of files that go both into libunwind and libunwind-x86:
Zachary T Welch02dd6c42010-11-08 17:16:39 -0800225noinst_HEADERS += x86/init.h x86/offsets.h x86/unwind_i.h
Arun Sharma516304a2011-02-01 20:35:59 -0800226libunwind_la_SOURCES_x86_common = $(libunwind_la_SOURCES_common) \
227 x86/is_fpreg.c x86/regname.c
hp.com!davidm16566632004-01-03 10:50:24 +0000228
Arun Sharma516304a2011-02-01 20:35:59 -0800229# The list of files that go into libunwind:
230libunwind_la_SOURCES_x86 = $(libunwind_la_SOURCES_x86_common) \
231 $(libunwind_la_SOURCES_x86_os_local) \
232 $(libunwind_la_SOURCES_local) \
homeip.net!davidmbf2c4542004-08-17 15:34:28 +0000233 x86/Lcreate_addr_space.c x86/Lget_save_loc.c x86/Lglobal.c \
234 x86/Linit.c x86/Linit_local.c x86/Linit_remote.c \
Arun Sharma8e53e622010-04-04 16:17:32 -0700235 x86/Lget_proc_info.c x86/Lregs.c \
Konstantin Belousovae7eebb2010-04-13 14:11:39 +0300236 x86/Lresume.c x86/Lstep.c
mostang.com!davidmf6c7a652003-01-14 07:11:56 +0000237
Arun Sharma516304a2011-02-01 20:35:59 -0800238# The list of files that go into libunwind-x86:
239libunwind_x86_la_SOURCES_x86 = $(libunwind_la_SOURCES_x86_common) \
240 $(libunwind_la_SOURCES_x86_os) \
241 $(libunwind_la_SOURCES_generic) \
homeip.net!davidmbf2c4542004-08-17 15:34:28 +0000242 x86/Gcreate_addr_space.c x86/Gget_save_loc.c x86/Gglobal.c \
243 x86/Ginit.c x86/Ginit_local.c x86/Ginit_remote.c \
Arun Sharma8e53e622010-04-04 16:17:32 -0700244 x86/Gget_proc_info.c x86/Gregs.c \
homeip.net!davidmbf2c4542004-08-17 15:34:28 +0000245 x86/Gresume.c x86/Gstep.c
hp.com!davidm16566632004-01-03 10:50:24 +0000246
Arun Sharma516304a2011-02-01 20:35:59 -0800247# The list of files that go both into libunwind and libunwind-x86_64:
Zachary T Welch02dd6c42010-11-08 17:16:39 -0800248noinst_HEADERS += x86_64/offsets.h \
249 x86_64/init.h x86_64/unwind_i.h x86_64/ucontext_i.h
Arun Sharma516304a2011-02-01 20:35:59 -0800250libunwind_la_SOURCES_x86_64_common = $(libunwind_la_SOURCES_common) \
251 x86_64/is_fpreg.c x86_64/regname.c
ibm.com!masbockaa9a9172004-08-19 13:39:10 +0000252
Arun Sharma516304a2011-02-01 20:35:59 -0800253# The list of files that go into libunwind:
254libunwind_la_SOURCES_x86_64 = $(libunwind_la_SOURCES_x86_64_common) \
255 $(libunwind_la_SOURCES_x86_64_os_local) \
256 $(libunwind_la_SOURCES_local) \
257 x86_64/setcontext.S \
ibm.com!masbockaa9a9172004-08-19 13:39:10 +0000258 x86_64/Lcreate_addr_space.c x86_64/Lget_save_loc.c x86_64/Lglobal.c \
259 x86_64/Linit.c x86_64/Linit_local.c x86_64/Linit_remote.c \
Arun Sharma8e53e622010-04-04 16:17:32 -0700260 x86_64/Lget_proc_info.c x86_64/Lregs.c \
Arun Sharmaef29ead2008-06-16 14:42:16 -0600261 x86_64/Lresume.c x86_64/Lstep.c x86_64/getcontext.S
ibm.com!masbockaa9a9172004-08-19 13:39:10 +0000262
Arun Sharma516304a2011-02-01 20:35:59 -0800263# The list of files that go into libunwind-x86_64:
264libunwind_x86_64_la_SOURCES_x86_64 = $(libunwind_la_SOURCES_x86_64_common) \
265 $(libunwind_la_SOURCES_x86_64_os) \
266 $(libunwind_la_SOURCES_generic) \
ibm.com!masbockaa9a9172004-08-19 13:39:10 +0000267 x86_64/Gcreate_addr_space.c x86_64/Gget_save_loc.c x86_64/Gglobal.c \
268 x86_64/Ginit.c x86_64/Ginit_local.c x86_64/Ginit_remote.c \
Arun Sharma8e53e622010-04-04 16:17:32 -0700269 x86_64/Gget_proc_info.c x86_64/Gregs.c \
ibm.com!masbockaa9a9172004-08-19 13:39:10 +0000270 x86_64/Gresume.c x86_64/Gstep.c
271
Arun Sharma516304a2011-02-01 20:35:59 -0800272# The list of local files that go to Power 64 and 32:
273libunwind_la_SOURCES_ppc = ppc/Lcreate_addr_space.c \
Jose Flavio Aguilar Paulino4499bb22007-09-12 21:52:25 -0600274 ppc/Lget_proc_info.c ppc/Lget_save_loc.c ppc/Linit_local.c \
275 ppc/Linit_remote.c ppc/Lis_signal_frame.c
276
Arun Sharma516304a2011-02-01 20:35:59 -0800277# The list of generic files that go to Power 64 and 32:
278libunwind_ppc_la_SOURCES_ppc_generic = ppc/Gcreate_addr_space.c \
Jose Flavio Aguilar Paulino4499bb22007-09-12 21:52:25 -0600279 ppc/Gget_proc_info.c ppc/Gget_save_loc.c ppc/Ginit_local.c \
280 ppc/Ginit_remote.c ppc/Gis_signal_frame.c
281
Arun Sharma516304a2011-02-01 20:35:59 -0800282# The list of files that go both into libunwind and libunwind-ppc32:
Zachary T Welch02dd6c42010-11-08 17:16:39 -0800283noinst_HEADERS += ppc32/init.h ppc32/unwind_i.h ppc32/ucontext_i.h
Arun Sharma516304a2011-02-01 20:35:59 -0800284libunwind_la_SOURCES_ppc32_common = $(libunwind_la_SOURCES_common) \
Zachary T Welchce847af2010-11-08 17:16:40 -0800285 ppc32/is_fpreg.c ppc32/regname.c ppc32/get_func_addr.c
Jose Flavio Aguilar Paulino4499bb22007-09-12 21:52:25 -0600286
Arun Sharma516304a2011-02-01 20:35:59 -0800287# The list of files that go into libunwind:
288libunwind_la_SOURCES_ppc32 = $(libunwind_la_SOURCES_ppc32_common) \
289 $(libunwind_la_SOURCES_local) \
290 $(libunwind_la_SOURCES_ppc) \
291 ppc32/Lglobal.c ppc32/Linit.c \
Jose Flavio Aguilar Paulino4499bb22007-09-12 21:52:25 -0600292 ppc32/Lregs.c ppc32/Lresume.c ppc32/Lstep.c
293
Arun Sharma516304a2011-02-01 20:35:59 -0800294# The list of files that go into libunwind-ppc32:
295libunwind_ppc32_la_SOURCES_ppc32 = $(libunwind_la_SOURCES_ppc32_common) \
296 $(libunwind_la_SOURCES_generic) \
297 $(libunwind_ppc_la_SOURCES_ppc_generic) \
298 ppc32/Gglobal.c ppc32/Ginit.c \
Jose Flavio Aguilar Paulino4499bb22007-09-12 21:52:25 -0600299 ppc32/Gregs.c ppc32/Gresume.c ppc32/Gstep.c
300
Arun Sharma516304a2011-02-01 20:35:59 -0800301# The list of files that go both into libunwind and libunwind-ppc64:
Zachary T Welch02dd6c42010-11-08 17:16:39 -0800302noinst_HEADERS += ppc64/init.h ppc64/unwind_i.h ppc64/ucontext_i.h
Arun Sharma516304a2011-02-01 20:35:59 -0800303libunwind_la_SOURCES_ppc64_common = $(libunwind_la_SOURCES_common) \
Zachary T Welchce847af2010-11-08 17:16:40 -0800304 ppc64/is_fpreg.c ppc64/regname.c ppc64/get_func_addr.c
Jose Flavio Aguilar Paulinob33021e2007-08-02 09:59:43 -0600305
Arun Sharma516304a2011-02-01 20:35:59 -0800306# The list of files that go into libunwind:
307libunwind_la_SOURCES_ppc64 = $(libunwind_la_SOURCES_ppc64_common) \
308 $(libunwind_la_SOURCES_local) \
309 $(libunwind_la_SOURCES_ppc) \
310 ppc64/Lglobal.c ppc64/Linit.c \
Jose Flavio Aguilar Paulino4499bb22007-09-12 21:52:25 -0600311 ppc64/Lregs.c ppc64/Lresume.c ppc64/Lstep.c
Jose Flavio Aguilar Paulinob33021e2007-08-02 09:59:43 -0600312
Arun Sharma516304a2011-02-01 20:35:59 -0800313# The list of files that go into libunwind-ppc64:
314libunwind_ppc64_la_SOURCES_ppc64 = $(libunwind_la_SOURCES_ppc64_common) \
315 $(libunwind_la_SOURCES_generic) \
316 $(libunwind_ppc_la_SOURCES_ppc_generic) \
317 ppc64/Gglobal.c ppc64/Ginit.c \
Jose Flavio Aguilar Paulino4499bb22007-09-12 21:52:25 -0600318 ppc64/Gregs.c ppc64/Gresume.c ppc64/Gstep.c
Jose Flavio Aguilar Paulinob33021e2007-08-02 09:59:43 -0600319
mostang.com!davidm0adb97c2003-03-19 19:25:18 +0000320if REMOTE_ONLY
mostang.com!davidm0adb97c2003-03-19 19:25:18 +0000321install-exec-hook:
322# Nothing to do here....
323else
mostang.com!davidm0adb97c2003-03-19 19:25:18 +0000324#
325# This is not ideal, but I know of no other way to install an
326# alias for a library.
327#
328install-exec-hook:
hp.com!davidm16566632004-01-03 10:50:24 +0000329 $(LN_S) -f libunwind-$(arch).a $(DESTDIR)$(libdir)/libunwind-generic.a
330 $(LN_S) -f libunwind-$(arch).so \
331 $(DESTDIR)$(libdir)/libunwind-generic.so
mostang.com!davidm0adb97c2003-03-19 19:25:18 +0000332endif
333
334if OS_LINUX
Arun Sharma516304a2011-02-01 20:35:59 -0800335 libunwind_la_SOURCES_os = $(libunwind_la_SOURCES_os_linux)
336 libunwind_la_SOURCES_os_local = $(libunwind_la_SOURCES_os_linux_local)
337 libunwind_la_SOURCES_x86_os = x86/Gos-linux.c
338 libunwind_x86_la_SOURCES_os = x86/getcontext-linux.S
339 libunwind_la_SOURCES_x86_os_local = x86/Los-linux.c
340 libunwind_la_SOURCES_x86_64_os = x86_64/Gos-linux.c
341 libunwind_la_SOURCES_x86_64_os_local = x86_64/Los-linux.c
mostang.com!davidm0adb97c2003-03-19 19:25:18 +0000342endif
Arun Sharma516304a2011-02-01 20:35:59 -0800343
344if OS_HPUX
345 libunwind_la_SOURCES_os = $(libunwind_la_SOURCES_os_hpux)
346 libunwind_la_SOURCES_os_local = $(libunwind_la_SOURCES_os_hpux_local)
mostang.com!davidm5929f8e2003-04-03 07:59:15 +0000347endif
348
Konstantin Belousov905034c2010-03-06 00:41:37 +0200349if OS_FREEBSD
Arun Sharma516304a2011-02-01 20:35:59 -0800350 libunwind_la_SOURCES_os = $(libunwind_la_SOURCES_os_freebsd)
351 libunwind_la_SOURCES_os_local = $(libunwind_la_SOURCES_os_freebsd_local)
352 libunwind_la_SOURCES_x86_os = x86/Gos-freebsd.c
353 libunwind_x86_la_SOURCES_os = x86/getcontext-freebsd.S
354 libunwind_la_SOURCES_x86_os_local = x86/Los-freebsd.c
355 libunwind_la_SOURCES_x86_64_os = x86_64/Gos-freebsd.c
356 libunwind_la_SOURCES_x86_64_os_local = x86_64/Los-freebsd.c
Konstantin Belousov905034c2010-03-06 00:41:37 +0200357endif
358
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700359if ARCH_ARM
Zachary T Welchb07829b2010-11-08 17:16:37 -0800360 lib_LTLIBRARIES += libunwind-arm.la
Arun Sharma516304a2011-02-01 20:35:59 -0800361 libunwind_la_SOURCES = $(libunwind_la_SOURCES_arm)
362 libunwind_arm_la_SOURCES = $(libunwind_arm_la_SOURCES_arm)
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700363 libunwind_arm_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
Arun Sharma516304a2011-02-01 20:35:59 -0800364 libunwind_arm_la_LIBADD = libunwind-dwarf-generic.la
Zachary T Welchce847af2010-11-08 17:16:40 -0800365 libunwind_arm_la_LIBADD += libunwind-elf32.la
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700366if !REMOTE_ONLY
Zachary T Welch9de666d2010-11-08 17:16:38 -0800367 libunwind_arm_la_LIBADD += libunwind.la -lc
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700368endif
Zachary T Welch64a82762010-11-08 17:16:36 -0800369 libunwind_setjmp_la_SOURCES += arm/siglongjmp.S
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700370else
hp.com!davidm6432d812002-04-05 23:37:55 +0000371if ARCH_IA64
hp.com!davidmf9c59cd2004-08-18 10:43:50 +0000372 ia64_mk_Gcursor_i_SOURCES = ia64/mk_Gcursor_i.c
373 ia64_mk_Lcursor_i_SOURCES = ia64/mk_Lcursor_i.c
homeip.net!davidmbf2c4542004-08-17 15:34:28 +0000374 noinst_PROGRAMS = ia64/mk_Gcursor_i ia64/mk_Lcursor_i
mostang.com!davidm8e85e812003-04-23 19:22:42 +0000375 BUILT_SOURCES = Gcursor_i.h Lcursor_i.h
homeip.net!davidmbf2c4542004-08-17 15:34:28 +0000376Gcursor_i.h: ia64/mk_Gcursor_i
377 ia64/mk_Gcursor_i > $@
378Lcursor_i.h: ia64/mk_Lcursor_i
379 ia64/mk_Lcursor_i > $@
Zachary T Welchb07829b2010-11-08 17:16:37 -0800380
381 lib_LTLIBRARIES += libunwind-ia64.la
Arun Sharma516304a2011-02-01 20:35:59 -0800382 libunwind_la_SOURCES = $(libunwind_la_SOURCES_ia64)
383 libunwind_ia64_la_SOURCES = $(libunwind_ia64_la_SOURCES_ia64)
hp.com!davidmed32b992004-04-20 16:53:44 +0000384 libunwind_ia64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
Arun Sharma516304a2011-02-01 20:35:59 -0800385 libunwind_ia64_la_LIBADD = libunwind-elf64.la
hp.com!davidmf06787a2004-01-22 08:36:15 +0000386if !REMOTE_ONLY
Zachary T Welchce847af2010-11-08 17:16:40 -0800387 libunwind_ia64_la_LIBADD += libunwind.la -lc
hp.com!davidmf06787a2004-01-22 08:36:15 +0000388endif
Zachary T Welch64a82762010-11-08 17:16:36 -0800389 libunwind_setjmp_la_SOURCES += ia64/setjmp.S ia64/sigsetjmp.S \
390 ia64/longjmp.S ia64/siglongjmp.S
hp.com!davidm6432d812002-04-05 23:37:55 +0000391else
mostang.com!davidmf6c7a652003-01-14 07:11:56 +0000392if ARCH_HPPA
Zachary T Welchb07829b2010-11-08 17:16:37 -0800393 lib_LTLIBRARIES += libunwind-hppa.la
Arun Sharma516304a2011-02-01 20:35:59 -0800394 libunwind_la_SOURCES = $(libunwind_la_SOURCES_hppa)
395 libunwind_hppa_la_SOURCES = $(libunwind_hppa_la_SOURCES_hppa)
hp.com!davidmed32b992004-04-20 16:53:44 +0000396 libunwind_hppa_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
Arun Sharma516304a2011-02-01 20:35:59 -0800397 libunwind_hppa_la_LIBADD = libunwind-dwarf-generic.la
Zachary T Welchce847af2010-11-08 17:16:40 -0800398 libunwind_hppa_la_LIBADD += libunwind-elf32.la
hp.com!davidmf06787a2004-01-22 08:36:15 +0000399if !REMOTE_ONLY
Zachary T Welch9de666d2010-11-08 17:16:38 -0800400 libunwind_hppa_la_LIBADD += libunwind.la -lc
hp.com!davidmf06787a2004-01-22 08:36:15 +0000401endif
Zachary T Welch64a82762010-11-08 17:16:36 -0800402 libunwind_setjmp_la_SOURCES += hppa/siglongjmp.S
mostang.com!davidmf6c7a652003-01-14 07:11:56 +0000403else
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700404if ARCH_MIPS
Zachary T Welchb07829b2010-11-08 17:16:37 -0800405 lib_LTLIBRARIES += libunwind-mips.la
Arun Sharma516304a2011-02-01 20:35:59 -0800406 libunwind_la_SOURCES = $(libunwind_la_SOURCES_mips)
407 libunwind_mips_la_SOURCES = $(libunwind_mips_la_SOURCES_mips)
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700408 libunwind_mips_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
Arun Sharma516304a2011-02-01 20:35:59 -0800409 libunwind_mips_la_LIBADD = libunwind-dwarf-generic.la
Zachary T Welchce847af2010-11-08 17:16:40 -0800410 libunwind_mips_la_LIBADD += libunwind-elfxx.la
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700411if !REMOTE_ONLY
Zachary T Welch9de666d2010-11-08 17:16:38 -0800412 libunwind_mips_la_LIBADD += libunwind.la -lc
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700413endif
Zachary T Welch64a82762010-11-08 17:16:36 -0800414 libunwind_setjmp_la_SOURCES += mips/siglongjmp.S
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700415else
mostang.com!davidm3ae9b812002-12-19 07:16:50 +0000416if ARCH_X86
Zachary T Welchb07829b2010-11-08 17:16:37 -0800417 lib_LTLIBRARIES += libunwind-x86.la
Arun Sharma516304a2011-02-01 20:35:59 -0800418 libunwind_la_SOURCES = $(libunwind_la_SOURCES_x86) $(libunwind_x86_la_SOURCES_os)
419 libunwind_x86_la_SOURCES = $(libunwind_x86_la_SOURCES_x86)
hp.com!davidmed32b992004-04-20 16:53:44 +0000420 libunwind_x86_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
Arun Sharma516304a2011-02-01 20:35:59 -0800421 libunwind_x86_la_LIBADD = libunwind-dwarf-generic.la
Zachary T Welchce847af2010-11-08 17:16:40 -0800422 libunwind_x86_la_LIBADD += libunwind-elf32.la
hp.com!davidmf06787a2004-01-22 08:36:15 +0000423if !REMOTE_ONLY
Zachary T Welch9de666d2010-11-08 17:16:38 -0800424 libunwind_x86_la_LIBADD += libunwind.la -lc
hp.com!davidmf06787a2004-01-22 08:36:15 +0000425endif
Zachary T Welch64a82762010-11-08 17:16:36 -0800426 libunwind_setjmp_la_SOURCES += x86/longjmp.S x86/siglongjmp.S
ibm.com!masbockaa9a9172004-08-19 13:39:10 +0000427else
428if ARCH_X86_64
Zachary T Welchb07829b2010-11-08 17:16:37 -0800429 lib_LTLIBRARIES += libunwind-x86_64.la
Arun Sharma516304a2011-02-01 20:35:59 -0800430 libunwind_la_SOURCES = $(libunwind_la_SOURCES_x86_64)
431 libunwind_x86_64_la_SOURCES = $(libunwind_x86_64_la_SOURCES_x86_64)
ibm.com!masbockaa9a9172004-08-19 13:39:10 +0000432 libunwind_x86_64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
Arun Sharma516304a2011-02-01 20:35:59 -0800433 libunwind_x86_64_la_LIBADD = libunwind-dwarf-generic.la
Zachary T Welchce847af2010-11-08 17:16:40 -0800434 libunwind_x86_64_la_LIBADD += libunwind-elf64.la
ibm.com!masbockaa9a9172004-08-19 13:39:10 +0000435if !REMOTE_ONLY
Zachary T Welch9de666d2010-11-08 17:16:38 -0800436 libunwind_x86_64_la_LIBADD += libunwind.la -lc
ibm.com!masbockaa9a9172004-08-19 13:39:10 +0000437endif
Zachary T Welch64a82762010-11-08 17:16:36 -0800438 libunwind_setjmp_la_SOURCES += x86_64/longjmp.S x86_64/siglongjmp.S
Jose Flavio Aguilar Paulino4499bb22007-09-12 21:52:25 -0600439else
440if ARCH_PPC32
Zachary T Welchb07829b2010-11-08 17:16:37 -0800441 lib_LTLIBRARIES += libunwind-ppc32.la
Arun Sharma516304a2011-02-01 20:35:59 -0800442 libunwind_la_SOURCES = $(libunwind_la_SOURCES_ppc32)
443 libunwind_ppc32_la_SOURCES = $(libunwind_ppc32_la_SOURCES_ppc32)
Jose Flavio Aguilar Paulino4499bb22007-09-12 21:52:25 -0600444 libunwind_ppc32_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
Arun Sharma516304a2011-02-01 20:35:59 -0800445 libunwind_ppc32_la_LIBADD = libunwind-dwarf-generic.la
Zachary T Welchce847af2010-11-08 17:16:40 -0800446 libunwind_ppc32_la_LIBADD += libunwind-elf32.la
Jose Flavio Aguilar Paulino4499bb22007-09-12 21:52:25 -0600447if !REMOTE_ONLY
Zachary T Welch9de666d2010-11-08 17:16:38 -0800448 libunwind_ppc32_la_LIBADD += libunwind.la -lc
Jose Flavio Aguilar Paulino4499bb22007-09-12 21:52:25 -0600449endif
Zachary T Welch64a82762010-11-08 17:16:36 -0800450 libunwind_setjmp_la_SOURCES += ppc/longjmp.S ppc/siglongjmp.S
Jose Flavio Aguilar Paulinob33021e2007-08-02 09:59:43 -0600451else
452if ARCH_PPC64
Zachary T Welchb07829b2010-11-08 17:16:37 -0800453 lib_LTLIBRARIES += libunwind-ppc64.la
Arun Sharma516304a2011-02-01 20:35:59 -0800454 libunwind_la_SOURCES = $(libunwind_la_SOURCES_ppc64)
455 libunwind_ppc64_la_SOURCES = $(libunwind_ppc64_la_SOURCES_ppc64)
Jose Flavio Aguilar Paulinob33021e2007-08-02 09:59:43 -0600456 libunwind_ppc64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
Arun Sharma516304a2011-02-01 20:35:59 -0800457 libunwind_ppc64_la_LIBADD = libunwind-dwarf-generic.la
Zachary T Welchce847af2010-11-08 17:16:40 -0800458 libunwind_ppc64_la_LIBADD += libunwind-elf64.la
Jose Flavio Aguilar Paulinob33021e2007-08-02 09:59:43 -0600459if !REMOTE_ONLY
Zachary T Welch9de666d2010-11-08 17:16:38 -0800460 libunwind_ppc64_la_LIBADD += libunwind.la -lc
Jose Flavio Aguilar Paulinob33021e2007-08-02 09:59:43 -0600461endif
Zachary T Welch64a82762010-11-08 17:16:36 -0800462 libunwind_setjmp_la_SOURCES += ppc/longjmp.S ppc/siglongjmp.S
Jose Flavio Aguilar Paulinob33021e2007-08-02 09:59:43 -0600463
464endif # ARCH_PPC64
Jose Flavio Aguilar Paulino4499bb22007-09-12 21:52:25 -0600465endif # ARCH_PPC32
ibm.com!masbockaa9a9172004-08-19 13:39:10 +0000466endif # ARCH_X86_64
mostang.com!davidmf6c7a652003-01-14 07:11:56 +0000467endif # ARCH_X86
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700468endif # ARCH_MIPS
mostang.com!davidmf6c7a652003-01-14 07:11:56 +0000469endif # ARCH_HPPA
470endif # ARCH_IA64
Daniel Jacobowitz3842dac2008-02-04 17:16:37 -0700471endif # ARCH_ARM
mostang.com!davidm00abcc62002-04-19 05:35:46 +0000472
hp.com!davidm16af7ae2005-05-03 09:13:17 +0000473#
474# Don't link with standard libraries, because those may mention
475# libunwind already.
476#
477libunwind_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -XCClinker -nostdlib \
478 $(LDFLAGS_STATIC_LIBCXA) -version-info $(SOVERSION)
Zachary T Welch9de666d2010-11-08 17:16:38 -0800479libunwind_la_LIBADD += -lc $(LIBCRTS)
hp.com!davidm16566632004-01-03 10:50:24 +0000480
hp.com!davidm3e8a5022005-05-20 09:48:08 +0000481AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/tdep-$(arch) -I.
mostang.com!davidmad7f1472003-02-08 10:10:59 +0000482AM_CCASFLAGS = $(AM_CPPFLAGS)
Zachary T Welch02dd6c42010-11-08 17:16:39 -0800483noinst_HEADERS += unwind/unwind-internal.h
hp.com!davidm6432d812002-04-05 23:37:55 +0000484
Arun Sharma516304a2011-02-01 20:35:59 -0800485EXTRA_DIST = $(libunwind_la_SOURCES_arm) \
486 $(libunwind_la_SOURCES_hppa) \
487 $(libunwind_la_SOURCES_ia64) \
488 $(libunwind_la_SOURCES_mips) \
489 $(libunwind_la_SOURCES_x86) \
490 $(libunwind_la_SOURCES_os_linux) \
491 $(libunwind_la_SOURCES_os_hpux) \
492 $(libunwind_la_SOURCES_common) \
493 $(libunwind_la_SOURCES_local) \
494 $(libunwind_la_SOURCES_generic) \
495 $(libunwind_arm_la_SOURCES_arm) \
496 $(libunwind_hppa_la_SOURCES_hppa) \
497 $(libunwind_ia64_la_SOURCES_ia64) \
498 $(libunwind_mips_la_SOURCES_mips) \
499 $(libunwind_x86_la_SOURCES_x86) \
500 $(libunwind_x86_64_la_SOURCES_x86_64)
501
Zachary T Welch651e9bb2010-10-28 16:25:51 -0700502MAINTAINERCLEANFILES = Makefile.in
mostang.com!davidm0adb97c2003-03-19 19:25:18 +0000503
mostang.com!davidm83b038d2002-02-28 16:24:48 +0000504# The -version-info flag accepts an argument of the form
505# `current[:revision[:age]]'. So, passing `-version-info 3:12:1' sets
506# current to 3, revision to 12, and age to 1.
507
508# If either revision or age are omitted, they default to 0. Also note
509# that age must be less than or equal to the current interface number.
510
511# Here are a set of rules to help you update your library version
512# information:
513
514# 1. Start with version information of `0:0:0' for each libtool
515# library.
516
517# 2. Update the version information only immediately before a public
518# release of your software. More frequent updates are unnecessary,
519# and only guarantee that the current interface number gets larger
520# faster.
521
522# 3. If the library source code has changed at all since the last
523# update, then increment revision (`c:r:a' becomes `c:r+1:a').
524
525# 4. If any interfaces have been added, removed, or changed since the
526# last update, increment current, and set revision to 0.
527
528# 5. If any interfaces have been added since the last public release,
529# then increment age.
530
531# 6. If any interfaces have been removed since the last public
532# release, then set age to 0.