summaryrefslogtreecommitdiffstats
path: root/libelf
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2017-03-01 16:57:34 +0100
committerUlf Hermann <[email protected]>2017-04-28 13:32:51 +0000
commit2136e330bef96512d45b8a85b245b9ea95cf5106 (patch)
tree1067994fd72604ba14698ab1238dcff516a7e920 /libelf
parent1acc27c76f9721d9647d4bbeaac98eb6dd7b2f05 (diff)
Generalize library names
On windows library names end with ".dll" and the prefix "lib" us usually omitted. Take this into account and also drop the $(EXEEXT) workaround. We don't need to use noinst_PROGRAMS as there is also noinst_DATA. Change-Id: I7e4ba2432811d5ad85051ea0c9d5674eabf79b3c Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'libelf')
-rw-r--r--libelf/ChangeLog5
-rw-r--r--libelf/Makefile.am26
2 files changed, 17 insertions, 14 deletions
diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index fd58ed31..0a5200f4 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,8 @@
+2017-02-28 Ulf Hermann <[email protected]>
+
+ * Makefile.am: Use the predefined common library names rather than
+ hardcoding to libelf.so and friends.
+
2017-04-27 Ulf Hermann <[email protected]>
* libelfP.h: Use attribute_hidden.
diff --git a/libelf/Makefile.am b/libelf/Makefile.am
index 64687b72..cc31898c 100644
--- a/libelf/Makefile.am
+++ b/libelf/Makefile.am
@@ -32,11 +32,10 @@ if BUILD_STATIC
AM_CFLAGS += $(fpic_CFLAGS)
endif
GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
-VERSION = 1
lib_LIBRARIES = libelf.a
noinst_LIBRARIES = libelf_pic.a
-noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
+noinst_DATA = $(libelf_BARE)
include_HEADERS = libelf.h gelf.h nlist.h
pkginclude_HEADERS = elf-knowledge.h
@@ -103,28 +102,27 @@ if USE_GNULIB
libelf_so_LDLIBS += ../libgnu/libgnu.a
endif
-libelf_so_SOURCES =
-libelf.so$(EXEEXT): libelf_pic.a libelf.map
+$(libelf_BARE): libelf_pic.a libelf.map
$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
-Wl,--version-script,$(srcdir)/libelf.map,--no-undefined \
- -Wl,--soname,$@.$(VERSION) $(libelf_so_LDLIBS)
+ -Wl,--soname,$(libelf_SONAME) $(libelf_so_LDLIBS)
@$(textrel_check)
- $(AM_V_at)ln -fs $@ $@.$(VERSION)
+ $(AM_V_at)ln -fs $@ $(libelf_SONAME)
-install: install-am libelf.so
+install: install-am $(libelf_BARE)
$(mkinstalldirs) $(DESTDIR)$(libdir)
- $(INSTALL_PROGRAM) libelf.so $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so
- ln -fs libelf-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libelf.so.$(VERSION)
- ln -fs libelf.so.$(VERSION) $(DESTDIR)$(libdir)/libelf.so
+ $(INSTALL_PROGRAM) $(libelf_BARE) $(DESTDIR)$(libdir)/$(libelf_VERSIONED)
+ ln -fs $(libelf_VERSIONED) $(DESTDIR)$(libdir)/$(libelf_SONAME)
+ ln -fs $(libelf_SONAME) $(DESTDIR)$(libdir)/$(libelf_BARE)
uninstall: uninstall-am
- rm -f $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so
- rm -f $(DESTDIR)$(libdir)/libelf.so.$(VERSION)
- rm -f $(DESTDIR)$(libdir)/libelf.so
+ rm -f $(DESTDIR)$(libdir)/$(libelf_VERSIONED)
+ rm -f $(DESTDIR)$(libdir)/$(libelf_SONAME)
+ rm -f $(DESTDIR)$(libdir)/$(libelf_BARE)
noinst_HEADERS = elf.h abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \
version_xlate.h gnuhash_xlate.h note_xlate.h dl-hash.h \
chdr_xlate.h
EXTRA_DIST = libelf.map
-CLEANFILES += $(am_libelf_pic_a_OBJECTS) libelf.so.$(VERSION)
+CLEANFILES += $(am_libelf_pic_a_OBJECTS) $(libelf_SONAME) $(libelf_BARE)