Browse Source

install protoc

pull/1780/head
Anton Kaliaev 7 years ago
parent
commit
480e4e4444
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 14 additions and 4 deletions
  1. +14
    -4
      Makefile

+ 14
- 4
Makefile View File

@ -7,12 +7,22 @@ all: protoc install test
PACKAGES=$(shell go list ./... | grep -v '/vendor/')
install-protoc:
# Download: https://github.com/google/protobuf/releases
install_protoc:
# https://github.com/google/protobuf/releases
curl -L https://github.com/google/protobuf/releases/download/v3.4.1/protobuf-cpp-3.4.1.tar.gz | tar xvz && \
cd protobuf-cpp-3.4.1 && \
DIST_LANG=cpp ./configure && \
make && \
make install && \
cd .. && \
rm -rf protobuf-cpp-3.4.1
go get github.com/golang/protobuf/protoc-gen-go
protoc:
@ protoc --go_out=plugins=grpc:. types/*.proto
## On "error while loading shared libraries: libprotobuf.so.14: cannot open shared object file: No such file or directory"
## ldconfig (may require sudo)
## https://stackoverflow.com/a/25518702
protoc --go_out=plugins=grpc:. types/*.proto
install:
@ go install ./cmd/...
@ -79,4 +89,4 @@ metalinter_test: tools
#--enable=unparam \
#--enable=vet \
.PHONY: all build test fmt get_deps tools
.PHONY: all build test fmt get_deps tools protoc install_protoc

Loading…
Cancel
Save