diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..02a7e6f --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +# Go parameters +GOCMD=go +GOBUILD=$(GOCMD) build +GOMOD=$(GOCMD) mod +GOTEST=$(GOCMD) test +GOFLAGS := -v +# This should be disabled if the binary uses pprof +LDFLAGS := -s -w + +ifneq ($(shell go env GOOS),darwin) +LDFLAGS := -extldflags "-static" +endif + +all: build +build: + $(GOBUILD) $(GOFLAGS) -ldflags '$(LDFLAGS)' -o "uncover" cmd/uncover/uncover.go +test: + $(GOTEST) $(GOFLAGS) ./... +tidy: + $(GOMOD) tidy \ No newline at end of file