diff options
| author | Ulf Hermann <[email protected]> | 2017-03-01 16:57:34 +0100 |
|---|---|---|
| committer | Ulf Hermann <[email protected]> | 2017-04-28 13:32:51 +0000 |
| commit | 2136e330bef96512d45b8a85b245b9ea95cf5106 (patch) | |
| tree | 1067994fd72604ba14698ab1238dcff516a7e920 /backends | |
| parent | 1acc27c76f9721d9647d4bbeaac98eb6dd7b2f05 (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 'backends')
| -rw-r--r-- | backends/ChangeLog | 5 | ||||
| -rw-r--r-- | backends/Makefile.am | 33 |
2 files changed, 22 insertions, 16 deletions
diff --git a/backends/ChangeLog b/backends/ChangeLog index baeb7b92..e2f05295 100644 --- a/backends/ChangeLog +++ b/backends/ChangeLog @@ -1,3 +1,8 @@ +2017-04-28 Ulf Hermann <[email protected]> + + * Makefile.am: Have the backend file names follow the platform's + convention for naming shared libraries. + 2017-04-27 Ulf Hermann <[email protected]> * Makefile.am: Use dso_LDFLAGS. diff --git a/backends/Makefile.am b/backends/Makefile.am index 6dc20222..55ff871f 100644 --- a/backends/Makefile.am +++ b/backends/Makefile.am @@ -40,11 +40,12 @@ libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \ libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \ libebl_m68k_pic.a libebl_bpf_pic.a noinst_LIBRARIES = $(libebl_pic) -noinst_DATA = $(libebl_pic:_pic.a=.so) +libebl_pic_prefixed = $(libebl_pic:lib%=$(LIBPREFIX)%) +noinst_DATA = $(libebl_pic_prefixed:_pic.a=$(LIBEXT)) -libelf = ../libelf/libelf.so -libdw = ../libdw/libdw.so +libelf = ../libelf/$(libelf_BARE) +libdw = ../libdw/$(libdw_BARE) if USE_GNULIB libgnu = ../libgnu/libgnu.a else @@ -134,32 +135,32 @@ libebl_bpf_pic_a_SOURCES = $(bpf_SRCS) am_libebl_bpf_pic_a_OBJECTS = $(bpf_SRCS:.c=.os) -libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libgnu) - @rm -f $(@:.so=.map) +$(LIBPREFIX)ebl_%$(LIBEXT) $(LIBPREFIX)ebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libgnu) + @rm -f $(@:$(LIBEXT)=.map) $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ - > $(@:.so=.map) - $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $(@:.map=.so) \ + > $(@:$(LIBEXT)=.map) + $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $(@:.map=$(LIBEXT)) \ -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ - -Wl,--version-script,$(@:.so=.map) \ + -Wl,--version-script,$(@:$(LIBEXT)=.map) \ -Wl,--as-needed $(libelf) $(libdw) $(libgnu) $(intl_LDADD) @$(textrel_check) -libebl_i386.so: $(cpu_i386) -libebl_x86_64.so: $(cpu_x86_64) -libebl_bpf.so: $(cpu_bpf) +$(LIBPREFIX)ebl_i386$(LIBEXT): $(cpu_i386) +$(LIBPREFIX)ebl_x86_64$(LIBEXT): $(cpu_x86_64) +$(LIBPREFIX)ebl_bpf$(LIBEXT): $(cpu_bpf) install: install-am install-ebl-modules install-ebl-modules: $(mkinstalldirs) $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR) for m in $(modules); do \ - $(INSTALL_PROGRAM) libebl_$${m}.so $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)/libebl_$${m}-$(PACKAGE_VERSION).so; \ - ln -fs libebl_$${m}-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)/libebl_$${m}.so; \ + $(INSTALL_PROGRAM) $(LIBPREFIX)ebl_$${m}$(LIBEXT) $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)/$(LIBPREFIX)ebl_$${m}-$(PACKAGE_VERSION)$(LIBEXT); \ + ln -fs $(LIBPREFIX)ebl_$${m}-$(PACKAGE_VERSION)$(LIBEXT) $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)/$(LIBPREFIX)ebl_$${m}$(LIBEXT); \ done uninstall: uninstall-am for m in $(modules); do \ - rm -f $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)/libebl_$${m}-$(PACKAGE_VERSION).so; \ - rm -f $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)/libebl_$${m}.so; \ + rm -f $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)/$(LIBPREFIX)ebl_$${m}-$(PACKAGE_VERSION)$(LIBEXT); \ + rm -f $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR)/$(LIBPREFIX)ebl_$${m}$(LIBEXT); \ done rmdir --ignore-fail-on-non-empty $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR) @@ -167,5 +168,5 @@ noinst_HEADERS = libebl_CPU.h common-reloc.c linux-core-note.c x86_corenote.c EXTRA_DIST = $(foreach m,$(modules),$($(m)_SRCS)) $(modules:=_reloc.def) CLEANFILES += $(foreach m,$(modules),\ - libebl_$(m).map libebl_$(m).so \ + $(LIBPREFIX)ebl_$(m).map $(LIBPREFIX)ebl_$(m)$(LIBEXT) \ $(am_libebl_$(m)_pic_a_OBJECTS)) |
