.PHONY: all build build-netstack test test-race bench proto tidy clean BINARY_NAME=mats all: test build build: CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o bin/$(BINARY_NAME) ./cmd/mats CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o bin/$(BINARY_NAME)-influx-proxy ./cmd/mats-influx-proxy CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o bin/$(BINARY_NAME)-riemann-sse ./cmd/mats-riemann-sse CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o bin/$(BINARY_NAME)-proxy ./cmd/mats-proxy @cp -f scripts/mats-net bin/mats-net && chmod +x bin/mats-net build-netstack: build CGO_ENABLED=0 go build -tags netstack -trimpath -ldflags="-s -w" -o bin/$(BINARY_NAME)-proxy-netstack ./cmd/mats-proxy test: go test -v ./... test-race: go test -v -race ./... lint: golangci-lint run bench: go test -bench=. -benchmem ./... proto: PATH=$$PATH:$$(go env GOPATH)/bin protoc --go_out=. --go_opt=module=go.iscode.ca/mats proto/riemann.proto tidy: go mod tidy clean: rm -rf bin/