Skip to content

Commit

Permalink
f dist/tools/nacl_key_generator: use git instead of local tweetnacl copy
Browse files Browse the repository at this point in the history
  • Loading branch information
kYc0o committed Jan 23, 2017
1 parent 1610ddc commit a38248f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions dist/tools/nacl_key_generator/.gitignore
@@ -0,0 +1,2 @@
/git-fetch-tweetnacl
tweetnacl
11 changes: 10 additions & 1 deletion dist/tools/nacl_key_generator/Makefile
Expand Up @@ -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

Expand All @@ -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:
Expand Down

0 comments on commit a38248f

Please sign in to comment.