From a38248fa83c8773b78bf7727123c4e4f2c0b2463 Mon Sep 17 00:00:00 2001 From: kYc0o Date: Mon, 23 Jan 2017 14:56:22 +0100 Subject: [PATCH] f dist/tools/nacl_key_generator: use git instead of local tweetnacl copy --- dist/tools/nacl_key_generator/.gitignore | 2 ++ dist/tools/nacl_key_generator/Makefile | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 dist/tools/nacl_key_generator/.gitignore diff --git a/dist/tools/nacl_key_generator/.gitignore b/dist/tools/nacl_key_generator/.gitignore new file mode 100644 index 0000000000000..6f47d3a1fe467 --- /dev/null +++ b/dist/tools/nacl_key_generator/.gitignore @@ -0,0 +1,2 @@ +/git-fetch-tweetnacl +tweetnacl \ No newline at end of file diff --git a/dist/tools/nacl_key_generator/Makefile b/dist/tools/nacl_key_generator/Makefile index ec999327ce054..64cde36250335 100644 --- a/dist/tools/nacl_key_generator/Makefile +++ b/dist/tools/nacl_key_generator/Makefile @@ -4,6 +4,9 @@ TWEETNACL_INCLUDE := tweetnacl TWEETNACL_DIR := tweetnacl TWEETNACL_SRC := $(TWEETNACL_DIR)/tweetnacl.c randombytes.c KEYPAIR_SRC := generate-nacl-keys.c $(TWEETNACL_SRC) +GITCACHE = ../git/git-cache +TWEETNACL_URL = https://github.com/RIOT-OS/tweetnacl.git +TWEETNACL_VERSION = 7ea05c7098a16c87fa66e9166ce301666f3f2623 CFLAGS += -g -O3 -Wall -Wextra -pedantic -std=c99 @@ -12,7 +15,13 @@ all: bin bin/generate-nacl-keys bin: mkdir bin -bin/generate-nacl-keys: +git-fetch-tweetnacl: + rm -Rf $(TWEETNACL_DIR) + mkdir -p $(TWEETNACL_DIR) + $(GITCACHE) clone "$(TWEETNACL_URL)" "$(TWEETNACL_VERSION)" "$(TWEETNACL_DIR)" + touch $@ + +bin/generate-nacl-keys: git-fetch-tweetnacl $(CC) $(CFLAGS) -I$(TWEETNACL_INCLUDE) $(KEYPAIR_SRC) -o $@ clean: