]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
Makefile: Introduce Make_global.am
authorPhil Sutter <phil@nwl.cc>
Mon, 18 Jun 2018 08:43:37 +0000 (10:43 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 18 Jun 2018 09:29:49 +0000 (11:29 +0200)
Analogous to libnftnl's build system, define libnftables interface
version in a variable in Make_global.am.

Suggested-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Make_global.am [new file with mode: 0644]
src/Makefile.am

diff --git a/Make_global.am b/Make_global.am
new file mode 100644 (file)
index 0000000..713d958
--- /dev/null
@@ -0,0 +1,21 @@
+# This is _NOT_ the library release version, it's an API version.
+# Extracted from Chapter 6 "Library interface versions" of the libtool docs.
+#
+# <snippet>
+# Here are a set of rules to help you update your library version information:
+#
+# 1. Start with version information of `0:0:0' for each libtool library.
+# 2. Update the version information only immediately before a public release
+# of your software. More frequent updates are unnecessary, and only guarantee
+# that the current interface number gets larger faster.
+# 3. If the library source code has changed at all since the last update,
+# then increment revision (`c:r:a' becomes `c:r+1:a').
+# 4. If any interfaces have been added, removed, or changed since the last
+# update, increment current, and set revision to 0.
+# 5. If any interfaces have been added since the last public release, then
+# increment age.
+# 6. If any interfaces have been removed since the last public release, then
+# set age to 0.
+# </snippet>
+#
+libnftables_LIBVERSION=1:0:0
index 92ac61a6044e6dbdc3552e48bcc88ff4d8236747..bd6fe07beb8a4faa8dd1799c3f50a7330c7f1e9f 100644 (file)
@@ -1,3 +1,5 @@
+include $(top_srcdir)/Make_global.am
+
 sbin_PROGRAMS = nft
 
 CLEANFILES = scanner.c parser_bison.c
@@ -70,7 +72,7 @@ libparser_la_CFLAGS = ${AM_CFLAGS} \
                      -Wno-redundant-decls
 
 libnftables_la_LIBADD = ${LIBMNL_LIBS} ${LIBNFTNL_LIBS} libparser.la
-libnftables_la_LDFLAGS = -version-info 1:0:0
+libnftables_la_LDFLAGS = -version-info ${libnftables_LIBVERSION}
 
 if BUILD_MINIGMP
 noinst_LTLIBRARIES += libminigmp.la