diff --git a/Makefile b/Makefile index 819e7e2..e58ac27 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,12 @@ -mfer/app.pb.go: mf.proto - protoc --go_out=./mfer $< +PROTOC_GEN_GO := $(GOPATH)/bin/protoc-gen-go + +default: compile + +$(PROTOC_GEN_GO): + go get -u github.com/golang/protobuf/protoc-gen-go + +compile: $(PROTOC_GEN_GO) + cd proto && go generate . + +clean: + rm -rfv proto/*.pb.go diff --git a/mfer/.keep b/mfer/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/proto/gen.go b/proto/gen.go new file mode 100644 index 0000000..de5555c --- /dev/null +++ b/proto/gen.go @@ -0,0 +1,3 @@ +package proto + +//go:generate protoc --go_out=. mf.proto diff --git a/mf.proto b/proto/mf.proto similarity index 100% rename from mf.proto rename to proto/mf.proto