Makefile: correctly handle version suffixes on macOS
On macOS, the version suffix of a shared library comes before the `.dylib` suffix, which is different from the convention on other systems. Currently, the Makefile only overrides `DYLIB_MINOR_NAME` for macOS, but does not handle the other similar variables, namely `DYLIB_MAJOR_NAME`, `SSL_DYLIB_MINOR_NAME`, and `SSL_DYLIB_MAJOR_NAME`. This commit fixes the issue by overriding all these variables for macOS. Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
This commit is contained in:
parent
ab8c75ebcb
commit
77bcc73ebb
3
Makefile
3
Makefile
@ -141,7 +141,10 @@ endif
|
||||
ifeq ($(uname_S),Darwin)
|
||||
DYLIBSUFFIX=dylib
|
||||
DYLIB_MINOR_NAME=$(LIBNAME).$(HIREDIS_SONAME).$(DYLIBSUFFIX)
|
||||
DYLIB_MAJOR_NAME=$(LIBNAME).$(HIREDIS_MAJOR).$(DYLIBSUFFIX)
|
||||
DYLIB_MAKE_CMD=$(CC) -dynamiclib -Wl,-install_name,$(PREFIX)/$(LIBRARY_PATH)/$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(LDFLAGS)
|
||||
SSL_DYLIB_MINOR_NAME=$(SSL_LIBNAME).$(HIREDIS_SONAME).$(DYLIBSUFFIX)
|
||||
SSL_DYLIB_MAJOR_NAME=$(SSL_LIBNAME).$(HIREDIS_MAJOR).$(DYLIBSUFFIX)
|
||||
SSL_DYLIB_MAKE_CMD=$(CC) -dynamiclib -Wl,-install_name,$(PREFIX)/$(LIBRARY_PATH)/$(SSL_DYLIB_MINOR_NAME) -o $(SSL_DYLIBNAME) $(LDFLAGS) $(SSL_LDFLAGS)
|
||||
DYLIB_PLUGIN=-Wl,-undefined -Wl,dynamic_lookup
|
||||
endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user