aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-02-19 11:23:10 +0100
committerMattias Andrée <maandree@kth.se>2022-02-19 11:23:10 +0100
commit58101c1296e13cfd02bb08549d6d09e3e474a1d3 (patch)
tree2929c7d9bd56af18957eece8ea7f276a54cfcf2d
parentMerge pull request #16 from carlocab/macos-install-names (diff)
downloadlibkeccak-58101c1296e13cfd02bb08549d6d09e3e474a1d3.tar.gz
libkeccak-58101c1296e13cfd02bb08549d6d09e3e474a1d3.tar.bz2
libkeccak-58101c1296e13cfd02bb08549d6d09e3e474a1d3.tar.xz
Remove use of ifeq in Makefile and move use of install_name_tool from install-time to build-time
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--Makefile4
-rw-r--r--linux.mk2
-rw-r--r--macos.mk2
3 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index c52fe9e..4f26280 100644
--- a/Makefile
+++ b/Makefile
@@ -139,6 +139,7 @@ $(OBJ): $(HDR)
libkeccak.$(LIBEXT): $(OBJ)
$(CC) $(LIBFLAGS) -o $@ $(OBJ) $(LDFLAGS)
+ $(FIX_INSTALL_NAME)
libkeccak.a: $(OBJ)
-rm -f -- $@
@@ -175,9 +176,6 @@ run-benchmark: benchmark benchfile
for i in $$(seq 7) ; do ./benchmark ; done | median
install: libkeccak.$(LIBEXT) libkeccak.a
-ifeq ($(shell uname),Darwin)
- install_name_tool -id "$(PREFIX)/lib/libkeccak.$(LIBMAJOREXT)" libkeccak.$(LIBEXT)
-endif
mkdir -p -- "$(DESTDIR)$(PREFIX)/lib"
cp -- libkeccak.$(LIBEXT) "$(DESTDIR)$(PREFIX)/lib/libkeccak.$(LIBMINOREXT)"
ln -sf -- libkeccak.$(LIBMINOREXT) "$(DESTDIR)$(PREFIX)/lib/libkeccak.$(LIBMAJOREXT)"
diff --git a/linux.mk b/linux.mk
index c9f74a0..d617684 100644
--- a/linux.mk
+++ b/linux.mk
@@ -3,3 +3,5 @@ LIBFLAGS = -shared -Wl,-soname,libkeccak.$(LIBEXT).$(LIB_MAJOR)
LIBMAJOREXT = $(LIBEXT).$(LIB_MAJOR)
LIBMINOREXT = $(LIBEXT).$(LIB_VERSION)
+
+FIX_INSTALL_NAME = :
diff --git a/macos.mk b/macos.mk
index c7e7c28..25c308b 100644
--- a/macos.mk
+++ b/macos.mk
@@ -3,3 +3,5 @@ LIBFLAGS = -dynamiclib -Wl,-compatibility_version,$(LIB_MAJOR) -Wl,-current_vers
LIBMAJOREXT = $(LIB_MAJOR).$(LIBEXT)
LIBMINOREXT = $(LIB_VERSION).$(LIBEXT)
+
+FIX_INSTALL_NAME = install_name_tool -id "$(PREFIX)/lib/libkeccak.$(LIBMAJOREXT)" "libkeccak.$(LIBEXT)"