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
|
DEFAULT: run
|
||||||
|
|
||||||
|
format:
|
||||||
|
@gofmt -s -w .
|
||||||
|
|
||||||
|
check:
|
||||||
|
@test -z $$(gofmt -l .) || \
|
||||||
|
(echo "gofmt: formatting issue - run 'make format' to resolve" && exit 1)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@find -type f -name "*.log" -exec rm '{}' \;
|
@find -type f -name "*.log" -exec rm '{}' \;
|
||||||
|
|
||||||
build:
|
build:
|
||||||
@go build -v .
|
@go build -ldflags="-s -w" -v .
|
||||||
|
|
||||||
run: clean build
|
run: clean build
|
||||||
@./cairde
|
@./cairde
|
||||||
|
|
||||||
|
loc:
|
||||||
|
@find . -name "*.go" | xargs wc -l
|
||||||
|
|
Loading…
Reference in New Issue