Skip to content

Commit

Permalink
Add tweetnacl source files
Browse files Browse the repository at this point in the history
  • Loading branch information
Daan Sprenkels committed Apr 11, 2017
1 parent 921a3de commit 72682f1
Show file tree
Hide file tree
Showing 4 changed files with 1,083 additions and 16 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# TweetNaCl is downloaded at compile time
tweetnacl.h
tweetnacl.c

# Prerequisites
*.d

Expand Down
14 changes: 2 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
CC = clang
CFLAGS = -Wall -g -O2 -pedantic
SRCS = sss.c hazmat.c tweetnacl.c
OBJS := ${SRCS:.c=.o}

all: libsss.a test
all: libsss.a

libsss.a: $(OBJS)
$(AR) -rcs libsss.a $^

%.o: tweetnacl.h %.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) $^

tweetnacl.c: tweetnacl.h
wget -q https://tweetnacl.cr.yp.to/20140427/tweetnacl.c

tweetnacl.h:
wget -q https://tweetnacl.cr.yp.to/20140427/tweetnacl.h

%.out: %.o
$(CC) -o $@ $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS)
./$@
Expand All @@ -25,4 +15,4 @@ test: test_hazmat.out

.PHONY: clean
clean:
$(RM) *.o *.gch *.a *.out tweetnacl.c tweetnacl.h
$(RM) *.o *.gch *.a *.out
Loading

0 comments on commit 72682f1

Please sign in to comment.