32 lines
595 B
Makefile
32 lines
595 B
Makefile
# You must use the current protoc-gen-go
|
|
#
|
|
# go-clone --go-src google.golang.org/protobuf
|
|
# cd ~/go/src/google.golang.org/protobuf/cmd/protoc-gen-go
|
|
# go install
|
|
|
|
|
|
all: package.pb.go machine.pb.go vet
|
|
|
|
vet:
|
|
@GO111MODULE=off go vet
|
|
@echo this go library package builds okay
|
|
|
|
# autofixes your import headers in your golang files
|
|
goimports:
|
|
goimports -w *.go
|
|
|
|
redomod:
|
|
rm -f go.*
|
|
GO111MODULE= go mod init
|
|
GO111MODULE= go mod tidy
|
|
|
|
clean:
|
|
rm -f *.pb.go
|
|
-rm -f go.*
|
|
|
|
package.pb.go: package.proto
|
|
autogenpb --proto package.proto
|
|
|
|
machine.pb.go: machine.proto
|
|
autogenpb --proto machine.proto
|