GO=go
GOTEST=$(GO) test
GOCOVER=$(GO) tool cover
GOFMT=gofmt

hivedav:
	CGO_ENABLED=1 $(GO) build

.PHONY: all 
all: hivedav

.PHONY: clean
clean:
	$(GO) clean
	rm -f coverage.out

.PHONY: fmt
fmt:
	$(GOFMT) -w -s .

.PHONY: test
test:
	$(GOTEST) ./...

.PHONY: test/cover
test/cover:
	$(GOTEST) -v -coverprofile=coverage.out ./...
	$(GOCOVER) -func=coverage.out
	$(GOCOVER) -html=coverage.out
