Makefile.am 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  1. SOVERSION=8:0:0 # See comments at end of file.
  2. SETJMP_SO_VERSION=0:0:0
  3. #
  4. # Don't link with start-files since we don't use any constructors/destructors:
  5. #
  6. COMMON_SO_LDFLAGS = -XCClinker -nostartfiles
  7. lib_LIBRARIES =
  8. lib_LTLIBRARIES =
  9. if !REMOTE_ONLY
  10. #lib_LIBRARIES += libunwind-ptrace.a libunwind-coredump.a
  11. lib_LTLIBRARIES += libunwind.la
  12. endif
  13. noinst_HEADERS =
  14. noinst_LTLIBRARIES =
  15. ### libunwind-ptrace:
  16. libunwind_ptrace_a_SOURCES = \
  17. ptrace/_UPT_elf.c \
  18. ptrace/_UPT_accessors.c ptrace/_UPT_access_fpreg.c \
  19. ptrace/_UPT_access_mem.c ptrace/_UPT_access_reg.c \
  20. ptrace/_UPT_create.c ptrace/_UPT_destroy.c \
  21. ptrace/_UPT_find_proc_info.c ptrace/_UPT_get_dyn_info_list_addr.c \
  22. ptrace/_UPT_put_unwind_info.c ptrace/_UPT_get_proc_name.c \
  23. ptrace/_UPT_reg_offset.c ptrace/_UPT_resume.c
  24. noinst_HEADERS += ptrace/_UPT_internal.h
  25. ### libunwind-coredump:
  26. libunwind_coredump_a_SOURCES = \
  27. coredump/_UCD_accessors.c \
  28. coredump/_UCD_create.c \
  29. coredump/_UCD_destroy.c \
  30. coredump/_UCD_access_mem.c \
  31. coredump/_UCD_elf_map_image.c \
  32. coredump/_UCD_find_proc_info.c \
  33. coredump/_UCD_get_proc_name.c \
  34. \
  35. coredump/_UPT_elf.c \
  36. coredump/_UPT_access_fpreg.c \
  37. coredump/_UPT_get_dyn_info_list_addr.c \
  38. coredump/_UPT_put_unwind_info.c \
  39. coredump/_UPT_resume.c
  40. noinst_HEADERS += coredump/_UCD_internal.h
  41. ### libunwind-setjmp:
  42. libunwind_setjmp_la_LDFLAGS = $(COMMON_SO_LDFLAGS) \
  43. -version-info $(SETJMP_SO_VERSION)
  44. if USE_ELF32
  45. LIBUNWIND_ELF = libunwind-elf32.la
  46. endif
  47. if USE_ELF64
  48. LIBUNWIND_ELF = libunwind-elf64.la
  49. endif
  50. if USE_ELFXX
  51. LIBUNWIND_ELF = libunwind-elfxx.la
  52. endif
  53. libunwind_setjmp_la_LIBADD = $(LIBUNWIND_ELF) \
  54. libunwind-$(arch).la \
  55. libunwind.la -lc
  56. libunwind_setjmp_la_SOURCES = setjmp/longjmp.c \
  57. setjmp/siglongjmp.c
  58. noinst_HEADERS += setjmp/setjmp_i.h
  59. ### libunwind:
  60. libunwind_la_LIBADD =
  61. # List of arch-independent files needed by both local-only and generic
  62. # libraries:
  63. libunwind_la_SOURCES_common = \
  64. $(libunwind_la_SOURCES_os) \
  65. mi/init.c mi/flush_cache.c mi/mempool.c mi/strerror.c
  66. # List of arch-independent files needed by generic library (libunwind-$ARCH):
  67. libunwind_la_SOURCES_generic = \
  68. mi/Gget_accessors.c \
  69. mi/Gput_dynamic_unwind_info.c mi/Gdestroy_addr_space.c \
  70. mi/Gget_reg.c mi/Gset_reg.c \
  71. mi/Gget_fpreg.c mi/Gset_fpreg.c \
  72. mi/Gset_caching_policy.c
  73. if SUPPORT_CXX_EXCEPTIONS
  74. libunwind_la_SOURCES_local_unwind = \
  75. unwind/Backtrace.c unwind/DeleteException.c \
  76. unwind/FindEnclosingFunction.c unwind/ForcedUnwind.c \
  77. unwind/GetBSP.c unwind/GetCFA.c unwind/GetDataRelBase.c \
  78. unwind/GetGR.c unwind/GetIP.c unwind/GetLanguageSpecificData.c \
  79. unwind/GetRegionStart.c unwind/GetTextRelBase.c \
  80. unwind/RaiseException.c unwind/Resume.c \
  81. unwind/Resume_or_Rethrow.c unwind/SetGR.c unwind/SetIP.c \
  82. unwind/GetIPInfo.c
  83. # _ReadULEB()/_ReadSLEB() are needed for Intel C++ 8.0 compatibility
  84. libunwind_la_SOURCES_os_linux_local = mi/_ReadULEB.c mi/_ReadSLEB.c
  85. endif
  86. # List of arch-independent files needed by local-only library (libunwind):
  87. libunwind_la_SOURCES_local_nounwind = \
  88. $(libunwind_la_SOURCES_os_local) \
  89. mi/backtrace.c \
  90. mi/dyn-info-list.c \
  91. mi/Ldyn-extract.c mi/Lfind_dynamic_proc_info.c \
  92. mi/Lget_accessors.c \
  93. mi/Lget_proc_info_by_ip.c mi/Lget_proc_name.c \
  94. mi/Lput_dynamic_unwind_info.c mi/Ldestroy_addr_space.c \
  95. mi/Lget_reg.c mi/Lset_reg.c \
  96. mi/Lget_fpreg.c mi/Lset_fpreg.c \
  97. mi/Lset_caching_policy.c
  98. libunwind_la_SOURCES_local = \
  99. $(libunwind_la_SOURCES_local_nounwind) \
  100. $(libunwind_la_SOURCES_local_unwind)
  101. noinst_HEADERS += os-linux.h
  102. libunwind_la_SOURCES_os_linux = os-linux.c
  103. libunwind_la_SOURCES_os_hpux = os-hpux.c
  104. libunwind_la_SOURCES_os_freebsd = os-freebsd.c
  105. libunwind_dwarf_common_la_SOURCES = dwarf/global.c
  106. libunwind_dwarf_local_la_SOURCES = \
  107. dwarf/Lexpr.c dwarf/Lfde.c dwarf/Lparser.c dwarf/Lpe.c dwarf/Lstep.c \
  108. dwarf/Lfind_proc_info-lsb.c \
  109. dwarf/Lfind_unwind_table.c
  110. libunwind_dwarf_local_la_LIBADD = libunwind-dwarf-common.la
  111. libunwind_dwarf_generic_la_SOURCES = \
  112. dwarf/Gexpr.c dwarf/Gfde.c dwarf/Gparser.c dwarf/Gpe.c dwarf/Gstep.c \
  113. dwarf/Gfind_unwind_table.c
  114. libunwind_dwarf_generic_la_LIBADD = libunwind-dwarf-common.la
  115. if USE_DWARF
  116. noinst_LTLIBRARIES += libunwind-dwarf-common.la libunwind-dwarf-generic.la
  117. if !REMOTE_ONLY
  118. noinst_LTLIBRARIES += libunwind-dwarf-local.la
  119. endif
  120. libunwind_la_LIBADD += libunwind-dwarf-local.la
  121. endif
  122. noinst_HEADERS += elf32.h elf64.h elfxx.h
  123. libunwind_elf32_la_SOURCES = se-libc-stubs.c se-iterate-phdr.c
  124. libunwind_elf64_la_SOURCES = se-libc-stubs.c se-iterate-phdr.c
  125. libunwind_elfxx_la_SOURCES = elfxx.c
  126. noinst_LTLIBRARIES += $(LIBUNWIND_ELF)
  127. libunwind_la_LIBADD += $(LIBUNWIND_ELF)
  128. # The list of files that go into libunwind and libunwind-arm:
  129. noinst_HEADERS += arm/init.h arm/offsets.h arm/unwind_i.h
  130. libunwind_la_SOURCES_arm_common = $(libunwind_la_SOURCES_common) \
  131. arm/is_fpreg.c arm/regname.c \
  132. arm/ex_tables.h
  133. # The list of files that go into libunwind:
  134. libunwind_la_SOURCES_arm = $(libunwind_la_SOURCES_arm_common) \
  135. $(libunwind_la_SOURCES_local) \
  136. arm/getcontext.S \
  137. arm/Lcreate_addr_space.c arm/Lget_proc_info.c arm/Lget_save_loc.c \
  138. arm/Lglobal.c arm/Linit.c arm/Linit_local.c arm/Linit_remote.c \
  139. arm/Lis_signal_frame.c arm/Lregs.c arm/Lresume.c arm/Lstep.c \
  140. arm/Lex_tables.c
  141. libunwind_arm_la_SOURCES_arm = $(libunwind_la_SOURCES_arm_common) \
  142. $(libunwind_la_SOURCES_generic) \
  143. arm/Gcreate_addr_space.c arm/Gget_proc_info.c arm/Gget_save_loc.c \
  144. arm/Gglobal.c arm/Ginit.c arm/Ginit_local.c arm/Ginit_remote.c \
  145. arm/Gis_signal_frame.c arm/Gregs.c arm/Gresume.c arm/Gstep.c \
  146. arm/Gex_tables.c
  147. # The list of files that go both into libunwind and libunwind-ia64:
  148. noinst_HEADERS += ia64/init.h ia64/offsets.h ia64/regs.h \
  149. ia64/ucontext_i.h ia64/unwind_decoder.h ia64/unwind_i.h
  150. libunwind_la_SOURCES_ia64_common = $(libunwind_la_SOURCES_common) \
  151. ia64/regname.c
  152. # The list of files that go into libunwind:
  153. libunwind_la_SOURCES_ia64 = $(libunwind_la_SOURCES_ia64_common) \
  154. $(libunwind_la_SOURCES_local) \
  155. \
  156. ia64/dyn_info_list.S ia64/getcontext.S \
  157. \
  158. ia64/Lcreate_addr_space.c ia64/Lget_proc_info.c ia64/Lget_save_loc.c \
  159. ia64/Lglobal.c ia64/Linit.c ia64/Linit_local.c ia64/Linit_remote.c \
  160. ia64/Linstall_cursor.S ia64/Lis_signal_frame.c ia64/Lparser.c \
  161. ia64/Lrbs.c ia64/Lregs.c ia64/Lresume.c ia64/Lscript.c ia64/Lstep.c \
  162. ia64/Ltables.c ia64/Lfind_unwind_table.c
  163. # The list of files that go into libunwind-ia64:
  164. libunwind_ia64_la_SOURCES_ia64 = $(libunwind_la_SOURCES_ia64_common) \
  165. $(libunwind_la_SOURCES_generic) \
  166. ia64/Gcreate_addr_space.c ia64/Gget_proc_info.c ia64/Gget_save_loc.c \
  167. ia64/Gglobal.c ia64/Ginit.c ia64/Ginit_local.c ia64/Ginit_remote.c \
  168. ia64/Ginstall_cursor.S ia64/Gis_signal_frame.c ia64/Gparser.c \
  169. ia64/Grbs.c ia64/Gregs.c ia64/Gresume.c ia64/Gscript.c ia64/Gstep.c \
  170. ia64/Gtables.c ia64/Gfind_unwind_table.c
  171. # The list of files that go both into libunwind and libunwind-hppa:
  172. noinst_HEADERS += hppa/init.h hppa/offsets.h hppa/unwind_i.h
  173. libunwind_la_SOURCES_hppa_common = $(libunwind_la_SOURCES_common) \
  174. hppa/regname.c
  175. # The list of files that go into libunwind:
  176. libunwind_la_SOURCES_hppa = $(libunwind_la_SOURCES_hppa_common) \
  177. $(libunwind_la_SOURCES_local) \
  178. hppa/getcontext.S hppa/setcontext.S \
  179. hppa/Lcreate_addr_space.c hppa/Lget_save_loc.c hppa/Lglobal.c \
  180. hppa/Linit.c hppa/Linit_local.c hppa/Linit_remote.c \
  181. hppa/Lis_signal_frame.c hppa/Lget_proc_info.c hppa/Lregs.c \
  182. hppa/Lresume.c hppa/Lstep.c
  183. # The list of files that go into libunwind-hppa:
  184. libunwind_hppa_la_SOURCES_hppa = $(libunwind_la_SOURCES_hppa_common) \
  185. $(libunwind_la_SOURCES_generic) \
  186. hppa/Gcreate_addr_space.c hppa/Gget_save_loc.c hppa/Gglobal.c \
  187. hppa/Ginit.c hppa/Ginit_local.c hppa/Ginit_remote.c \
  188. hppa/Gis_signal_frame.c hppa/Gget_proc_info.c hppa/Gregs.c \
  189. hppa/Gresume.c hppa/Gstep.c
  190. # The list of files that go info libunwind and libunwind-mips:
  191. noinst_HEADERS += mips/init.h mips/offsets.h
  192. libunwind_la_SOURCES_mips_common = $(libunwind_la_SOURCES_common) \
  193. mips/is_fpreg.c mips/regname.c
  194. # The list of files that go into libunwind:
  195. libunwind_la_SOURCES_mips = $(libunwind_la_SOURCES_mips_common) \
  196. $(libunwind_la_SOURCES_local) \
  197. mips/getcontext.S \
  198. mips/Lcreate_addr_space.c mips/Lget_proc_info.c mips/Lget_save_loc.c \
  199. mips/Lglobal.c mips/Linit.c mips/Linit_local.c mips/Linit_remote.c \
  200. mips/Lis_signal_frame.c mips/Lregs.c mips/Lresume.c mips/Lstep.c
  201. libunwind_mips_la_SOURCES_mips = $(libunwind_la_SOURCES_mips_common) \
  202. $(libunwind_la_SOURCES_generic) \
  203. mips/Gcreate_addr_space.c mips/Gget_proc_info.c mips/Gget_save_loc.c \
  204. mips/Gglobal.c mips/Ginit.c mips/Ginit_local.c mips/Ginit_remote.c \
  205. mips/Gis_signal_frame.c mips/Gregs.c mips/Gresume.c mips/Gstep.c
  206. # The list of files that go both into libunwind and libunwind-x86:
  207. noinst_HEADERS += x86/init.h x86/offsets.h x86/unwind_i.h
  208. libunwind_la_SOURCES_x86_common = $(libunwind_la_SOURCES_common) \
  209. x86/is_fpreg.c x86/regname.c
  210. # The list of files that go into libunwind:
  211. libunwind_la_SOURCES_x86 = $(libunwind_la_SOURCES_x86_common) \
  212. $(libunwind_la_SOURCES_x86_os_local) \
  213. $(libunwind_la_SOURCES_local) \
  214. x86/Lcreate_addr_space.c x86/Lget_save_loc.c x86/Lglobal.c \
  215. x86/Linit.c x86/Linit_local.c x86/Linit_remote.c \
  216. x86/Lget_proc_info.c x86/Lregs.c \
  217. x86/Lresume.c x86/Lstep.c
  218. # The list of files that go into libunwind-x86:
  219. libunwind_x86_la_SOURCES_x86 = $(libunwind_la_SOURCES_x86_common) \
  220. $(libunwind_la_SOURCES_x86_os) \
  221. $(libunwind_la_SOURCES_generic) \
  222. x86/Gcreate_addr_space.c x86/Gget_save_loc.c x86/Gglobal.c \
  223. x86/Ginit.c x86/Ginit_local.c x86/Ginit_remote.c \
  224. x86/Gget_proc_info.c x86/Gregs.c \
  225. x86/Gresume.c x86/Gstep.c
  226. # The list of files that go both into libunwind and libunwind-x86_64:
  227. noinst_HEADERS += x86_64/offsets.h \
  228. x86_64/init.h x86_64/unwind_i.h x86_64/ucontext_i.h
  229. libunwind_la_SOURCES_x86_64_common = $(libunwind_la_SOURCES_common) \
  230. x86_64/is_fpreg.c x86_64/regname.c
  231. # The list of files that go into libunwind:
  232. libunwind_la_SOURCES_x86_64 = $(libunwind_la_SOURCES_x86_64_common) \
  233. $(libunwind_la_SOURCES_x86_64_os_local) \
  234. $(libunwind_la_SOURCES_local) \
  235. x86_64/Lcreate_addr_space.c x86_64/Lget_save_loc.c x86_64/Lglobal.c \
  236. x86_64/Linit.c x86_64/Linit_local.c x86_64/Linit_remote.c \
  237. x86_64/Lget_proc_info.c x86_64/Lregs.c x86_64/Lresume.c \
  238. x86_64/Lstash_frame.c x86_64/Lstep.c x86_64/getcontext.S
  239. # The list of files that go into libunwind-x86_64:
  240. libunwind_x86_64_la_SOURCES_x86_64 = $(libunwind_la_SOURCES_x86_64_common) \
  241. $(libunwind_la_SOURCES_x86_64_os) \
  242. $(libunwind_la_SOURCES_generic) \
  243. x86_64/Gcreate_addr_space.c x86_64/Gget_save_loc.c x86_64/Gglobal.c \
  244. x86_64/Ginit.c x86_64/Ginit_local.c x86_64/Ginit_remote.c \
  245. x86_64/Gget_proc_info.c x86_64/Gregs.c x86_64/Gresume.c \
  246. x86_64/Gstash_frame.c x86_64/Gstep.c
  247. # The list of local files that go to Power 64 and 32:
  248. libunwind_la_SOURCES_ppc = ppc/Lcreate_addr_space.c \
  249. ppc/Lget_proc_info.c ppc/Lget_save_loc.c ppc/Linit_local.c \
  250. ppc/Linit_remote.c ppc/Lis_signal_frame.c
  251. # The list of generic files that go to Power 64 and 32:
  252. libunwind_ppc_la_SOURCES_ppc_generic = ppc/Gcreate_addr_space.c \
  253. ppc/Gget_proc_info.c ppc/Gget_save_loc.c ppc/Ginit_local.c \
  254. ppc/Ginit_remote.c ppc/Gis_signal_frame.c
  255. # The list of files that go both into libunwind and libunwind-ppc32:
  256. noinst_HEADERS += ppc32/init.h ppc32/unwind_i.h ppc32/ucontext_i.h
  257. libunwind_la_SOURCES_ppc32_common = $(libunwind_la_SOURCES_common) \
  258. ppc32/is_fpreg.c ppc32/regname.c ppc32/get_func_addr.c
  259. # The list of files that go into libunwind:
  260. libunwind_la_SOURCES_ppc32 = $(libunwind_la_SOURCES_ppc32_common) \
  261. $(libunwind_la_SOURCES_local) \
  262. $(libunwind_la_SOURCES_ppc) \
  263. ppc32/Lglobal.c ppc32/Linit.c \
  264. ppc32/Lregs.c ppc32/Lresume.c ppc32/Lstep.c
  265. # The list of files that go into libunwind-ppc32:
  266. libunwind_ppc32_la_SOURCES_ppc32 = $(libunwind_la_SOURCES_ppc32_common) \
  267. $(libunwind_la_SOURCES_generic) \
  268. $(libunwind_ppc_la_SOURCES_ppc_generic) \
  269. ppc32/Gglobal.c ppc32/Ginit.c \
  270. ppc32/Gregs.c ppc32/Gresume.c ppc32/Gstep.c
  271. # The list of files that go both into libunwind and libunwind-ppc64:
  272. noinst_HEADERS += ppc64/init.h ppc64/unwind_i.h ppc64/ucontext_i.h
  273. libunwind_la_SOURCES_ppc64_common = $(libunwind_la_SOURCES_common) \
  274. ppc64/is_fpreg.c ppc64/regname.c ppc64/get_func_addr.c
  275. # The list of files that go into libunwind:
  276. libunwind_la_SOURCES_ppc64 = $(libunwind_la_SOURCES_ppc64_common) \
  277. $(libunwind_la_SOURCES_local) \
  278. $(libunwind_la_SOURCES_ppc) \
  279. ppc64/Lglobal.c ppc64/Linit.c \
  280. ppc64/Lregs.c ppc64/Lresume.c ppc64/Lstep.c
  281. # The list of files that go into libunwind-ppc64:
  282. libunwind_ppc64_la_SOURCES_ppc64 = $(libunwind_la_SOURCES_ppc64_common) \
  283. $(libunwind_la_SOURCES_generic) \
  284. $(libunwind_ppc_la_SOURCES_ppc_generic) \
  285. ppc64/Gglobal.c ppc64/Ginit.c \
  286. ppc64/Gregs.c ppc64/Gresume.c ppc64/Gstep.c
  287. if REMOTE_ONLY
  288. install-exec-hook:
  289. # Nothing to do here....
  290. else
  291. #
  292. # This is not ideal, but I know of no other way to install an
  293. # alias for a library. For the shared version, we have to do
  294. # a file check before creating the link, because it isn't going
  295. # to be there if the user configured with --disable-shared.
  296. #
  297. install-exec-hook:
  298. $(LN_S) -f libunwind-$(arch).a $(DESTDIR)$(libdir)/libunwind-generic.a
  299. if test -f $(DESTDIR)$(libdir)/libunwind-$(arch).so; then \
  300. $(LN_S) -f libunwind-$(arch).so \
  301. $(DESTDIR)$(libdir)/libunwind-generic.so; \
  302. fi
  303. endif
  304. if OS_LINUX
  305. libunwind_la_SOURCES_os = $(libunwind_la_SOURCES_os_linux)
  306. libunwind_la_SOURCES_os_local = $(libunwind_la_SOURCES_os_linux_local)
  307. libunwind_la_SOURCES_x86_os = x86/Gos-linux.c
  308. libunwind_x86_la_SOURCES_os = x86/getcontext-linux.S
  309. libunwind_la_SOURCES_x86_os_local = x86/Los-linux.c
  310. libunwind_la_SOURCES_x86_64_os = x86_64/Gos-linux.c
  311. libunwind_la_SOURCES_x86_64_os_local = x86_64/Los-linux.c
  312. libunwind_coredump_a_SOURCES += coredump/_UCD_access_reg_linux.c
  313. endif
  314. if OS_HPUX
  315. libunwind_la_SOURCES_os = $(libunwind_la_SOURCES_os_hpux)
  316. libunwind_la_SOURCES_os_local = $(libunwind_la_SOURCES_os_hpux_local)
  317. endif
  318. if OS_FREEBSD
  319. libunwind_la_SOURCES_os = $(libunwind_la_SOURCES_os_freebsd)
  320. libunwind_la_SOURCES_os_local = $(libunwind_la_SOURCES_os_freebsd_local)
  321. libunwind_la_SOURCES_x86_os = x86/Gos-freebsd.c
  322. libunwind_x86_la_SOURCES_os = x86/getcontext-freebsd.S
  323. libunwind_la_SOURCES_x86_os_local = x86/Los-freebsd.c
  324. libunwind_la_SOURCES_x86_64_os = x86_64/Gos-freebsd.c
  325. libunwind_la_SOURCES_x86_64_os_local = x86_64/Los-freebsd.c
  326. libunwind_coredump_a_SOURCES += coredump/_UCD_access_reg_freebsd.c
  327. endif
  328. if ARCH_ARM
  329. lib_LTLIBRARIES += libunwind-arm.la
  330. libunwind_la_SOURCES = $(libunwind_la_SOURCES_arm)
  331. libunwind_arm_la_SOURCES = $(libunwind_arm_la_SOURCES_arm)
  332. libunwind_arm_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
  333. libunwind_arm_la_LIBADD = libunwind-dwarf-generic.la
  334. libunwind_arm_la_LIBADD += libunwind-elf32.la
  335. if !REMOTE_ONLY
  336. libunwind_arm_la_LIBADD += libunwind.la -lc
  337. endif
  338. libunwind_setjmp_la_SOURCES += arm/siglongjmp.S
  339. else
  340. if ARCH_IA64
  341. ia64_mk_Gcursor_i_SOURCES = ia64/mk_Gcursor_i.c
  342. ia64_mk_Lcursor_i_SOURCES = ia64/mk_Lcursor_i.c
  343. noinst_PROGRAMS = ia64/mk_Gcursor_i ia64/mk_Lcursor_i
  344. BUILT_SOURCES = Gcursor_i.h Lcursor_i.h
  345. Gcursor_i.h: ia64/mk_Gcursor_i
  346. ia64/mk_Gcursor_i > $@
  347. Lcursor_i.h: ia64/mk_Lcursor_i
  348. ia64/mk_Lcursor_i > $@
  349. lib_LTLIBRARIES += libunwind-ia64.la
  350. libunwind_la_SOURCES = $(libunwind_la_SOURCES_ia64)
  351. libunwind_ia64_la_SOURCES = $(libunwind_ia64_la_SOURCES_ia64)
  352. libunwind_ia64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
  353. libunwind_ia64_la_LIBADD = libunwind-elf64.la
  354. if !REMOTE_ONLY
  355. libunwind_ia64_la_LIBADD += libunwind.la -lc
  356. endif
  357. libunwind_setjmp_la_SOURCES += ia64/setjmp.S ia64/sigsetjmp.S \
  358. ia64/longjmp.S ia64/siglongjmp.S
  359. else
  360. if ARCH_HPPA
  361. lib_LTLIBRARIES += libunwind-hppa.la
  362. libunwind_la_SOURCES = $(libunwind_la_SOURCES_hppa)
  363. libunwind_hppa_la_SOURCES = $(libunwind_hppa_la_SOURCES_hppa)
  364. libunwind_hppa_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
  365. libunwind_hppa_la_LIBADD = libunwind-dwarf-generic.la
  366. libunwind_hppa_la_LIBADD += libunwind-elf32.la
  367. if !REMOTE_ONLY
  368. libunwind_hppa_la_LIBADD += libunwind.la -lc
  369. endif
  370. libunwind_setjmp_la_SOURCES += hppa/siglongjmp.S
  371. else
  372. if ARCH_MIPS
  373. lib_LTLIBRARIES += libunwind-mips.la
  374. libunwind_la_SOURCES = $(libunwind_la_SOURCES_mips)
  375. libunwind_mips_la_SOURCES = $(libunwind_mips_la_SOURCES_mips)
  376. libunwind_mips_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
  377. libunwind_mips_la_LIBADD = libunwind-dwarf-generic.la
  378. libunwind_mips_la_LIBADD += libunwind-elfxx.la
  379. if !REMOTE_ONLY
  380. libunwind_mips_la_LIBADD += libunwind.la -lc
  381. endif
  382. libunwind_setjmp_la_SOURCES += mips/siglongjmp.S
  383. else
  384. if ARCH_X86
  385. lib_LTLIBRARIES += libunwind-x86.la
  386. libunwind_la_SOURCES = $(libunwind_la_SOURCES_x86) $(libunwind_x86_la_SOURCES_os)
  387. libunwind_x86_la_SOURCES = $(libunwind_x86_la_SOURCES_x86)
  388. libunwind_x86_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
  389. libunwind_x86_la_LIBADD = libunwind-dwarf-generic.la
  390. libunwind_x86_la_LIBADD += libunwind-elf32.la
  391. if !REMOTE_ONLY
  392. libunwind_x86_la_LIBADD += libunwind.la -lc
  393. endif
  394. libunwind_setjmp_la_SOURCES += x86/longjmp.S x86/siglongjmp.S
  395. else
  396. if ARCH_X86_64
  397. lib_LTLIBRARIES += libunwind-x86_64.la
  398. libunwind_la_SOURCES = $(libunwind_la_SOURCES_x86_64)
  399. libunwind_x86_64_la_SOURCES = $(libunwind_x86_64_la_SOURCES_x86_64)
  400. libunwind_x86_64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
  401. libunwind_x86_64_la_LIBADD = libunwind-dwarf-generic.la
  402. libunwind_x86_64_la_LIBADD += libunwind-elf64.la
  403. if !REMOTE_ONLY
  404. libunwind_x86_64_la_LIBADD += libunwind.la -lc
  405. endif
  406. libunwind_setjmp_la_SOURCES += x86_64/longjmp.S x86_64/siglongjmp.S
  407. else
  408. if ARCH_PPC32
  409. lib_LTLIBRARIES += libunwind-ppc32.la
  410. libunwind_la_SOURCES = $(libunwind_la_SOURCES_ppc32)
  411. libunwind_ppc32_la_SOURCES = $(libunwind_ppc32_la_SOURCES_ppc32)
  412. libunwind_ppc32_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
  413. libunwind_ppc32_la_LIBADD = libunwind-dwarf-generic.la
  414. libunwind_ppc32_la_LIBADD += libunwind-elf32.la
  415. if !REMOTE_ONLY
  416. libunwind_ppc32_la_LIBADD += libunwind.la -lc
  417. endif
  418. libunwind_setjmp_la_SOURCES += ppc/longjmp.S ppc/siglongjmp.S
  419. else
  420. if ARCH_PPC64
  421. lib_LTLIBRARIES += libunwind-ppc64.la
  422. libunwind_la_SOURCES = $(libunwind_la_SOURCES_ppc64)
  423. libunwind_ppc64_la_SOURCES = $(libunwind_ppc64_la_SOURCES_ppc64)
  424. libunwind_ppc64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
  425. libunwind_ppc64_la_LIBADD = libunwind-dwarf-generic.la
  426. libunwind_ppc64_la_LIBADD += libunwind-elf64.la
  427. if !REMOTE_ONLY
  428. libunwind_ppc64_la_LIBADD += libunwind.la -lc
  429. endif
  430. libunwind_setjmp_la_SOURCES += ppc/longjmp.S ppc/siglongjmp.S
  431. endif # ARCH_PPC64
  432. endif # ARCH_PPC32
  433. endif # ARCH_X86_64
  434. endif # ARCH_X86
  435. endif # ARCH_MIPS
  436. endif # ARCH_HPPA
  437. endif # ARCH_IA64
  438. endif # ARCH_ARM
  439. # libunwind-setjmp depends on libunwind-$(arch). Therefore must be added
  440. # at the end.
  441. if !REMOTE_ONLY
  442. lib_LTLIBRARIES += libunwind-setjmp.la
  443. endif
  444. #
  445. # Don't link with standard libraries, because those may mention
  446. # libunwind already.
  447. #
  448. libunwind_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -XCClinker -nostdlib \
  449. $(LDFLAGS_STATIC_LIBCXA) -version-info $(SOVERSION)
  450. libunwind_la_LIBADD += -lc $(LIBCRTS)
  451. AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/tdep-$(arch) -I.
  452. AM_CPPFLAGS+= -I../../../../../common/inc/ -I../../../../../sdk/trts/
  453. AM_CPPFLAGS+= -I../../../../../common/inc/internal
  454. AM_CCASFLAGS = $(AM_CPPFLAGS)
  455. noinst_HEADERS += unwind/unwind-internal.h
  456. EXTRA_DIST = $(libunwind_la_SOURCES_arm) \
  457. $(libunwind_la_SOURCES_hppa) \
  458. $(libunwind_la_SOURCES_ia64) \
  459. $(libunwind_la_SOURCES_mips) \
  460. $(libunwind_la_SOURCES_x86) \
  461. $(libunwind_la_SOURCES_os_freebsd) \
  462. $(libunwind_la_SOURCES_os_linux) \
  463. $(libunwind_la_SOURCES_os_hpux) \
  464. $(libunwind_la_SOURCES_common) \
  465. $(libunwind_la_SOURCES_local) \
  466. $(libunwind_la_SOURCES_generic) \
  467. $(libunwind_arm_la_SOURCES_arm) \
  468. $(libunwind_hppa_la_SOURCES_hppa) \
  469. $(libunwind_ia64_la_SOURCES_ia64) \
  470. $(libunwind_mips_la_SOURCES_mips) \
  471. $(libunwind_x86_la_SOURCES_x86) \
  472. $(libunwind_x86_64_la_SOURCES_x86_64)
  473. MAINTAINERCLEANFILES = Makefile.in
  474. # The -version-info flag accepts an argument of the form
  475. # `current[:revision[:age]]'. So, passing `-version-info 3:12:1' sets
  476. # current to 3, revision to 12, and age to 1.
  477. # If either revision or age are omitted, they default to 0. Also note
  478. # that age must be less than or equal to the current interface number.
  479. # Here are a set of rules to help you update your library version
  480. # information:
  481. # 1. Start with version information of `0:0:0' for each libtool
  482. # library.
  483. # 2. Update the version information only immediately before a public
  484. # release of your software. More frequent updates are unnecessary,
  485. # and only guarantee that the current interface number gets larger
  486. # faster.
  487. # 3. If the library source code has changed at all since the last
  488. # update, then increment revision (`c:r:a' becomes `c:r+1:a').
  489. # 4. If any interfaces have been added, removed, or changed since the
  490. # last update, increment current, and set revision to 0.
  491. # 5. If any interfaces have been added since the last public release,
  492. # then increment age.
  493. # 6. If any interfaces have been removed since the last public
  494. # release, then set age to 0.