Add necessary linker options when building dylib.

Sets linker options -compatibility_version and -install_name when making
dylib.
This commit is contained in:
Arttu Ylä-Outinen 2015-07-20 14:40:58 +03:00
parent 9c414995c5
commit df749e032e

View file

@ -231,7 +231,10 @@ $(PROG): $(RELEASE_OBJS)
$(LIB): LDFLAGS += -shared -Wl,-soname,$(SO).$(VER_MAJOR)
$(DLL): LDFLAGS += -shared -Wl,--out-implib,$(IMPLIB) -o $@
$(DYLIB): LDFLAGS += -dynamiclib -current_version $(VER_MAJOR).$(VER_MINOR).$(VER_RELEASE)
$(DYLIB): LDFLAGS += -dynamiclib \
-current_version $(VER_MAJOR).$(VER_MINOR).$(VER_RELEASE) \
-compatibility_version $(VER_MAJOR) \
-install_name $(LIBDIR)/$@
$(LIB) $(DLL) $(DYLIB): $(OBJS)
$(LD) $^ $(LDFLAGS) -o $@