X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=Makefile;h=8da3d1d4a7d36b8009fbb092b512bd80cc227704;hb=9808741df6584c63f6b59db33e247bc9d1a89a23;hp=6350b8eccba228c2185f267c5b1158df6b6bc9ea;hpb=903c582ebba832333f869a2803fe84e23edc0980;p=osl.git diff --git a/Makefile b/Makefile index 6350b8e..8da3d1d 100644 --- a/Makefile +++ b/Makefile @@ -11,12 +11,22 @@ libname := osl ifeq ($(uname_s),Linux) dso_opts := --shared -Wl,-soname,libosl.so.$(major_version) dso_filename :=lib$(libname).so.$(major_version).$(minor_version).$(patchlevel_version) + # disallow undefined symbols + LDFLAGS += -Wl,-z,defs endif ifeq ($(uname_s),Darwin) - mac_major_version := $(shell expr 41 + $(major_version)) - dso_opts := -dynamiclib -current_version $(major_version).$(minor_version) \ - -compatibility_version $(major_version).$(minor_version) -fvisibility=hidden - dso_filename := lib$(libname).$(shell printf "\\x"$(mac_major_version).dylib) + # 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 @@ -33,9 +43,6 @@ ifeq ($(uname_s),NetBSD) endif all: $(dso_filename) -# disallow undefined symbols -LDFLAGS += -Wl,-z,defs - DEBUG_CPPFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W DEBUG_CPPFLAGS += -Wredundant-decls CPPFLAGS += -Os