From 1c1f6337dffffe8f7aea98f710f681727ed45f4f Mon Sep 17 00:00:00 2001 From: Luc Verhaegen Date: Sun, 20 Oct 2013 21:01:12 +0200 Subject: [PATCH] add proper versioning We prefer version 3, as r2pX is pretty rare by now, but if needs be, this can be easily changed. Signed-off-by: Luc Verhaegen --- configure.ac | 4 ++++ src/Makefile.am | 1 + src/{ump.h => ump.h.in} | 1 + 3 files changed, 6 insertions(+) rename src/{ump.h => ump.h.in} (99%) diff --git a/configure.ac b/configure.ac index 3615503..2c5a2c3 100644 --- a/configure.ac +++ b/configure.ac @@ -8,6 +8,9 @@ AM_MAINTAINER_MODE LT_INIT +LIBUMP_VERSION_MAJOR=3 +AC_SUBST([LIBUMP_VERSION_MAJOR]) + # Support silent build rules, requires at least automake-1.11. Disable # by either passing --disable-silent-rules to configure or passing V=1 # to make @@ -37,6 +40,7 @@ AC_CHECK_LIB([pthread],[pthread_mutex_lock],[],[]) AC_CONFIG_FILES([ Makefile src/Makefile + src/ump.h ]) AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am index 7d5a8d5..b451044 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,5 @@ lib_LTLIBRARIES = libUMP.la +libUMP_la_LDFLAGS = -version-info @LIBUMP_VERSION_MAJOR@ libUMP_la_LIBADD = @LIBS@ libUMP_la_SOURCES = \ ump_arch.c \ diff --git a/src/ump.h b/src/ump.h.in similarity index 99% rename from src/ump.h rename to src/ump.h.in index a7b4f19..327f953 100644 --- a/src/ump.h +++ b/src/ump.h.in @@ -23,6 +23,7 @@ #ifndef _UNIFIED_MEMORY_PROVIDER_H_ #define _UNIFIED_MEMORY_PROVIDER_H_ +#define UNIFIED_MEMORY_PROVIDER_VERSION @LIBUMP_VERSION_MAJOR@ /** @defgroup ump_user_space_api UMP User Space API * @{ */