build: borrow abra targets, use LDFLAGS on build
This commit is contained in:
parent
d2b35464e8
commit
b78d4099ea
14
makefile
14
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
|
||||
|
|
Reference in New Issue