Fix and document compile options on Darwin.
authorAndre Noll <maan@systemlinux.org>
Wed, 4 Jun 2008 14:12:14 +0000 (16:12 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 4 Jun 2008 14:12:14 +0000 (16:12 +0200)
Makefile

index 3bcbfbe7a59645fe197e1414a3d1608463741c6e..8da3d1d4a7d36b8009fbb092b512bd80cc227704 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -15,9 +15,18 @@ ifeq ($(uname_s),Linux)
        LDFLAGS += -Wl,-z,defs
 endif
 ifeq ($(uname_s),Darwin)
        LDFLAGS += -Wl,-z,defs
 endif
 ifeq ($(uname_s),Darwin)
-       dso_opts := -dynamiclib -current_version $(major_version).$(minor_version) \
-               -compatibility_version $(major_version).$(minor_version) -fvisibility=hidden
-       dso_filename := lib$(libname).$(major_version)
+       # Darwin has its own idea on version numbers:
+       #
+       # The minor version number is an incremental number using the format
+       # X[.Y[.Z]]. To set the minor version number of a dynamic library, use
+       # the gcc -current_version option.
+       #
+       # The compatibility version number of a library release specifies the
+       # earliest minor version of the clients linked against that release can
+       # use.
+       dso_opts := -dynamiclib -current_version $(minor_version).$(patchlevel_version) \
+               -compatibility_version $(minor_version).0 -fvisibility=hidden
+       dso_filename := lib$(libname).$(major_version).dylib
 endif
 ifeq ($(uname_s),SunOS)
        dso_opts := --shared -z text -z defs
 endif
 ifeq ($(uname_s),SunOS)
        dso_opts := --shared -z text -z defs