|
|
|
@ -1,4 +1,7 @@ |
|
|
|
|
PROTOC_GEN_GO := $(shell go env GOPATH)/bin/protoc-gen-go
|
|
|
|
|
|
|
|
|
|
GOPATH := $(shell go env GOPATH)
|
|
|
|
|
export PATH := $(PATH):$(GOPATH)/bin
|
|
|
|
|
PROTOC_GEN_GO := $(GOPATH)/bin/protoc-gen-go
|
|
|
|
|
|
|
|
|
|
ARCH := $(shell uname -m)
|
|
|
|
|
VERSION := $(shell git describe --always --dirty=-dirty)
|
|
|
|
@ -14,14 +17,13 @@ run: ./mfer |
|
|
|
|
./$< gen
|
|
|
|
|
|
|
|
|
|
$(PROTOC_GEN_GO): |
|
|
|
|
test -e $(PROTOC_GEN_GO) || go get -u google.golang.org/protobuf/cmd/protoc-gen-go
|
|
|
|
|
test -e $(PROTOC_GEN_GO) || go install -v google.golang.org/protobuf/cmd/protoc-gen-go@latest
|
|
|
|
|
|
|
|
|
|
prereqs: $(PROTOC_GEN_GO) |
|
|
|
|
devprereqs: |
|
|
|
|
which gofumpt || go install -v mvdan.cc/gofumpt@latest
|
|
|
|
|
which golangci-lint || go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
|
|
|
|
#which protoc || go install -v google.golang.org/protobuf/cmd/protoc-gen-go@latest
|
|
|
|
|
|
|
|
|
|
mfer: prereqs src/*.go cmd/*/*.go |
|
|
|
|
mfer: $(PROTOC_GEN_GO) src/*.go cmd/*/*.go |
|
|
|
|
cd proto && go generate .
|
|
|
|
|
cd cmd/mfer && go build -o ../../mfer $(GOFLAGS) .
|
|
|
|
|
|
|
|
|
|