summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 1509435..87a65e8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,13 @@
BIN=hbbpd hbbpc
+
+ifndef EXTERNAL_NACL
+CFLAGS += -Inacl/include/
+LDFLAGS += -Lnacl/lib/
+NACL_DEP = nacl/include
+endif
+
+CFLAGS +=-std=c99 -Wall -Wextra -fwhole-program -Os
+LDFLAGS +=-lnacl nacl/lib/randombytes.o
all: $(BIN)
@@ -6,6 +15,9 @@ all: $(BIN)
clean:
rm -f $(BIN) *~
+%: %.c common.h crypto.h $(NACL_DEP)
+ $(CC) -o $@ $< $(LDFLAGS) $(CFLAGS)
+
nacl/include:
mkdir nacl
wget http://hyperelliptic.org/nacl/nacl-20110221.tar.bz2 -O - | tar jxf - -C nacl
contact: Jan Huwald // Impressum