From: Loup Vaillant Date: Fri, 10 Feb 2017 23:01:31 +0000 (+0100) Subject: replaced build.sh by a makefile X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=c5b3309ccc0fa7df7947eafb0802fb1b8a80b56d;p=Monocypher.git replaced build.sh by a makefile --- diff --git a/build.sh b/build.sh deleted file mode 100755 index 256c001..0000000 --- a/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/bash - -CC="gcc" -CFLAGS="-O2 -Wall -Wextra -std=c11" - -$CC $CFLAGS -c monocypher.c -DED25519_SHA512 -$CC $CFLAGS -c sha512.c -$CC $CFLAGS -c test.c -$CC $CFLAGS -o test test.o monocypher.o sha512.o diff --git a/makefile b/makefile new file mode 100644 index 0000000..4388c3b --- /dev/null +++ b/makefile @@ -0,0 +1,21 @@ +CC=gcc +CFLAGS=-O2 -Wall -Wextra -std=c11 -pedantic + +.PHONY: all clean + +all: test + +clean: + rm -f *.o test + +test: test.o monocypher.o sha512.o + $(CC) $(CFLAGS) -o $@ $^ + +test.o: test.c + $(CC) $(CFLAGS) -c $^ + +sha512.o: sha512.c + $(CC) $(CFLAGS) -c $^ + +monocypher.o: monocypher.c + $(CC) $(CFLAGS) -c $^ -DED25519_SHA512 diff --git a/monocypher.c b/monocypher.c index ee52409..ef58441 100644 --- a/monocypher.c +++ b/monocypher.c @@ -1311,7 +1311,7 @@ int crypto_unlock(u8 *plaintext, box, box + 16, text_size); } -static const u8 null_nonce[24] = {}; +static const u8 null_nonce[24]; void crypto_anonymous_lock(u8 *box, const u8 random_secret_key[32],