1SOVERSION=8:1:0 # See comments at end of file. 2SETJMP_SO_VERSION=0:0:0 3COREDUMP_SO_VERSION=0:0:0 4# 5# Don't link with start-files since we don't use any constructors/destructors: 6# 7COMMON_SO_LDFLAGS = $(LDFLAGS_NOSTARTFILES) 8 9lib_LIBRARIES = 10lib_LTLIBRARIES = 11if !REMOTE_ONLY 12lib_LTLIBRARIES += libunwind.la 13if BUILD_PTRACE 14lib_LTLIBRARIES += libunwind-ptrace.la 15endif 16if BUILD_COREDUMP 17lib_LTLIBRARIES += libunwind-coredump.la 18endif 19endif 20 21noinst_HEADERS = 22noinst_LTLIBRARIES = 23 24pkgconfigdir = $(libdir)/pkgconfig 25pkgconfig_DATA = libunwind-generic.pc 26 27if !REMOTE_ONLY 28pkgconfig_DATA += unwind/libunwind.pc 29endif 30 31if BUILD_PTRACE 32pkgconfig_DATA += ptrace/libunwind-ptrace.pc 33endif 34 35if BUILD_SETJMP 36pkgconfig_DATA += setjmp/libunwind-setjmp.pc 37endif 38 39if BUILD_COREDUMP 40pkgconfig_DATA += coredump/libunwind-coredump.pc 41endif 42 43### libunwind-ptrace: 44libunwind_ptrace_la_SOURCES = \ 45 ptrace/_UPT_elf.c \ 46 ptrace/_UPT_accessors.c ptrace/_UPT_access_fpreg.c \ 47 ptrace/_UPT_access_mem.c ptrace/_UPT_access_reg.c \ 48 ptrace/_UPT_create.c ptrace/_UPT_destroy.c \ 49 ptrace/_UPT_find_proc_info.c ptrace/_UPT_get_dyn_info_list_addr.c \ 50 ptrace/_UPT_put_unwind_info.c ptrace/_UPT_get_proc_name.c \ 51 ptrace/_UPT_reg_offset.c ptrace/_UPT_resume.c 52noinst_HEADERS += ptrace/_UPT_internal.h 53 54### libunwind-coredump: 55libunwind_coredump_la_SOURCES = \ 56 coredump/_UCD_accessors.c \ 57 coredump/_UCD_create.c \ 58 coredump/_UCD_destroy.c \ 59 coredump/_UCD_access_mem.c \ 60 coredump/_UCD_elf_map_image.c \ 61 coredump/_UCD_find_proc_info.c \ 62 coredump/_UCD_get_proc_name.c \ 63 \ 64 coredump/_UPT_elf.c \ 65 coredump/_UPT_access_fpreg.c \ 66 coredump/_UPT_get_dyn_info_list_addr.c \ 67 coredump/_UPT_put_unwind_info.c \ 68 coredump/_UPT_resume.c 69libunwind_coredump_la_LDFLAGS = $(COMMON_SO_LDFLAGS) \ 70 -version-info $(COREDUMP_SO_VERSION) 71noinst_HEADERS += coredump/_UCD_internal.h 72 73### libunwind-setjmp: 74libunwind_setjmp_la_LDFLAGS = $(COMMON_SO_LDFLAGS) \ 75 -version-info $(SETJMP_SO_VERSION) 76 77if USE_ELF32 78LIBUNWIND_ELF = libunwind-elf32.la 79endif 80if USE_ELF64 81LIBUNWIND_ELF = libunwind-elf64.la 82endif 83if USE_ELFXX 84LIBUNWIND_ELF = libunwind-elfxx.la 85endif 86 87libunwind_setjmp_la_LIBADD = $(LIBUNWIND_ELF) \ 88 libunwind-$(arch).la \ 89 libunwind.la -lc 90libunwind_setjmp_la_SOURCES = setjmp/longjmp.c \ 91 setjmp/siglongjmp.c 92noinst_HEADERS += setjmp/setjmp_i.h 93 94### libunwind: 95libunwind_la_LIBADD = 96 97# List of arch-independent files needed by both local-only and generic 98# libraries: 99libunwind_la_SOURCES_common = \ 100 $(libunwind_la_SOURCES_os) \ 101 mi/init.c mi/flush_cache.c mi/mempool.c mi/strerror.c 102 103# List of arch-independent files needed by generic library (libunwind-$ARCH): 104libunwind_la_SOURCES_generic = \ 105 mi/Gdyn-extract.c mi/Gdyn-remote.c mi/Gfind_dynamic_proc_info.c \ 106 mi/Gget_accessors.c \ 107 mi/Gget_proc_info_by_ip.c mi/Gget_proc_name.c \ 108 mi/Gput_dynamic_unwind_info.c mi/Gdestroy_addr_space.c \ 109 mi/Gget_reg.c mi/Gset_reg.c \ 110 mi/Gget_fpreg.c mi/Gset_fpreg.c \ 111 mi/Gset_caching_policy.c 112 113if SUPPORT_CXX_EXCEPTIONS 114libunwind_la_SOURCES_local_unwind = \ 115 unwind/Backtrace.c unwind/DeleteException.c \ 116 unwind/FindEnclosingFunction.c unwind/ForcedUnwind.c \ 117 unwind/GetBSP.c unwind/GetCFA.c unwind/GetDataRelBase.c \ 118 unwind/GetGR.c unwind/GetIP.c unwind/GetLanguageSpecificData.c \ 119 unwind/GetRegionStart.c unwind/GetTextRelBase.c \ 120 unwind/RaiseException.c unwind/Resume.c \ 121 unwind/Resume_or_Rethrow.c unwind/SetGR.c unwind/SetIP.c \ 122 unwind/GetIPInfo.c 123 124# _ReadULEB()/_ReadSLEB() are needed for Intel C++ 8.0 compatibility 125libunwind_la_SOURCES_os_linux_local = mi/_ReadULEB.c mi/_ReadSLEB.c 126endif 127 128# List of arch-independent files needed by local-only library (libunwind): 129libunwind_la_SOURCES_local_nounwind = \ 130 $(libunwind_la_SOURCES_os_local) \ 131 mi/backtrace.c \ 132 mi/dyn-cancel.c mi/dyn-info-list.c mi/dyn-register.c \ 133 mi/Ldyn-extract.c mi/Lfind_dynamic_proc_info.c \ 134 mi/Lget_accessors.c \ 135 mi/Lget_proc_info_by_ip.c mi/Lget_proc_name.c \ 136 mi/Lput_dynamic_unwind_info.c mi/Ldestroy_addr_space.c \ 137 mi/Lget_reg.c mi/Lset_reg.c \ 138 mi/Lget_fpreg.c mi/Lset_fpreg.c \ 139 mi/Lset_caching_policy.c 140 141libunwind_la_SOURCES_local = \ 142 $(libunwind_la_SOURCES_local_nounwind) \ 143 $(libunwind_la_SOURCES_local_unwind) 144 145noinst_HEADERS += os-linux.h 146libunwind_la_SOURCES_os_linux = os-linux.c 147 148libunwind_la_SOURCES_os_hpux = os-hpux.c 149 150libunwind_la_SOURCES_os_freebsd = os-freebsd.c 151 152libunwind_la_SOURCES_os_qnx = os-qnx.c 153 154libunwind_dwarf_common_la_SOURCES = dwarf/global.c 155 156libunwind_dwarf_local_la_SOURCES = \ 157 dwarf/Lexpr.c dwarf/Lfde.c dwarf/Lparser.c dwarf/Lpe.c dwarf/Lstep.c \ 158 dwarf/Lfind_proc_info-lsb.c \ 159 dwarf/Lfind_unwind_table.c 160libunwind_dwarf_local_la_LIBADD = libunwind-dwarf-common.la 161 162libunwind_dwarf_generic_la_SOURCES = \ 163 dwarf/Gexpr.c dwarf/Gfde.c dwarf/Gparser.c dwarf/Gpe.c dwarf/Gstep.c \ 164 dwarf/Gfind_proc_info-lsb.c \ 165 dwarf/Gfind_unwind_table.c 166libunwind_dwarf_generic_la_LIBADD = libunwind-dwarf-common.la 167 168if USE_DWARF 169 noinst_LTLIBRARIES += libunwind-dwarf-common.la libunwind-dwarf-generic.la 170if !REMOTE_ONLY 171 noinst_LTLIBRARIES += libunwind-dwarf-local.la 172endif 173 libunwind_la_LIBADD += libunwind-dwarf-local.la 174endif 175 176noinst_HEADERS += elf32.h elf64.h elfxx.h 177 178libunwind_elf32_la_SOURCES = elf32.c 179libunwind_elf64_la_SOURCES = elf64.c 180libunwind_elfxx_la_SOURCES = elfxx.c 181 182noinst_LTLIBRARIES += $(LIBUNWIND_ELF) 183libunwind_la_LIBADD += $(LIBUNWIND_ELF) 184 185# The list of files that go into libunwind and libunwind-aarch64: 186noinst_HEADERS += aarch64/init.h aarch64/offsets.h aarch64/unwind_i.h 187libunwind_la_SOURCES_aarch64_common = $(libunwind_la_SOURCES_common) \ 188 aarch64/is_fpreg.c aarch64/regname.c 189 190# The list of files that go into libunwind: 191libunwind_la_SOURCES_aarch64 = $(libunwind_la_SOURCES_aarch64_common) \ 192 $(libunwind_la_SOURCES_local) \ 193 aarch64/Lcreate_addr_space.c aarch64/Lget_proc_info.c \ 194 aarch64/Lget_save_loc.c aarch64/Lglobal.c aarch64/Linit.c \ 195 aarch64/Linit_local.c aarch64/Linit_remote.c \ 196 aarch64/Lis_signal_frame.c aarch64/Lregs.c aarch64/Lresume.c \ 197 aarch64/Lstep.c 198 199libunwind_aarch64_la_SOURCES_aarch64 = $(libunwind_la_SOURCES_aarch64_common) \ 200 $(libunwind_la_SOURCES_generic) \ 201 aarch64/Gcreate_addr_space.c aarch64/Gget_proc_info.c \ 202 aarch64/Gget_save_loc.c aarch64/Gglobal.c aarch64/Ginit.c \ 203 aarch64/Ginit_local.c aarch64/Ginit_remote.c \ 204 aarch64/Gis_signal_frame.c aarch64/Gregs.c aarch64/Gresume.c \ 205 aarch64/Gstep.c 206 207# The list of files that go into libunwind and libunwind-arm: 208noinst_HEADERS += arm/init.h arm/offsets.h arm/unwind_i.h 209libunwind_la_SOURCES_arm_common = $(libunwind_la_SOURCES_common) \ 210 arm/is_fpreg.c arm/regname.c 211 212# The list of files that go into libunwind: 213libunwind_la_SOURCES_arm = $(libunwind_la_SOURCES_arm_common) \ 214 $(libunwind_la_SOURCES_local) \ 215 arm/getcontext.S \ 216 arm/Lcreate_addr_space.c arm/Lget_proc_info.c arm/Lget_save_loc.c \ 217 arm/Lglobal.c arm/Linit.c arm/Linit_local.c arm/Linit_remote.c \ 218 arm/Lis_signal_frame.c arm/Lregs.c arm/Lresume.c arm/Lstep.c \ 219 arm/Lex_tables.c 220 221libunwind_arm_la_SOURCES_arm = $(libunwind_la_SOURCES_arm_common) \ 222 $(libunwind_la_SOURCES_generic) \ 223 arm/Gcreate_addr_space.c arm/Gget_proc_info.c arm/Gget_save_loc.c \ 224 arm/Gglobal.c arm/Ginit.c arm/Ginit_local.c arm/Ginit_remote.c \ 225 arm/Gis_signal_frame.c arm/Gregs.c arm/Gresume.c arm/Gstep.c \ 226 arm/Gex_tables.c 227 228# The list of files that go both into libunwind and libunwind-ia64: 229noinst_HEADERS += ia64/init.h ia64/offsets.h ia64/regs.h \ 230 ia64/ucontext_i.h ia64/unwind_decoder.h ia64/unwind_i.h 231libunwind_la_SOURCES_ia64_common = $(libunwind_la_SOURCES_common) \ 232 ia64/regname.c 233 234# The list of files that go into libunwind: 235libunwind_la_SOURCES_ia64 = $(libunwind_la_SOURCES_ia64_common) \ 236 $(libunwind_la_SOURCES_local) \ 237 \ 238 ia64/dyn_info_list.S ia64/getcontext.S \ 239 \ 240 ia64/Lcreate_addr_space.c ia64/Lget_proc_info.c ia64/Lget_save_loc.c \ 241 ia64/Lglobal.c ia64/Linit.c ia64/Linit_local.c ia64/Linit_remote.c \ 242 ia64/Linstall_cursor.S ia64/Lis_signal_frame.c ia64/Lparser.c \ 243 ia64/Lrbs.c ia64/Lregs.c ia64/Lresume.c ia64/Lscript.c ia64/Lstep.c \ 244 ia64/Ltables.c ia64/Lfind_unwind_table.c 245 246# The list of files that go into libunwind-ia64: 247libunwind_ia64_la_SOURCES_ia64 = $(libunwind_la_SOURCES_ia64_common) \ 248 $(libunwind_la_SOURCES_generic) \ 249 ia64/Gcreate_addr_space.c ia64/Gget_proc_info.c ia64/Gget_save_loc.c \ 250 ia64/Gglobal.c ia64/Ginit.c ia64/Ginit_local.c ia64/Ginit_remote.c \ 251 ia64/Ginstall_cursor.S ia64/Gis_signal_frame.c ia64/Gparser.c \ 252 ia64/Grbs.c ia64/Gregs.c ia64/Gresume.c ia64/Gscript.c ia64/Gstep.c \ 253 ia64/Gtables.c ia64/Gfind_unwind_table.c 254 255# The list of files that go both into libunwind and libunwind-hppa: 256noinst_HEADERS += hppa/init.h hppa/offsets.h hppa/unwind_i.h 257libunwind_la_SOURCES_hppa_common = $(libunwind_la_SOURCES_common) \ 258 hppa/regname.c 259 260# The list of files that go into libunwind: 261libunwind_la_SOURCES_hppa = $(libunwind_la_SOURCES_hppa_common) \ 262 $(libunwind_la_SOURCES_local) \ 263 hppa/getcontext.S hppa/setcontext.S \ 264 hppa/Lcreate_addr_space.c hppa/Lget_save_loc.c hppa/Lglobal.c \ 265 hppa/Linit.c hppa/Linit_local.c hppa/Linit_remote.c \ 266 hppa/Lis_signal_frame.c hppa/Lget_proc_info.c hppa/Lregs.c \ 267 hppa/Lresume.c hppa/Lstep.c 268 269# The list of files that go into libunwind-hppa: 270libunwind_hppa_la_SOURCES_hppa = $(libunwind_la_SOURCES_hppa_common) \ 271 $(libunwind_la_SOURCES_generic) \ 272 hppa/Gcreate_addr_space.c hppa/Gget_save_loc.c hppa/Gglobal.c \ 273 hppa/Ginit.c hppa/Ginit_local.c hppa/Ginit_remote.c \ 274 hppa/Gis_signal_frame.c hppa/Gget_proc_info.c hppa/Gregs.c \ 275 hppa/Gresume.c hppa/Gstep.c 276 277# The list of files that go info libunwind and libunwind-mips: 278noinst_HEADERS += mips/init.h mips/offsets.h 279libunwind_la_SOURCES_mips_common = $(libunwind_la_SOURCES_common) \ 280 mips/is_fpreg.c mips/regname.c 281 282# The list of files that go into libunwind: 283libunwind_la_SOURCES_mips = $(libunwind_la_SOURCES_mips_common) \ 284 $(libunwind_la_SOURCES_local) \ 285 mips/getcontext.S \ 286 mips/Lcreate_addr_space.c mips/Lget_proc_info.c mips/Lget_save_loc.c \ 287 mips/Lglobal.c mips/Linit.c mips/Linit_local.c mips/Linit_remote.c \ 288 mips/Lis_signal_frame.c mips/Lregs.c mips/Lresume.c mips/Lstep.c 289 290libunwind_mips_la_SOURCES_mips = $(libunwind_la_SOURCES_mips_common) \ 291 $(libunwind_la_SOURCES_generic) \ 292 mips/Gcreate_addr_space.c mips/Gget_proc_info.c mips/Gget_save_loc.c \ 293 mips/Gglobal.c mips/Ginit.c mips/Ginit_local.c mips/Ginit_remote.c \ 294 mips/Gis_signal_frame.c mips/Gregs.c mips/Gresume.c mips/Gstep.c 295 296# The list of files that go both into libunwind and libunwind-x86: 297noinst_HEADERS += x86/init.h x86/offsets.h x86/unwind_i.h 298libunwind_la_SOURCES_x86_common = $(libunwind_la_SOURCES_common) \ 299 x86/is_fpreg.c x86/regname.c 300 301# The list of files that go into libunwind: 302libunwind_la_SOURCES_x86 = $(libunwind_la_SOURCES_x86_common) \ 303 $(libunwind_la_SOURCES_x86_os_local) \ 304 $(libunwind_la_SOURCES_local) \ 305 x86/Lcreate_addr_space.c x86/Lget_save_loc.c x86/Lglobal.c \ 306 x86/Linit.c x86/Linit_local.c x86/Linit_remote.c \ 307 x86/Lget_proc_info.c x86/Lregs.c \ 308 x86/Lresume.c x86/Lstep.c 309 310# The list of files that go into libunwind-x86: 311libunwind_x86_la_SOURCES_x86 = $(libunwind_la_SOURCES_x86_common) \ 312 $(libunwind_la_SOURCES_x86_os) \ 313 $(libunwind_la_SOURCES_generic) \ 314 x86/Gcreate_addr_space.c x86/Gget_save_loc.c x86/Gglobal.c \ 315 x86/Ginit.c x86/Ginit_local.c x86/Ginit_remote.c \ 316 x86/Gget_proc_info.c x86/Gregs.c \ 317 x86/Gresume.c x86/Gstep.c 318 319# The list of files that go both into libunwind and libunwind-x86_64: 320noinst_HEADERS += x86_64/offsets.h \ 321 x86_64/init.h x86_64/unwind_i.h x86_64/ucontext_i.h 322libunwind_la_SOURCES_x86_64_common = $(libunwind_la_SOURCES_common) \ 323 x86_64/is_fpreg.c x86_64/regname.c 324 325# The list of files that go into libunwind: 326libunwind_la_SOURCES_x86_64 = $(libunwind_la_SOURCES_x86_64_common) \ 327 $(libunwind_la_SOURCES_x86_64_os_local) \ 328 $(libunwind_la_SOURCES_local) \ 329 x86_64/setcontext.S \ 330 x86_64/Lcreate_addr_space.c x86_64/Lget_save_loc.c x86_64/Lglobal.c \ 331 x86_64/Linit.c x86_64/Linit_local.c x86_64/Linit_remote.c \ 332 x86_64/Lget_proc_info.c x86_64/Lregs.c x86_64/Lresume.c \ 333 x86_64/Lstash_frame.c x86_64/Lstep.c x86_64/Ltrace.c x86_64/getcontext.S 334 335# The list of files that go into libunwind-x86_64: 336libunwind_x86_64_la_SOURCES_x86_64 = $(libunwind_la_SOURCES_x86_64_common) \ 337 $(libunwind_la_SOURCES_x86_64_os) \ 338 $(libunwind_la_SOURCES_generic) \ 339 x86_64/Gcreate_addr_space.c x86_64/Gget_save_loc.c x86_64/Gglobal.c \ 340 x86_64/Ginit.c x86_64/Ginit_local.c x86_64/Ginit_remote.c \ 341 x86_64/Gget_proc_info.c x86_64/Gregs.c x86_64/Gresume.c \ 342 x86_64/Gstash_frame.c x86_64/Gstep.c x86_64/Gtrace.c 343 344# The list of local files that go to Power 64 and 32: 345libunwind_la_SOURCES_ppc = ppc/Lcreate_addr_space.c \ 346 ppc/Lget_proc_info.c ppc/Lget_save_loc.c ppc/Linit_local.c \ 347 ppc/Linit_remote.c ppc/Lis_signal_frame.c 348 349# The list of generic files that go to Power 64 and 32: 350libunwind_ppc_la_SOURCES_ppc_generic = ppc/Gcreate_addr_space.c \ 351 ppc/Gget_proc_info.c ppc/Gget_save_loc.c ppc/Ginit_local.c \ 352 ppc/Ginit_remote.c ppc/Gis_signal_frame.c 353 354# The list of files that go both into libunwind and libunwind-ppc32: 355noinst_HEADERS += ppc32/init.h ppc32/unwind_i.h ppc32/ucontext_i.h 356libunwind_la_SOURCES_ppc32_common = $(libunwind_la_SOURCES_common) \ 357 ppc32/is_fpreg.c ppc32/regname.c ppc32/get_func_addr.c 358 359# The list of files that go into libunwind: 360libunwind_la_SOURCES_ppc32 = $(libunwind_la_SOURCES_ppc32_common) \ 361 $(libunwind_la_SOURCES_local) \ 362 $(libunwind_la_SOURCES_ppc) \ 363 ppc32/Lglobal.c ppc32/Linit.c \ 364 ppc32/Lregs.c ppc32/Lresume.c ppc32/Lstep.c 365 366# The list of files that go into libunwind-ppc32: 367libunwind_ppc32_la_SOURCES_ppc32 = $(libunwind_la_SOURCES_ppc32_common) \ 368 $(libunwind_la_SOURCES_generic) \ 369 $(libunwind_ppc_la_SOURCES_ppc_generic) \ 370 ppc32/Gglobal.c ppc32/Ginit.c \ 371 ppc32/Gregs.c ppc32/Gresume.c ppc32/Gstep.c 372 373# The list of files that go both into libunwind and libunwind-ppc64: 374noinst_HEADERS += ppc64/init.h ppc64/unwind_i.h ppc64/ucontext_i.h 375libunwind_la_SOURCES_ppc64_common = $(libunwind_la_SOURCES_common) \ 376 ppc64/is_fpreg.c ppc64/regname.c ppc64/get_func_addr.c 377 378# The list of files that go into libunwind: 379libunwind_la_SOURCES_ppc64 = $(libunwind_la_SOURCES_ppc64_common) \ 380 $(libunwind_la_SOURCES_local) \ 381 $(libunwind_la_SOURCES_ppc) \ 382 ppc64/Lglobal.c ppc64/Linit.c \ 383 ppc64/Lregs.c ppc64/Lresume.c ppc64/Lstep.c 384 385# The list of files that go into libunwind-ppc64: 386libunwind_ppc64_la_SOURCES_ppc64 = $(libunwind_la_SOURCES_ppc64_common) \ 387 $(libunwind_la_SOURCES_generic) \ 388 $(libunwind_ppc_la_SOURCES_ppc_generic) \ 389 ppc64/Gglobal.c ppc64/Ginit.c \ 390 ppc64/Gregs.c ppc64/Gresume.c ppc64/Gstep.c 391 392# The list of files that go into libunwind and libunwind-sh: 393noinst_HEADERS += sh/init.h sh/offsets.h sh/unwind_i.h 394libunwind_la_SOURCES_sh_common = $(libunwind_la_SOURCES_common) \ 395 sh/is_fpreg.c sh/regname.c 396 397# The list of files that go into libunwind: 398libunwind_la_SOURCES_sh = $(libunwind_la_SOURCES_sh_common) \ 399 $(libunwind_la_SOURCES_local) \ 400 sh/Lcreate_addr_space.c sh/Lget_proc_info.c sh/Lget_save_loc.c \ 401 sh/Lglobal.c sh/Linit.c sh/Linit_local.c sh/Linit_remote.c \ 402 sh/Lis_signal_frame.c sh/Lregs.c sh/Lresume.c sh/Lstep.c 403 404libunwind_sh_la_SOURCES_sh = $(libunwind_la_SOURCES_sh_common) \ 405 $(libunwind_la_SOURCES_generic) \ 406 sh/Gcreate_addr_space.c sh/Gget_proc_info.c sh/Gget_save_loc.c \ 407 sh/Gglobal.c sh/Ginit.c sh/Ginit_local.c sh/Ginit_remote.c \ 408 sh/Gis_signal_frame.c sh/Gregs.c sh/Gresume.c sh/Gstep.c 409 410if REMOTE_ONLY 411install-exec-hook: 412# Nothing to do here.... 413else 414# 415# This is not ideal, but I know of no other way to install an 416# alias for a library. For the shared version, we have to do 417# a file check before creating the link, because it isn't going 418# to be there if the user configured with --disable-shared. 419# 420install-exec-hook: 421 cd $(DESTDIR)$(libdir) && $(LN_S) -f libunwind-$(arch).a libunwind-generic.a 422 if test -f $(DESTDIR)$(libdir)/libunwind-$(arch).so; then \ 423 cd $(DESTDIR)$(libdir) && $(LN_S) -f libunwind-$(arch).so \ 424 libunwind-generic.so; \ 425 fi 426endif 427 428if OS_LINUX 429 libunwind_la_SOURCES_os = $(libunwind_la_SOURCES_os_linux) 430 libunwind_la_SOURCES_os_local = $(libunwind_la_SOURCES_os_linux_local) 431 libunwind_la_SOURCES_x86_os = x86/Gos-linux.c 432 libunwind_x86_la_SOURCES_os = x86/getcontext-linux.S 433 libunwind_la_SOURCES_x86_os_local = x86/Los-linux.c 434 libunwind_la_SOURCES_x86_64_os = x86_64/Gos-linux.c 435 libunwind_la_SOURCES_x86_64_os_local = x86_64/Los-linux.c 436 libunwind_coredump_la_SOURCES += coredump/_UCD_access_reg_linux.c 437endif 438 439if OS_HPUX 440 libunwind_la_SOURCES_os = $(libunwind_la_SOURCES_os_hpux) 441 libunwind_la_SOURCES_os_local = $(libunwind_la_SOURCES_os_hpux_local) 442endif 443 444if OS_FREEBSD 445 libunwind_la_SOURCES_os = $(libunwind_la_SOURCES_os_freebsd) 446 libunwind_la_SOURCES_os_local = $(libunwind_la_SOURCES_os_freebsd_local) 447 libunwind_la_SOURCES_x86_os = x86/Gos-freebsd.c 448 libunwind_x86_la_SOURCES_os = x86/getcontext-freebsd.S 449 libunwind_la_SOURCES_x86_os_local = x86/Los-freebsd.c 450 libunwind_la_SOURCES_x86_64_os = x86_64/Gos-freebsd.c 451 libunwind_la_SOURCES_x86_64_os_local = x86_64/Los-freebsd.c 452 libunwind_coredump_la_SOURCES += coredump/_UCD_access_reg_freebsd.c 453endif 454 455if OS_QNX 456 libunwind_la_SOURCES_os = $(libunwind_la_SOURCES_os_qnx) 457 libunwind_la_SOURCES_os_local = $(libunwind_la_SOURCES_os_qnx_local) 458endif 459 460if ARCH_AARCH64 461 lib_LTLIBRARIES += libunwind-aarch64.la 462 libunwind_la_SOURCES = $(libunwind_la_SOURCES_aarch64) 463 libunwind_aarch64_la_SOURCES = $(libunwind_aarch64_la_SOURCES_aarch64) 464 libunwind_aarch64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION) 465 libunwind_aarch64_la_LIBADD = libunwind-dwarf-generic.la 466 libunwind_aarch64_la_LIBADD += libunwind-elf64.la 467if !REMOTE_ONLY 468 libunwind_aarch64_la_LIBADD += libunwind.la -lc 469endif 470 libunwind_setjmp_la_SOURCES += aarch64/siglongjmp.S 471else 472if ARCH_ARM 473 lib_LTLIBRARIES += libunwind-arm.la 474 libunwind_la_SOURCES = $(libunwind_la_SOURCES_arm) 475 libunwind_arm_la_SOURCES = $(libunwind_arm_la_SOURCES_arm) 476 libunwind_arm_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION) 477 libunwind_arm_la_LIBADD = libunwind-dwarf-generic.la 478 libunwind_arm_la_LIBADD += libunwind-elf32.la 479if !REMOTE_ONLY 480 libunwind_arm_la_LIBADD += libunwind.la -lc 481endif 482 libunwind_setjmp_la_SOURCES += arm/siglongjmp.S 483else 484if ARCH_IA64 485 BUILT_SOURCES = Gcursor_i.h Lcursor_i.h 486mk_Gcursor_i.s: $(srcdir)/ia64/mk_Gcursor_i.c 487 $(COMPILE) -S "$(srcdir)/ia64/mk_Gcursor_i.c" -o mk_Gcursor_i.s 488mk_Lcursor_i.s: $(srcdir)/ia64/mk_Lcursor_i.c 489 $(COMPILE) -S "$(srcdir)/ia64/mk_Lcursor_i.c" -o mk_Lcursor_i.s 490Gcursor_i.h: mk_Gcursor_i.s 491 "$(srcdir)/ia64/mk_cursor_i" mk_Gcursor_i.s > Gcursor_i.h 492Lcursor_i.h: mk_Lcursor_i.s 493 "$(srcdir)/ia64/mk_cursor_i" mk_Lcursor_i.s > Lcursor_i.h 494 495 lib_LTLIBRARIES += libunwind-ia64.la 496 libunwind_la_SOURCES = $(libunwind_la_SOURCES_ia64) 497 libunwind_ia64_la_SOURCES = $(libunwind_ia64_la_SOURCES_ia64) 498 libunwind_ia64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION) 499 libunwind_ia64_la_LIBADD = libunwind-elf64.la 500if !REMOTE_ONLY 501 libunwind_ia64_la_LIBADD += libunwind.la -lc 502endif 503 libunwind_setjmp_la_SOURCES += ia64/setjmp.S ia64/sigsetjmp.S \ 504 ia64/longjmp.S ia64/siglongjmp.S 505else 506if ARCH_HPPA 507 lib_LTLIBRARIES += libunwind-hppa.la 508 libunwind_la_SOURCES = $(libunwind_la_SOURCES_hppa) 509 libunwind_hppa_la_SOURCES = $(libunwind_hppa_la_SOURCES_hppa) 510 libunwind_hppa_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION) 511 libunwind_hppa_la_LIBADD = libunwind-dwarf-generic.la 512 libunwind_hppa_la_LIBADD += libunwind-elf32.la 513if !REMOTE_ONLY 514 libunwind_hppa_la_LIBADD += libunwind.la -lc 515endif 516 libunwind_setjmp_la_SOURCES += hppa/siglongjmp.S 517else 518if ARCH_MIPS 519 lib_LTLIBRARIES += libunwind-mips.la 520 libunwind_la_SOURCES = $(libunwind_la_SOURCES_mips) 521 libunwind_mips_la_SOURCES = $(libunwind_mips_la_SOURCES_mips) 522 libunwind_mips_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION) 523 libunwind_mips_la_LIBADD = libunwind-dwarf-generic.la 524 libunwind_mips_la_LIBADD += libunwind-elfxx.la 525if !REMOTE_ONLY 526 libunwind_mips_la_LIBADD += libunwind.la -lc 527endif 528 libunwind_setjmp_la_SOURCES += mips/siglongjmp.S 529else 530if ARCH_X86 531 lib_LTLIBRARIES += libunwind-x86.la 532 libunwind_la_SOURCES = $(libunwind_la_SOURCES_x86) $(libunwind_x86_la_SOURCES_os) 533 libunwind_x86_la_SOURCES = $(libunwind_x86_la_SOURCES_x86) 534 libunwind_x86_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION) 535 libunwind_x86_la_LIBADD = libunwind-dwarf-generic.la 536 libunwind_x86_la_LIBADD += libunwind-elf32.la 537if !REMOTE_ONLY 538 libunwind_x86_la_LIBADD += libunwind.la -lc 539endif 540 libunwind_setjmp_la_SOURCES += x86/longjmp.S x86/siglongjmp.S 541else 542if ARCH_X86_64 543 lib_LTLIBRARIES += libunwind-x86_64.la 544 libunwind_la_SOURCES = $(libunwind_la_SOURCES_x86_64) 545 libunwind_x86_64_la_SOURCES = $(libunwind_x86_64_la_SOURCES_x86_64) 546 libunwind_x86_64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION) 547 libunwind_x86_64_la_LIBADD = libunwind-dwarf-generic.la 548 libunwind_x86_64_la_LIBADD += libunwind-elf64.la 549if !REMOTE_ONLY 550 libunwind_x86_64_la_LIBADD += libunwind.la -lc 551endif 552 libunwind_setjmp_la_SOURCES += x86_64/longjmp.S x86_64/siglongjmp.S 553else 554if ARCH_PPC32 555 lib_LTLIBRARIES += libunwind-ppc32.la 556 libunwind_la_SOURCES = $(libunwind_la_SOURCES_ppc32) 557 libunwind_ppc32_la_SOURCES = $(libunwind_ppc32_la_SOURCES_ppc32) 558 libunwind_ppc32_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION) 559 libunwind_ppc32_la_LIBADD = libunwind-dwarf-generic.la 560 libunwind_ppc32_la_LIBADD += libunwind-elf32.la 561if !REMOTE_ONLY 562 libunwind_ppc32_la_LIBADD += libunwind.la -lc 563endif 564 libunwind_setjmp_la_SOURCES += ppc/longjmp.S ppc/siglongjmp.S 565else 566if ARCH_PPC64 567 lib_LTLIBRARIES += libunwind-ppc64.la 568 libunwind_la_SOURCES = $(libunwind_la_SOURCES_ppc64) 569 libunwind_ppc64_la_SOURCES = $(libunwind_ppc64_la_SOURCES_ppc64) 570 libunwind_ppc64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION) 571 libunwind_ppc64_la_LIBADD = libunwind-dwarf-generic.la 572 libunwind_ppc64_la_LIBADD += libunwind-elf64.la 573if !REMOTE_ONLY 574 libunwind_ppc64_la_LIBADD += libunwind.la -lc 575endif 576 libunwind_setjmp_la_SOURCES += ppc/longjmp.S ppc/siglongjmp.S 577else 578if ARCH_SH 579 lib_LTLIBRARIES += libunwind-sh.la 580 libunwind_la_SOURCES = $(libunwind_la_SOURCES_sh) 581 libunwind_sh_la_SOURCES = $(libunwind_sh_la_SOURCES_sh) 582 libunwind_sh_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION) 583 libunwind_sh_la_LIBADD = libunwind-dwarf-generic.la 584 libunwind_sh_la_LIBADD += libunwind-elf32.la 585if !REMOTE_ONLY 586 libunwind_sh_la_LIBADD += libunwind.la -lc 587endif 588 libunwind_setjmp_la_SOURCES += sh/siglongjmp.S 589 590endif # ARCH_SH 591endif # ARCH_PPC64 592endif # ARCH_PPC32 593endif # ARCH_X86_64 594endif # ARCH_X86 595endif # ARCH_MIPS 596endif # ARCH_HPPA 597endif # ARCH_IA64 598endif # ARCH_ARM 599endif # ARCH_AARCH64 600 601# libunwind-setjmp depends on libunwind-$(arch). Therefore must be added 602# at the end. 603if BUILD_SETJMP 604lib_LTLIBRARIES += libunwind-setjmp.la 605endif 606 607# 608# Don't link with standard libraries, because those may mention 609# libunwind already. 610# 611libunwind_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -XCClinker -nostdlib \ 612 $(LDFLAGS_STATIC_LIBCXA) -version-info $(SOVERSION) 613libunwind_la_LIBADD += -lc $(LIBCRTS) 614libunwind_la_LIBADD += $(LIBLZMA) 615 616AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/tdep-$(arch) -I. 617AM_CCASFLAGS = $(AM_CPPFLAGS) 618noinst_HEADERS += unwind/unwind-internal.h 619 620EXTRA_DIST = $(libunwind_la_SOURCES_aarch64) \ 621 $(libunwind_la_SOURCES_arm) \ 622 $(libunwind_la_SOURCES_hppa) \ 623 $(libunwind_la_SOURCES_ia64) \ 624 $(libunwind_la_SOURCES_mips) \ 625 $(libunwind_la_SOURCES_sh) \ 626 $(libunwind_la_SOURCES_x86) \ 627 $(libunwind_la_SOURCES_os_freebsd) \ 628 $(libunwind_la_SOURCES_os_linux) \ 629 $(libunwind_la_SOURCES_os_hpux) \ 630 $(libunwind_la_SOURCES_os_qnx) \ 631 $(libunwind_la_SOURCES_common) \ 632 $(libunwind_la_SOURCES_local) \ 633 $(libunwind_la_SOURCES_generic) \ 634 $(libunwind_aarch64_la_SOURCES_aarch64) \ 635 $(libunwind_arm_la_SOURCES_arm) \ 636 $(libunwind_hppa_la_SOURCES_hppa) \ 637 $(libunwind_ia64_la_SOURCES_ia64) \ 638 $(libunwind_mips_la_SOURCES_mips) \ 639 $(libunwind_sh_la_SOURCES_sh) \ 640 $(libunwind_x86_la_SOURCES_x86) \ 641 $(libunwind_x86_64_la_SOURCES_x86_64) 642 643MAINTAINERCLEANFILES = Makefile.in 644 645# The -version-info flag accepts an argument of the form 646# `current[:revision[:age]]'. So, passing `-version-info 3:12:1' sets 647# current to 3, revision to 12, and age to 1. 648 649# If either revision or age are omitted, they default to 0. Also note 650# that age must be less than or equal to the current interface number. 651 652# Here are a set of rules to help you update your library version 653# information: 654 655# 1. Start with version information of `0:0:0' for each libtool 656# library. 657 658# 2. Update the version information only immediately before a public 659# release of your software. More frequent updates are unnecessary, 660# and only guarantee that the current interface number gets larger 661# faster. 662 663# 3. If the library source code has changed at all since the last 664# update, then increment revision (`c:r:a' becomes `c:r+1:a'). 665 666# 4. If any interfaces have been added, removed, or changed since the 667# last update, increment current, and set revision to 0. 668 669# 5. If any interfaces have been added since the last public release, 670# then increment age. 671 672# 6. If any interfaces have been removed since the last public 673# release, then set age to 0. 674