summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richardipsum@fastmail.co.uk>2017-06-06 21:46:24 +0100
committerRichard Ipsum <richardipsum@fastmail.co.uk>2017-06-17 14:10:33 +0100
commite2d013d927f4ae76b62d66ae095b48c62f877ac6 (patch)
treebcb961475ac0c2acbaa5781d6eb52576a9f89523
parent6735c1337e39e6f6ed44a0b57f321352a185b0b2 (diff)
downloadlua-scrypt-git-e2d013d927f4ae76b62d66ae095b48c62f877ac6.tar.gz
Allow lib installation dir to be overridden
-rw-r--r--Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index e5f661b..543cda3 100644
--- a/Makefile
+++ b/Makefile
@@ -26,9 +26,10 @@ install: lua-5.1-try-install lua-5.2-try-install
lua-5.1: scrypt-5.1.so
ln -s -f scrypt-5.1.so scrypt.so
+lua-5.1-install: INST_LIBDIR ?= $(DESTDIR)$(LUA51_CMOD_INST)
lua-5.1-install: lua-5.1
- $(INSTALL) -d $(DESTDIR)$(LUA51_CMOD_INST)
- $(INSTALL) -m 755 scrypt-5.1.so $(DESTDIR)$(LUA51_CMOD_INST)/scrypt.so
+ $(INSTALL) -d $(INST_LIBDIR)
+ $(INSTALL) -m 755 scrypt-5.1.so $(INST_LIBDIR)/scrypt.so
scrypt-5.1.so: luascrypt.c base64.c
$(CC) $(CFLAGS) $(LUA51_INC) -shared -o $@ $^ $(LUA51_LIB) $(SCRYPT_LIBS)
@@ -36,9 +37,10 @@ scrypt-5.1.so: luascrypt.c base64.c
lua-5.2: scrypt-5.2.so
ln -s -f scrypt-5.2.so scrypt.so
+lua-5.2-install: INST_LIBDIR ?= $(DESTDIR)$(LUA52_CMOD_INST)
lua-5.2-install: lua-5.2
- $(INSTALL) -d $(DESTDIR)$(LUA52_CMOD_INST)
- $(INSTALL) -m 755 scrypt-5.2.so $(DESTDIR)$(LUA52_CMOD_INST)/scrypt.so
+ $(INSTALL) -d $(INST_LIBDIR)
+ $(INSTALL) -m 755 scrypt-5.2.so $(INST_LIBDIR)/scrypt.so
scrypt-5.2.so: luascrypt.c base64.c
$(CC) $(CFLAGS) $(LUA52_INC) -shared -o $@ $^ $(LUA52_LIB) $(SCRYPT_LIBS)