aboutsummaryrefslogtreecommitdiffstats
path: root/macos.mk
diff options
context:
space:
mode:
authorCarlo Cabrera <30379873+carlocab@users.noreply.github.com>2022-02-19 22:03:16 +0800
committerCarlo Cabrera <30379873+carlocab@users.noreply.github.com>2022-02-19 22:03:16 +0800
commiteacf1747c63848b8492f3201cc071095910c7289 (patch)
tree43d02a9fd1e21633b2484fd128a1e9c195be42f3 /macos.mk
parentUpdate readme (diff)
downloadlibkeccak-eacf1747c63848b8492f3201cc071095910c7289.tar.gz
libkeccak-eacf1747c63848b8492f3201cc071095910c7289.tar.bz2
libkeccak-eacf1747c63848b8492f3201cc071095910c7289.tar.xz
Set install name in `LIBFLAGS`
My previous PR (#16) deliberately set the install name at install time instead of at build time, since this is the correct time to determine the library's install name. However, if you prefer to do this during build time instead, then there is no need to call `install_name_tool`. We can pass the appropriate flags to the linker instead.
Diffstat (limited to '')
-rw-r--r--macos.mk5
1 files changed, 2 insertions, 3 deletions
diff --git a/macos.mk b/macos.mk
index 25c308b..58afc20 100644
--- a/macos.mk
+++ b/macos.mk
@@ -1,7 +1,6 @@
LIBEXT = dylib
-LIBFLAGS = -dynamiclib -Wl,-compatibility_version,$(LIB_MAJOR) -Wl,-current_version,$(LIB_VERSION)
+LIBFLAGS = -dynamiclib -Wl,-install_name,"$(PREFIX)/lib/libkeccak.$(LIBMAJOREXT)" \
+ -Wl,-compatibility_version,$(LIB_MAJOR) -Wl,-current_version,$(LIB_VERSION)
LIBMAJOREXT = $(LIB_MAJOR).$(LIBEXT)
LIBMINOREXT = $(LIB_VERSION).$(LIBEXT)
-
-FIX_INSTALL_NAME = install_name_tool -id "$(PREFIX)/lib/libkeccak.$(LIBMAJOREXT)" "libkeccak.$(LIBEXT)"