summaryrefslogtreecommitdiffstats
path: root/libasm/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'libasm/Makefile.am')
-rw-r--r--libasm/Makefile.am18
1 files changed, 10 insertions, 8 deletions
diff --git a/libasm/Makefile.am b/libasm/Makefile.am
index d486db9b..9bb56ee5 100644
--- a/libasm/Makefile.am
+++ b/libasm/Makefile.am
@@ -54,13 +54,14 @@ libasm_a_SOURCES = asm_begin.c asm_abort.c asm_end.c asm_error.c \
libasm_pic_a_SOURCES =
am_libasm_pic_a_OBJECTS = $(libasm_a_SOURCES:.c=.os)
-libasm_so_LDLIBS = $(intl_LDADD)
+libasm_so_DEPS = ../lib/libeu.a ../libebl/libebl.a ../libelf/$(libelf_BARE) ../libdw/$(libdw_BARE)
+if USE_GNULIB
+libasm_so_DEPS += ../libgnu/libgnu.a
+endif
+libasm_so_LDLIBS = $(libasm_so_DEPS) $(intl_LDADD)
if USE_LOCKS
libasm_so_LDLIBS += -lpthread
endif
-if USE_GNULIB
-libasm_so_LDLIBS += ../libgnu/libgnu.a
-endif
if NATIVE_PE
GEN_DEF = -Wl,--output-def=$(libasm_BARE:.dll=.def)
CLEANFILES += $(libasm_BARE:.dll=.def)
@@ -68,11 +69,12 @@ else
GEN_DEF =
endif
-$(libasm_BARE): libasm_pic.a libasm.map
- $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
- -Wl,--version-script,$(srcdir)/libasm.map,--no-undefined \
+libasm_so_LIBS = libasm_pic.a
+$(libasm_BARE): $(srcdir)/libasm.map $(libasm_so_LIBS) $(libasm_so_DEPS)
+ $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
-Wl,--soname,$(libasm_SONAME) $(GEN_DEF) \
- ../libebl/libebl.a ../libelf/$(libelf_BARE) ../libdw/$(libdw_BARE) \
+ -Wl,--version-script,$<,--no-undefined \
+ -Wl,--whole-archive $(libasm_so_LIBS) -Wl,--no-whole-archive \
$(libasm_so_LDLIBS)
@$(textrel_check)
$(AM_V_at)ln -fs $@ $(libasm_SONAME)