Makefile.in 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Makefile for uClibc (libubacktrace)
  2. #
  3. # Copyright (C) 2010 STMicroelectronics Ltd
  4. # Author: Carmelo Amoroso <carmelo.amoroso@st.com>
  5. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. #
  7. subdirs += libubacktrace
  8. CFLAGS-libubacktrace := -DNOT_IN_libc -DIS_IN_libubacktrace $(SSP_ALL_CFLAGS)
  9. LDFLAGS-libubacktrace.so := $(LDFLAGS) $(top_builddir)lib/libdl-$(VERSION).so
  10. ifeq ($(UCLIBC_HAS_BACKTRACE)$(CONFIG_ARM_EABI),yy)
  11. LIBGCC += $(shell $(CC) -print-file-name=libgcc_eh.a)
  12. endif
  13. LIBS-libubacktrace.so := $(LIBS)
  14. libubacktrace_FULL_NAME := libubacktrace-$(VERSION).so
  15. libubacktrace_DIR := $(top_srcdir)libubacktrace
  16. libubacktrace_OUT := $(top_builddir)libubacktrace
  17. libubacktrace_SRC-y :=
  18. libubacktrace_SRC-$(UCLIBC_HAS_BACKTRACE) := backtrace.c backtracesyms.c backtracesymsfd.c
  19. # -fasynchronous-unwind-tables is required for backtrace to work using dwarf2
  20. CFLAGS-backtrace.c := -fasynchronous-unwind-tables
  21. libubacktrace_SRCS := $(addprefix $(libubacktrace_DIR)/,$(libubacktrace_SRC-y))
  22. libubacktrace_OBJS := $(patsubst $(libubacktrace_DIR)/%.c,$(libubacktrace_OUT)/%.o,$(libubacktrace_SRCS))
  23. ifeq ($(DOPIC),y)
  24. libubacktrace-a-y := $(libubacktrace_OBJS:.o=.os)
  25. else
  26. libubacktrace-a-y := $(libubacktrace_OBJS)
  27. endif
  28. libubacktrace-so-y := $(libubacktrace_OBJS:.o=.os)
  29. lib-a-$(UCLIBC_HAS_BACKTRACE) += $(top_builddir)lib/libubacktrace.a
  30. lib-so-$(UCLIBC_HAS_BACKTRACE) += $(top_builddir)lib/libubacktrace.so
  31. objclean-y += CLEAN_libubacktrace
  32. ifeq ($(DOMULTI),n)
  33. ifeq ($(DOPIC),y)
  34. $(top_builddir)lib/libubacktrace.so: $(top_builddir)lib/libubacktrace.a $(libdl.depend)
  35. else
  36. $(top_builddir)lib/libubacktrace.so: $(libubacktrace_OUT)/libubacktrace_so.a $(libdl.depend)
  37. endif
  38. $(call link.so,$(libubacktrace_FULL_NAME),$(ABI_VERSION))
  39. else
  40. $(top_builddir)lib/libubacktrace.so: $(libubacktrace_OUT)/libubacktrace.oS | $(libdl.depend)
  41. $(call linkm.so,$(libubacktrace_FULL_NAME),$(ABI_VERSION))
  42. endif
  43. $(libubacktrace_OUT)/libubacktrace_so.a: $(libubacktrace-so-y)
  44. $(Q)$(RM) $@
  45. $(do_ar)
  46. $(libubacktrace_OUT)/libubacktrace.oS: $(libubacktrace_SRCS)
  47. $(Q)$(RM) $@
  48. $(compile-m)
  49. $(top_builddir)lib/libubacktrace.a: $(libubacktrace-a-y)
  50. $(Q)$(INSTALL) -d $(dir $@)
  51. $(Q)$(RM) $@
  52. $(do_ar)
  53. CLEAN_libubacktrace:
  54. $(do_rm) $(addprefix $(libubacktrace_OUT)/*., o os oS a)