Add a compile option to reduce binary size
Add compile option to 'make test' and use variable for options
GOFMT ?= gofmt -s
GOFILES := $(shell find . -name "*.go" -type f -not -path "./vendor/*")
+OPTIONS := -ldflags "-s -w"
.PHONY: fmt
fmt:
@@ -7,15 +8,15 @@ fmt:
.PHONY: build
build:
- go build .
+ go build $(OPTIONS) .
.PHONY: install
install:
- go install .
+ go install $(OPTIONS) .
.PHONY: test
test:
- go test ./...
+ go test $(OPTIONS) ./...
.PHONY: clean
clean:
