summaryrefslogtreecommitdiffhomepage
path: root/src/Makefile
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-08-01 14:41:32 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-08-01 17:09:34 +0200
commit0ade48cb82ba4a80f31789f342eefa4e1ffcb3b4 (patch)
tree2db3e1deac5d185289776cdb60a025b3a652d11e /src/Makefile
parent91c1822473923049755782fcb6d0e101556f4a16 (diff)
Makefile: cleanup a bit and add cloc
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Makefile b/src/Makefile
index 4ef8199..5b23ecc 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,9 +1,12 @@
-BINARY=wireguard-go
+all: wireguard-go
-build:
- go build -o ${BINARY}
+wireguard-go: $(wildcard *.go)
+ go build -o $@
clean:
- if [ -f ${BINARY} ]; then rm ${BINARY}; fi
+ rm -f wireguard-go
-.PHONY: clean
+cloc:
+ cloc $(filter-out xchacha20.go $(wildcard *_test.go), $(wildcard *.go))
+
+.PHONY: clean cloc