summaryrefslogtreecommitdiff
path: root/libubacktrace/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'libubacktrace/Makefile.in')
-rw-r--r--libubacktrace/Makefile.in23
1 files changed, 14 insertions, 9 deletions
diff --git a/libubacktrace/Makefile.in b/libubacktrace/Makefile.in
index 8a4b08123..612bf2dc5 100644
--- a/libubacktrace/Makefile.in
+++ b/libubacktrace/Makefile.in
@@ -25,11 +25,13 @@ libubacktrace_ARCH_OUT:=$(libubacktrace_OUT)/$(TARGET_ARCH)
-include $(libubacktrace_ARCH_DIR)/Makefile.arch
libubacktrace_SRC-y :=
-libubacktrace_SRC-$(UCLIBC_HAS_BACKTRACE) := backtrace.c backtracesyms.c backtracesymsfd.c
+libubacktrace_SRC-$(UCLIBC_HAS_BACKTRACE) := backtracesyms.c backtracesymsfd.c
+libubacktrace_SRC_SHARED-$(UCLIBC_HAS_BACKTRACE) := backtrace.c
# remove generic sources, if arch specific version is present
ifneq ($(strip $(libubacktrace_ARCH_SRC-y)),)
libubacktrace_SRC-y := $(filter-out $(notdir $(libubacktrace_ARCH_SRC-y)),$(libubacktrace_SRC-y))
+libubacktrace_SRC_SHARED-y := $(filter-out $(notdir $(libubacktrace_ARCH_SRC-y)),$(libubacktrace_SRC_SHARED-y))
endif
# -fasynchronous-unwind-tables is required for backtrace to work using dwarf2
@@ -43,12 +45,19 @@ endif
libubacktrace_SRCS := $(patsubst %.c,$(libubacktrace_DIR)/%.c,$(libubacktrace_SRC-y))
libubacktrace_OBJS := $(patsubst $(libubacktrace_DIR)/%.c,$(libubacktrace_OUT)/%.o,$(libubacktrace_SRCS))
+libubacktrace_SHARED_SRCS := $(patsubst %.c,$(libubacktrace_DIR)/%.c,$(libubacktrace_SHARED_SRC-y))
+libubacktrace_SHARED_OBJS := $(patsubst $(libubacktrace_DIR)/%.c,$(libubacktrace_OUT)/%.s,$(libubacktrace_SHARED_SRCS))
+
+libubacktrace-shared-y := $(libubacktrace_SHARED_OBJS:.os=.oS)
+libubacktrace-static-y := $(libubacktrace_SHARED_OBJS)
+
ifeq ($(DOPIC),y)
-libubacktrace-a-y += $(libubacktrace_OBJS:.o=.os)
+libubacktrace-a-y += $(libubacktrace_OBJS:.o=.os) $(libubacktrace-static-y:.o=.os)
else
-libubacktrace-a-y += $(libubacktrace_OBJS)
+libubacktrace-a-y += $(libubacktrace_OBJS) $(libubacktrace-static-y)
endif
-libubacktrace-so-y += $(libubacktrace_OBJS:.o=.os)
+libubacktrace-so-y += $(libubacktrace_OBJS:.o=.os) $(libubacktrace-shared-y)
+
lib-a-$(UCLIBC_HAS_BACKTRACE) += $(top_builddir)lib/libubacktrace.a
lib-so-$(UCLIBC_HAS_BACKTRACE) += $(top_builddir)lib/libubacktrace.so
@@ -56,11 +65,7 @@ lib-so-$(UCLIBC_HAS_BACKTRACE) += $(top_builddir)lib/libubacktrace.so
objclean-y += CLEAN_libubacktrace
ifeq ($(DOMULTI),n)
-ifeq ($(DOPIC),y)
-$(top_builddir)lib/libubacktrace.so: $(top_builddir)lib/libubacktrace.a $(libdl.depend)
-else
$(top_builddir)lib/libubacktrace.so: $(libubacktrace_OUT)/libubacktrace_so.a $(libdl.depend)
-endif
$(call link.so,$(libubacktrace_FULL_NAME),$(ABI_VERSION))
else
$(top_builddir)lib/libubacktrace.so: $(libubacktrace_OUT)/libubacktrace.oS | $(libdl.depend)
@@ -71,7 +76,7 @@ $(libubacktrace_OUT)/libubacktrace_so.a: $(libubacktrace-so-y)
$(Q)$(RM) $@
$(do_ar)
-$(libubacktrace_OUT)/libubacktrace.oS: $(libubacktrace_SRCS) $(libubacktrace_ARCH_SRCS)
+$(libubacktrace_OUT)/libubacktrace.oS: $(libubacktrace_SRCS) $(libubacktrace_ARCH_SRCS) $(libubacktrace_SHARED_SRCS)
$(Q)$(RM) $@
$(compile-m)