Make it easier to link against libunicorn on macOS (#1195)
Adding @rpath to the install name to make it possible to link against the library without modifying it with install_name_tool. Copying both the versioned and unversioned dylibs simplifies linking.
This commit is contained in:
2
Makefile
2
Makefile
@@ -112,7 +112,7 @@ API_MAJOR=$(shell echo `grep -e UC_API_MAJOR include/unicorn/unicorn.h | grep -v
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
EXT = dylib
|
||||
VERSION_EXT = $(API_MAJOR).$(EXT)
|
||||
$(LIBNAME)_LDFLAGS += -dynamiclib -install_name lib$(LIBNAME).$(VERSION_EXT) -current_version $(PKG_MAJOR).$(PKG_MINOR).$(PKG_EXTRA) -compatibility_version $(PKG_MAJOR).$(PKG_MINOR)
|
||||
$(LIBNAME)_LDFLAGS += -dynamiclib -install_name @rpath/lib$(LIBNAME).$(VERSION_EXT) -current_version $(PKG_MAJOR).$(PKG_MINOR).$(PKG_EXTRA) -compatibility_version $(PKG_MAJOR).$(PKG_MINOR)
|
||||
AR_EXT = a
|
||||
UNICORN_CFLAGS += -fvisibility=hidden
|
||||
|
||||
|
||||
Reference in New Issue
Block a user