From c5b3309ccc0fa7df7947eafb0802fb1b8a80b56d Mon Sep 17 00:00:00 2001 From: Loup Vaillant Date: Sat, 11 Feb 2017 00:01:31 +0100 Subject: [PATCH] replaced build.sh by a makefile --- build.sh | 9 --------- makefile | 21 +++++++++++++++++++++ monocypher.c | 2 +- 3 files changed, 22 insertions(+), 10 deletions(-) delete mode 100755 build.sh create mode 100644 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], -- 2.47.3