From 0ade48cb82ba4a80f31789f342eefa4e1ffcb3b4 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 1 Aug 2017 14:41:32 +0200 Subject: [PATCH] Makefile: cleanup a bit and add cloc Signed-off-by: Jason A. Donenfeld --- src/Makefile | 13 ++++++++----- 1 file 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