From b78d4099eabe2ff6574c04e76b4140e540c42886 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Sun, 1 Oct 2023 09:51:06 +0200 Subject: [PATCH] build: borrow abra targets, use LDFLAGS on build --- makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index 14bc985..3942568 100644 --- a/makefile +++ b/makefile @@ -1,12 +1,22 @@ -.PHONY: clean build run +.PHONY: check clean build run DEFAULT: run +format: + @gofmt -s -w . + +check: + @test -z $$(gofmt -l .) || \ + (echo "gofmt: formatting issue - run 'make format' to resolve" && exit 1) + clean: @find -type f -name "*.log" -exec rm '{}' \; build: - @go build -v . + @go build -ldflags="-s -w" -v . run: clean build @./cairde + +loc: + @find . -name "*.go" | xargs wc -l