blob: 407a9f22e59cfbac05248e069088f6f6cae3d6c7 [file] [log] [blame]
hp.com!davidmed32b992004-04-20 16:53:44 +00001SOVERSION=3:0:2 # 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#
4# Don't link with standard libraries, because those may mention
5# libunwind already.
6#
7COMMON_SO_LDFLAGS = -XCClinker -nostartfiles \
8 -XCClinker -nostdlib \
9 $(LDFLAGS_STATIC_LIBCXA)
mostang.com!davidma6d51ee2002-04-25 06:47:29 +000010
hp.com!davidm16566632004-01-03 10:50:24 +000011if REMOTE_ONLY
12LIBRARIES_cdep =
13lib_LTLIBRARIES_cdep =
14else
15LIBRARIES_cdep = libunwind-ptrace.a
16lib_LTLIBRARIES_cdep = libunwind.la libunwind-setjmp.la
17endif
mostang.com!davidmad7f1472003-02-08 10:10:59 +000018
hp.com!davidm16566632004-01-03 10:50:24 +000019### libunwind-ptrace:
hp.com!davidm1738b3b2004-01-30 00:01:24 +000020libunwind_ptrace_a_SOURCES = \
21 ptrace/_UPT_internal.h \
22 ptrace/_UPT_accessors.c ptrace/_UPT_access_fpreg.c \
23 ptrace/_UPT_access_mem.c ptrace/_UPT_access_reg.c \
24 ptrace/_UPT_create.c ptrace/_UPT_destroy.c \
25 ptrace/_UPT_find_proc_info.c ptrace/_UPT_get_dyn_info_list_addr.c \
26 ptrace/_UPT_put_unwind_info.c ptrace/_UPT_get_proc_name.c \
27 ptrace/_UPT_reg_offset.c ptrace/_UPT_resume.c
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)
32libunwind_setjmp_la_LIBADD = libunwind-$(arch).la -lc
hp.com!davidm16566632004-01-03 10:50:24 +000033libunwind_setjmp_la_SOURCES_common = longjmp.c siglongjmp.c
homeip.net!davidmbf2c4542004-08-17 15:34:28 +000034libunwind_setjmp_la_SOURCES_ia64 = ia64/setjmp.S ia64/sigsetjmp.S \
35 ia64/siglongjmp.S
36libunwind_setjmp_la_SOURCES_hppa = setjmp.c sigsetjmp.c \
37 hppa/siglongjmp.S
38libunwind_setjmp_la_SOURCES_x86 = setjmp.c sigsetjmp.c x86/siglongjmp.S
hp.com!davidm16566632004-01-03 10:50:24 +000039
40### libunwind:
41
mostang.com!davidma6b0ccf2004-01-14 06:21:52 +000042# List of arch-independent files needed by both local-only and generic
43# libraries:
hp.com!davidm16566632004-01-03 10:50:24 +000044libunwind_la_SOURCES_common = \
45 $(libunwind_la_SOURCES_os) \
hp.com!davidm1738b3b2004-01-30 00:01:24 +000046 mi/init.c mi/flush_cache.c mi/mempool.c
hp.com!davidm16566632004-01-03 10:50:24 +000047
48# List of arch-independent files needed by generic library (libunwind-$ARCH):
hp.com!davidm1738b3b2004-01-30 00:01:24 +000049libunwind_la_SOURCES_generic = \
50 mi/Gdyn-extract.c mi/Gdyn-remote.c mi/Gfind_dynamic_proc_info.c \
51 mi/Gget_accessors.c \
52 mi/Gget_proc_info_by_ip.c mi/Gget_proc_name.c \
53 mi/Gput_dynamic_unwind_info.c mi/Gdestroy_addr_space.c \
54 mi/Gget_reg.c mi/Gset_reg.c \
55 mi/Gget_fpreg.c mi/Gset_fpreg.c \
56 mi/Gset_caching_policy.c
hp.com!davidm16566632004-01-03 10:50:24 +000057
58# List of arch-independent files needed by local-only library (libunwind):
hp.com!davidm1738b3b2004-01-30 00:01:24 +000059libunwind_la_SOURCES_local = \
hp.com!davidm051da9c2004-05-06 22:02:00 +000060 $(libunwind_la_SOURCES_os_local) \
hp.com!davidma50c7802004-03-30 01:56:19 +000061 mi/backtrace.c \
hp.com!davidm1738b3b2004-01-30 00:01:24 +000062 mi/dyn-cancel.c mi/dyn-info-list.c mi/dyn-register.c \
63 mi/Ldyn-extract.c mi/Lfind_dynamic_proc_info.c \
64 mi/Lget_accessors.c \
65 mi/Lget_proc_info_by_ip.c mi/Lget_proc_name.c \
66 mi/Lput_dynamic_unwind_info.c mi/Ldestroy_addr_space.c \
67 mi/Lget_reg.c mi/Lset_reg.c \
68 mi/Lget_fpreg.c mi/Lset_fpreg.c \
69 mi/Lset_caching_policy.c \
70 unwind/Backtrace.c unwind/DeleteException.c \
71 unwind/FindEnclosingFunction.c unwind/ForcedUnwind.c \
72 unwind/GetBSP.c unwind/GetCFA.c unwind/GetDataRelBase.c \
73 unwind/GetGR.c unwind/GetIP.c unwind/GetLanguageSpecificData.c \
74 unwind/GetRegionStart.c unwind/GetTextRelBase.c \
75 unwind/RaiseException.c unwind/Resume.c \
76 unwind/Resume_or_Rethrow.c unwind/SetGR.c unwind/SetIP.c
hp.com!davidm02409462003-12-04 07:44:21 +000077
mostang.com!davidm0adb97c2003-03-19 19:25:18 +000078libunwind_la_SOURCES_os_linux = os-linux.h os-linux.c
hp.com!davidm051da9c2004-05-06 22:02:00 +000079
80# _ReadULEB()/_ReadSLEB() are needed for Intel C++ 8.0 compatibility
81libunwind_la_SOURCES_os_linux_local = mi/_ReadULEB.c mi/_ReadSLEB.c
mostang.com!davidm5929f8e2003-04-03 07:59:15 +000082libunwind_la_SOURCES_os_hpux = os-hpux.c
hp.com!davidm74ee8e42003-01-28 03:40:06 +000083
hp.com!davidmf06787a2004-01-22 08:36:15 +000084dwarf_SOURCES_common = \
85 dwarf/dwarf-eh.h \
homeip.net!davidmbf2c4542004-08-17 15:34:28 +000086 dwarf/global.c
hp.com!davidmf06787a2004-01-22 08:36:15 +000087
homeip.net!davidmbf2c4542004-08-17 15:34:28 +000088dwarf_SOURCES_local = \
89 dwarf/Lexpr.c dwarf/Lfde.c dwarf/Lparser.c dwarf/Lpe.c dwarf/Lstep.c
hp.com!davidm23760812003-12-20 11:50:00 +000090
homeip.net!davidmbf2c4542004-08-17 15:34:28 +000091dwarf_SOURCES_generic = \
92 dwarf/Gexpr.c dwarf/Gfde.c dwarf/Gparser.c dwarf/Gpe.c dwarf/Gstep.c
mostang.com!davidm3ae9b812002-12-19 07:16:50 +000093
hp.com!davidm16566632004-01-03 10:50:24 +000094# The list of files that go both into libunwind and libunwind-ia64:
hp.com!davidmf06787a2004-01-22 08:36:15 +000095libunwind_la_SOURCES_ia64_common = $(libunwind_la_SOURCES_common) \
mostang.com!davidmc47cf6a2004-05-04 22:16:57 +000096 ia64/init.h ia64/offsets.h ia64/regs.h \
hp.com!davidmf06787a2004-01-22 08:36:15 +000097 ia64/ucontext_i.h ia64/unwind_decoder.h ia64/unwind_i.h \
homeip.net!davidmbf2c4542004-08-17 15:34:28 +000098 ia64/regname.c
hp.com!davidm16566632004-01-03 10:50:24 +000099
100# The list of files that go into libunwind:
homeip.net!davidmbf2c4542004-08-17 15:34:28 +0000101libunwind_la_SOURCES_ia64 = $(libunwind_la_SOURCES_ia64_common) \
102 $(libunwind_la_SOURCES_local) \
103 \
104 elf64.c elf64.h \
105 \
106 ia64/dyn_info_list.S ia64/getcontext.S \
107 \
108 ia64/Lcreate_addr_space.c ia64/Lget_proc_info.c ia64/Lget_save_loc.c \
109 ia64/Lglobal.c ia64/Linit.c ia64/Linit_local.c ia64/Linit_remote.c \
110 ia64/Linstall_cursor.S ia64/Lis_signal_frame.c ia64/Lparser.c \
111 ia64/Lrbs.c ia64/Lregs.c ia64/Lresume.c ia64/Lscript.c ia64/Lstep.c \
112 ia64/Ltables.c
hp.com!davidm16566632004-01-03 10:50:24 +0000113
114# The list of files that go into libunwind-ia64:
homeip.net!davidmbf2c4542004-08-17 15:34:28 +0000115libunwind_ia64_la_SOURCES_ia64 = $(libunwind_la_SOURCES_ia64_common) \
116 $(libunwind_la_SOURCES_generic) \
117 ia64/Gcreate_addr_space.c ia64/Gget_proc_info.c ia64/Gget_save_loc.c \
118 ia64/Gglobal.c ia64/Ginit.c ia64/Ginit_local.c ia64/Ginit_remote.c \
119 ia64/Ginstall_cursor.S ia64/Gis_signal_frame.c ia64/Gparser.c \
120 ia64/Grbs.c ia64/Gregs.c ia64/Gresume.c ia64/Gscript.c ia64/Gstep.c \
121 ia64/Gtables.c
hp.com!davidm6432d812002-04-05 23:37:55 +0000122
homeip.net!davidmbf2c4542004-08-17 15:34:28 +0000123libunwind_la_SOURCES_hppa = $(libunwind_la_SOURCES_common) \
124 hppa/global.c hppa/tables.c \
125 hppa/init.h hppa/unwind_i.h \
126 \
127 hppa/Gget_reg.c hppa/Gget_proc_name.c hppa/Ginit.c hppa/Ginit_local.c \
128 hppa/Gget_proc_info.c hppa/Gregs.c hppa/Gstep.c \
129 \
130 hppa/Lget_reg.c hppa/Lget_proc_name.c hppa/Linit.c hppa/Linit_local.c \
131 hppa/Lget_proc_info.c hppa/Lregs.c hppa/Lstep.c
mostang.com!davidmf6c7a652003-01-14 07:11:56 +0000132
hp.com!davidm16566632004-01-03 10:50:24 +0000133# The list of files that go both into libunwind and libunwind-x86:
mostang.com!davidma6b0ccf2004-01-14 06:21:52 +0000134libunwind_la_SOURCES_x86_common = $(libunwind_la_SOURCES_common) \
hp.com!davidmf06787a2004-01-22 08:36:15 +0000135 $(dwarf_SOURCES_common) \
136 x86/init.h x86/offsets.h x86/unwind_i.h \
homeip.net!davidmbf2c4542004-08-17 15:34:28 +0000137 x86/is_fpreg.c x86/regname.c
hp.com!davidm16566632004-01-03 10:50:24 +0000138
139# The list of files that go into libunwind:
hp.com!davidm1738b3b2004-01-30 00:01:24 +0000140libunwind_la_SOURCES_x86 = $(libunwind_la_SOURCES_x86_common) \
141 $(libunwind_la_SOURCES_local) \
142 elf32.c elf32.h \
143 $(dwarf_SOURCES_local) \
144 dwarf/Lfind_proc_info-lsb.c \
homeip.net!davidmbf2c4542004-08-17 15:34:28 +0000145 x86/Lcreate_addr_space.c x86/Lget_save_loc.c x86/Lglobal.c \
146 x86/Linit.c x86/Linit_local.c x86/Linit_remote.c \
147 x86/Lis_signal_frame.c x86/Lget_proc_info.c x86/Lregs.c \
148 x86/Lresume.c x86/Lstep.c
mostang.com!davidmf6c7a652003-01-14 07:11:56 +0000149
hp.com!davidm16566632004-01-03 10:50:24 +0000150# The list of files that go into libunwind-x86:
hp.com!davidm1738b3b2004-01-30 00:01:24 +0000151libunwind_x86_la_SOURCES_x86 = $(libunwind_la_SOURCES_x86_common) \
152 $(libunwind_la_SOURCES_generic) \
153 $(dwarf_SOURCES_generic) \
154 dwarf/Gfind_proc_info-lsb.c \
homeip.net!davidmbf2c4542004-08-17 15:34:28 +0000155 x86/Gcreate_addr_space.c x86/Gget_save_loc.c x86/Gglobal.c \
156 x86/Ginit.c x86/Ginit_local.c x86/Ginit_remote.c \
157 x86/Gis_signal_frame.c x86/Gget_proc_info.c x86/Gregs.c \
158 x86/Gresume.c x86/Gstep.c
hp.com!davidm16566632004-01-03 10:50:24 +0000159
mostang.com!davidm0adb97c2003-03-19 19:25:18 +0000160if REMOTE_ONLY
mostang.com!davidm0adb97c2003-03-19 19:25:18 +0000161install-exec-hook:
162# Nothing to do here....
163else
mostang.com!davidm0adb97c2003-03-19 19:25:18 +0000164#
165# This is not ideal, but I know of no other way to install an
166# alias for a library.
167#
168install-exec-hook:
hp.com!davidm16566632004-01-03 10:50:24 +0000169 $(LN_S) -f libunwind-$(arch).a $(DESTDIR)$(libdir)/libunwind-generic.a
170 $(LN_S) -f libunwind-$(arch).so \
171 $(DESTDIR)$(libdir)/libunwind-generic.so
mostang.com!davidm0adb97c2003-03-19 19:25:18 +0000172endif
173
174if OS_LINUX
hp.com!davidm051da9c2004-05-06 22:02:00 +0000175 libunwind_la_SOURCES_os = $(libunwind_la_SOURCES_os_linux)
176 libunwind_la_SOURCES_os_local = $(libunwind_la_SOURCES_os_linux_local)
mostang.com!davidm0adb97c2003-03-19 19:25:18 +0000177endif
178
mostang.com!davidm5929f8e2003-04-03 07:59:15 +0000179if OS_HPUX
hp.com!davidm051da9c2004-05-06 22:02:00 +0000180 libunwind_la_SOURCES_os = $(libunwind_la_SOURCES_os_hpux)
181 libunwind_la_SOURCES_os_local = $(libunwind_la_SOURCES_os_hpux_local)
mostang.com!davidm5929f8e2003-04-03 07:59:15 +0000182endif
183
hp.com!davidm6432d812002-04-05 23:37:55 +0000184if ARCH_IA64
hp.com!davidmf9c59cd2004-08-18 10:43:50 +0000185 ia64_mk_Gcursor_i_SOURCES = ia64/mk_Gcursor_i.c
186 ia64_mk_Lcursor_i_SOURCES = ia64/mk_Lcursor_i.c
homeip.net!davidmbf2c4542004-08-17 15:34:28 +0000187 noinst_PROGRAMS = ia64/mk_Gcursor_i ia64/mk_Lcursor_i
mostang.com!davidm8e85e812003-04-23 19:22:42 +0000188 BUILT_SOURCES = Gcursor_i.h Lcursor_i.h
homeip.net!davidmbf2c4542004-08-17 15:34:28 +0000189Gcursor_i.h: ia64/mk_Gcursor_i
190 ia64/mk_Gcursor_i > $@
191Lcursor_i.h: ia64/mk_Lcursor_i
192 ia64/mk_Lcursor_i > $@
mostang.com!davidmad7f1472003-02-08 10:10:59 +0000193 lib_LTLIBRARIES_arch = libunwind-ia64.la
hp.com!davidm16566632004-01-03 10:50:24 +0000194 libunwind_la_SOURCES = $(libunwind_la_SOURCES_ia64)
195 libunwind_ia64_la_SOURCES = $(libunwind_ia64_la_SOURCES_ia64)
hp.com!davidmed32b992004-04-20 16:53:44 +0000196 libunwind_ia64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
hp.com!davidmf06787a2004-01-22 08:36:15 +0000197if !REMOTE_ONLY
hp.com!davidmed32b992004-04-20 16:53:44 +0000198 libunwind_ia64_la_LIBADD = libunwind.la -lc
hp.com!davidmf06787a2004-01-22 08:36:15 +0000199endif
mostang.com!davidmad7f1472003-02-08 10:10:59 +0000200 libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
201 $(libunwind_setjmp_la_SOURCES_ia64)
hp.com!davidm6432d812002-04-05 23:37:55 +0000202else
mostang.com!davidmf6c7a652003-01-14 07:11:56 +0000203if ARCH_HPPA
mostang.com!davidmad7f1472003-02-08 10:10:59 +0000204 lib_LTLIBRARIES_arch = libunwind-hppa.la
hp.com!davidm16566632004-01-03 10:50:24 +0000205 libunwind_la_SOURCES = $(libunwind_la_SOURCES_hppa)
hp.com!davidmf06787a2004-01-22 08:36:15 +0000206 libunwind_hppa_la_SOURCES = $(libunwind_hppa_la_SOURCES_hppa)
hp.com!davidmed32b992004-04-20 16:53:44 +0000207 libunwind_hppa_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
hp.com!davidmf06787a2004-01-22 08:36:15 +0000208if !REMOTE_ONLY
hp.com!davidmed32b992004-04-20 16:53:44 +0000209 libunwind_hppa_la_LIBADD = libunwind.la -lc
hp.com!davidmf06787a2004-01-22 08:36:15 +0000210endif
mostang.com!davidmad7f1472003-02-08 10:10:59 +0000211 libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
212 $(libunwind_setjmp_la_SOURCES_hppa)
mostang.com!davidmf6c7a652003-01-14 07:11:56 +0000213else
mostang.com!davidm3ae9b812002-12-19 07:16:50 +0000214if ARCH_X86
mostang.com!davidmad7f1472003-02-08 10:10:59 +0000215 lib_LTLIBRARIES_arch = libunwind-x86.la
hp.com!davidm16566632004-01-03 10:50:24 +0000216 libunwind_la_SOURCES = $(libunwind_la_SOURCES_x86)
hp.com!davidmf06787a2004-01-22 08:36:15 +0000217 libunwind_x86_la_SOURCES = $(libunwind_x86_la_SOURCES_x86)
hp.com!davidmed32b992004-04-20 16:53:44 +0000218 libunwind_x86_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
hp.com!davidmf06787a2004-01-22 08:36:15 +0000219if !REMOTE_ONLY
hp.com!davidmed32b992004-04-20 16:53:44 +0000220 libunwind_x86_la_LIBADD = libunwind.la -lc
hp.com!davidmf06787a2004-01-22 08:36:15 +0000221endif
mostang.com!davidmad7f1472003-02-08 10:10:59 +0000222 libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
223 $(libunwind_setjmp_la_SOURCES_x86)
mostang.com!davidmf6c7a652003-01-14 07:11:56 +0000224endif # ARCH_X86
225endif # ARCH_HPPA
226endif # ARCH_IA64
mostang.com!davidm00abcc62002-04-19 05:35:46 +0000227
hp.com!davidmed32b992004-04-20 16:53:44 +0000228libunwind_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
229libunwind_la_LIBADD = -lc
hp.com!davidm16566632004-01-03 10:50:24 +0000230
231lib_LIBRARIES = $(LIBRARIES_cdep)
mostang.com!davidmad7f1472003-02-08 10:10:59 +0000232lib_LTLIBRARIES = $(lib_LTLIBRARIES_cdep) $(lib_LTLIBRARIES_arch)
233
hp.com!davidm23760812003-12-20 11:50:00 +0000234AM_CPPFLAGS = -I$(top_srcdir)/include/$(arch) -I$(top_srcdir)/include -I.
mostang.com!davidmad7f1472003-02-08 10:10:59 +0000235AM_CCASFLAGS = $(AM_CPPFLAGS)
hp.com!davidm6432d812002-04-05 23:37:55 +0000236
hp.com!davidm16566632004-01-03 10:50:24 +0000237EXTRA_DIST = elfxx.h elfxx.c unwind-internal.h \
238 $(libunwind_la_SOURCES_hppa) \
239 $(libunwind_la_SOURCES_ia64) \
240 $(libunwind_la_SOURCES_x86) \
241 $(libunwind_la_SOURCES_os_linux) \
242 $(libunwind_la_SOURCES_os_hpux) \
243 $(libunwind_la_SOURCES_common) \
244 $(libunwind_la_SOURCES_local) \
245 $(libunwind_la_SOURCES_generic) \
hp.com!davidm051da9c2004-05-06 22:02:00 +0000246 $(libunwind_hppa_la_SOURCES_hppa) \
247 $(libunwind_ia64_la_SOURCES_ia64) \
248 $(libunwind_x86_la_SOURCES_x86) \
hp.com!davidm16566632004-01-03 10:50:24 +0000249 $(libunwind_ptrace_a_SOURCES) \
250 $(libunwind_setjmp_la_SOURCES_common) \
251 $(libunwind_setjmp_la_SOURCES_hppa) \
252 $(libunwind_setjmp_la_SOURCES_ia64) \
253 $(libunwind_setjmp_la_SOURCES_x86)
mostang.com!davidm0adb97c2003-03-19 19:25:18 +0000254
mostang.com!davidm83b038d2002-02-28 16:24:48 +0000255# The -version-info flag accepts an argument of the form
256# `current[:revision[:age]]'. So, passing `-version-info 3:12:1' sets
257# current to 3, revision to 12, and age to 1.
258
259# If either revision or age are omitted, they default to 0. Also note
260# that age must be less than or equal to the current interface number.
261
262# Here are a set of rules to help you update your library version
263# information:
264
265# 1. Start with version information of `0:0:0' for each libtool
266# library.
267
268# 2. Update the version information only immediately before a public
269# release of your software. More frequent updates are unnecessary,
270# and only guarantee that the current interface number gets larger
271# faster.
272
273# 3. If the library source code has changed at all since the last
274# update, then increment revision (`c:r:a' becomes `c:r+1:a').
275
276# 4. If any interfaces have been added, removed, or changed since the
277# last update, increment current, and set revision to 0.
278
279# 5. If any interfaces have been added since the last public release,
280# then increment age.
281
282# 6. If any interfaces have been removed since the last public
283# release, then set age to 0.