summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 7ac8504..c9e6543 100644
--- a/Makefile
+++ b/Makefile
@@ -104,6 +104,8 @@ CFLAGS ?= -O2 -Wall
INSTALL := /usr/bin/install
SCRYPT_LIBS := -lscrypt
+CFLAGS := $(CFLAGS) -fPIC
+
all: lua-5.1-try lua-5.2-try
clean:
@@ -121,8 +123,8 @@ 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
-scrypt-5.1.so: luascrypt.o
- $(CC) $(CFLAGS) -shared -o $@ $^ $(LUA51_LIB) $(SCRYPT_LIBS)
+scrypt-5.1.so: luascrypt.c
+ $(CC) $(CFLAGS) $(LUA51_INC) -shared -o $@ $^ $(LUA51_LIB) $(SCRYPT_LIBS)
lua-5.2: scrypt-5.2.so
ln -s -f scrypt-5.2.so scrypt.so
@@ -131,8 +133,8 @@ 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
-scrypt-5.2.so: luascrypt.o
- $(CC) $(CFLAGS) -shared -o $@ $^ $(LUA51_LIB) $(SCRYPT_LIBS)
+scrypt-5.2.so: luascrypt.c
+ $(CC) $(CFLAGS) $(LUA52_INC) -shared -o $@ $^ $(LUA52_LIB) $(SCRYPT_LIBS)
doc: