]> git.sesse.net Git - movit/commitdiff
Start doing symbol versioning.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 16 Mar 2014 19:11:38 +0000 (20:11 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 16 Mar 2014 19:11:38 +0000 (20:11 +0100)
As we prepare for 1.0, we want to make sure we have a proper soname.
See the comment for slightly more details.

Makefile.in

index e401340babe2c14df39966c00e1dc67de93fa8b2..7181a1d4699c10495da0271948ae87b076fea11f 100644 (file)
@@ -1,5 +1,13 @@
 GTEST_DIR ?= /usr/src/gtest
 
+# This will be upgraded for each release, although not necessarily for every git commit.
+# See http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
+# for the rules as of how this is changed. This does not really mean that Movit will
+# strive towards having a rock-stable ABI, but at least the soversion will increase
+# whenever it breaks, so that you will not have silent failures, and distribution package
+# management can run its course.
+movit_ltversion = 1:0:0
+
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 includedir = @includedir@
@@ -101,7 +109,7 @@ demo: libmovit.la $(DEMO_OBJS)
 
 # The library itself.
 libmovit.la: $(LIB_OBJS:.o=.lo)
-       $(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -rpath $(libdir) -o $@ $^ $(LDLIBS)
+       $(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -rpath $(libdir) -version-info $(movit_ltversion) -o $@ $^ $(LDLIBS)
 
 %.lo: %.cpp
        $(LIBTOOL) --mode=compile $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<