Skip to content

Commit

Permalink
build: provide -version-info directly instead of -version-number
Browse files Browse the repository at this point in the history
The info components carry the real OS-independent library version
information, from which the version number is computed differently
on different systems. According to the libtool manual "new projects
should use the -version-info flag instead".

Signed-off-by: Ferenc Wágner <wferi@debian.org>
  • Loading branch information
wferi authored and fabbione committed Feb 20, 2018
1 parent e9b0ec6 commit 1ee2079
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion libknet/Makefile.am
Expand Up @@ -17,6 +17,7 @@ EXTRA_DIST = $(SYMFILE)

SUBDIRS = . tests

# https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
libversion = 1:0:0

# override global LIBS that pulls in lots of craft we don't need here
Expand Down Expand Up @@ -86,7 +87,7 @@ EXTRA_libknet_la_DEPENDENCIES = $(SYMFILE)
libknet_la_LDFLAGS = $(AM_LDFLAGS) \
-Wl,--version-script=$(srcdir)/$(SYMFILE) \
-Wl,-rpath=$(pkglibdir) \
-version-number $(libversion)
-version-info $(libversion)

libknet_la_LIBADD = $(PTHREAD_LIBS) $(dl_LIBS) $(rt_LIBS) $(m_LIBS)

Expand Down
2 changes: 1 addition & 1 deletion libtap/Makefile.am
Expand Up @@ -38,7 +38,7 @@ EXTRA_libtap_la_DEPENDENCIES = $(SYMFILE)

libtap_la_LDFLAGS = $(AM_LDFLAGS) \
-Wl,-version-script,$(srcdir)/$(SYMFILE) \
-version-number $(libversion)
-version-info $(libversion)

TESTS = $(check_PROGRAMS)

Expand Down

0 comments on commit 1ee2079

Please sign in to comment.