Makefile 1.3 KB

12345678910111213141516171819202122232425262728
  1. #
  2. # github.com/protobuf/protoc-gen-go was recently deprecated in favor of
  3. # google.golang.org/protobuf/protoc-gen-go and there have been some changes to the interface.
  4. # We are using protoc to generate golang as a package in a somewhat non-standard way and as such
  5. # we have to specify some options. For more details see
  6. # [here](https://developers.google.com/protocol-buffers/docs/reference/go-generated#package).
  7. #
  8. # protoc --go_out=./ --go_opt=M"./signalling.proto=./;tdproto" signalling.proto \
  9. #
  10. # --go_out=./
  11. # --go_out == generate go files into the current directory
  12. #
  13. # --go_opt=M"signalling.proto=./;tdproto"
  14. # --go_opt= == use options for protoc-gen-go
  15. # Msignalling.proto == the structures defined by the protobuf at this path are used by the module defined here
  16. # =./ == the module for importing related files is at ./
  17. # ;tdproto == use a custom package name (other than module name defined by package path, which we aren't using)
  18. #
  19. # signalling.proto == the file to compile using protoc
  20. #
  21. # --------------------------------------------------------------------------------------------------
  22. #
  23. # old command to compile the protobuf into a local file with package name tdproto
  24. #
  25. # protoc --go_out=import_path=tdproto:. signalling.proto \
  26. all:
  27. protoc --go_out=./ --go_opt=M"signalling.proto=./;tdproto" signalling.proto