diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2015-07-08 19:54:40 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2015-07-08 19:54:40 +0100 |
commit | 9affdc735bc5731580619057405d16cf588afe9b (patch) | |
tree | e813c32a03abc78201f005361238d976b0ca0773 /Makefile | |
parent | b2378b42f08b6582ae891e8d8599dde474e032ba (diff) | |
download | lua-scrypt-git-9affdc735bc5731580619057405d16cf588afe9b.tar.gz |
Change to using libscrypt even though it has known failure modes
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 37 |
1 files changed, 6 insertions, 31 deletions
@@ -100,43 +100,18 @@ LIBCRYPT_C := lib/crypto/crypto_aesctr.c \ lib/crypto/crypto_scrypt-ref.c \ lib/crypto/sha256.c -ifneq ($(USE_SSE),) - LIBCRYPT_C := $(subst -nosse.c$,-sse.c,$(LIBCRYPT_C)) -endif - -LIBCRYPT_O := $(subst .c$,.o,$(LIBCRYPT_C)) - -LIBSCRYPTENC_C := lib/scryptenc/scryptenc.c lib/scryptenc/scryptenc_cpuperf.c -LIBSCRYPTENC_O := $(subst .c$,.o,$(LIBSCRYPTENC_C)) - -LIBUTIL_C := lib/util/memlimit.c lib/util/readpass.c lib/util/warn.c -LIBUTIL_O := $(subst .c$,.o,$(LIBUTIL_C)) - -SCRYPT_LIBS := libcrypt.a libscryptenc.a libutil.a - CFLAGS ?= -O2 -Wall INSTALL := /usr/bin/install +SCRYPT_LIBS := -lscrypt all: lua-5.1-try lua-5.2-try clean: - $(RM) scrypt-5.1.so scrypt-5.2.so scrypt.so - $(RM) $(SCRYPT_LIBS) - $(RM) $(LIBCRYPT_O) - $(RM) $(LIBSCRYPTENC_O) - $(RM) $(LIBUTIL_O) + $(RM) scrypt-5.1.so scrypt-5.2.so scrypt.so + $(RM) luascrypt.o %.o: %.c - $(CC) $(CFLAGS) -fPIC $(LUA51_INC) -I lib/util -I lib/crypto -I lib/scryptenc -c $< -o $@ - -libcrypt.a: $(LIBCRYPT_O) - $(AR) q libcrypt.a $(LIBCRYPT_O) - -libscryptenc.a: $(LIBSCRYPTENC_O) - $(AR) q libscryptenc.a $(LIBSCRYPTENC_O) - -libutil.a: $(LIBUTIL_O) - $(AR) q libutil.a $(LIBUTIL_O) + $(CC) $(CFLAGS) -fPIC $(LUA51_INC) -c $< -o $@ lua-5.1: scrypt-5.1.so ln -s -f scrypt-5.1.so scrypt.so @@ -145,7 +120,7 @@ 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 $(SCRYPT_LIBS) +scrypt-5.1.so: luascrypt.o $(CC) $(CFLAGS) -shared -o $@ $^ $(LUA51_LIB) $(SCRYPT_LIBS) lua-5.2: scrypt-5.2.so @@ -155,7 +130,7 @@ 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 $(SCRYPT_LIBS) +scrypt-5.2.so: luascrypt.o $(CC) $(CFLAGS) -shared -o $@ $^ $(LUA51_LIB) $(SCRYPT_LIBS) |