title: protoc in makefile to build protobuf
body: <p>I have installed a protocol buffer like the tutorial on <a href="https://github.com/google/protobuf/blob/master/src/README.md" rel="nofollow noreferrer">https://github.com/google/protobuf/blob/master/src/README.md</a></p>
  
  <p>after that I want to build protobuf and install go library with command as follows:</p>
  
  <pre><code>go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
  go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
  go get -u github.com/golang/protobuf/protoc-gen-go
  make # generate app and protobuf
  </code></pre>
  
  <p>I have file <code>Makefile</code> on my root like this :</p>
  
  <pre><code>get:
      echo "Build Proto"
      protoc -I/usr/local/include -I. -I$GOPATH/src -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis proto/item.proto --go_out=plugins=grpc:.
      protoc -I/usr/local/include -I. -I$GOPATH/src -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis proto/item.proto --grpc-gateway_out=logtostderr=true:.
      protoc -I/usr/local/include -I. -I$GOPATH/src -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis proto/item.proto --swagger_out=logtostderr=true:.
      echo "Build APP"
      CGO_ENABLED=0 GOOS=linux go build -o ./server/storeitemservice ./server/cmd/server/main.go
  </code></pre>
  
  <p>but I want to generate app and protobuf in my root of application with the command <code>make</code> to build my app and the result like this:</p>
  
  <pre><code>echo "Build Proto"
  Build Proto
  protoc -I/usr/local/include -I. -IOPATH/src -IOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis proto/item.proto --go_out=plugins=grpc:.
  OPATH/src: warning: directory does not exist.
  OPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis: warning: directory does not exist.
  google/api/annotations.proto: File not found.
  proto/item.proto: Import "google/api/annotations.proto" was not found or had errors.
  Makefile:2: recipe for target 'get' failed
  make: *** [get] Error 1
  </code></pre>
  
  <p>after seeing the problem like this I check each of its directory, and it turns out there is all.</p>