]> git.notmuchmail.org Git - notmuch/commitdiff
Makefile: Add library version information on OS X.
authorCarl Worth <cworth@cworth.org>
Wed, 14 Apr 2010 23:18:19 +0000 (16:18 -0700)
committerCarl Worth <cworth@cworth.org>
Wed, 14 Apr 2010 23:18:19 +0000 (16:18 -0700)
This encodes the library version into the library, where the linking
binary can pick it up, and the linker can even enforce mismatches in
the minor release, (such as linking a binary against version 1.2 and
then attempting to run it against version 1.1).

lib/Makefile.local

index 1eb1f4ea3b59ed8c21e56228cfb95f9195b42838..a0920905cb3bd197020a2e0cb63c9f90d11db905 100644 (file)
@@ -28,7 +28,7 @@ LIBRARY_SUFFIX = dylib
 LINKER_NAME = libnotmuch.$(LIBRARY_SUFFIX)
 SONAME = libnotmuch.$(LIBNOTMUCH_VERSION_MAJOR).$(LIBRARY_SUFFIX)
 LIBNAME = libnotmuch.$(LIBNOTMUCH_VERSION_MAJOR).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE).$(LIBRARY_SUFFIX)
-LIBRARY_LINK_FLAG = -dynamiclib -install_name $(SONAME)
+LIBRARY_LINK_FLAG = -dynamiclib -install_name $(SONAME) -compatibility_version $(LIBNOTMUCH_VERSION_MAJOR).$(LIBNOTMUCH_VERSION_MINOR) -current_version $(LIBNOTMUCH_VERSION_MAJOR).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE)
 else
 LIBRARY_SUFFIX = so
 LINKER_NAME = libnotmuch.$(LIBRARY_SUFFIX)