Makefile 648 B

1234567891011121314151617181920212223242526272829
  1. # protoc is required:
  2. # pacman -S protoc
  3. # apt install protoc
  4. .PHONY: all go python clean help
  5. all: go python
  6. # protoc-gen-go is required:
  7. # go install github.com/golang/protobuf/protoc-gen-go@latest
  8. go:
  9. protoc --go_out=paths=source_relative:. *.proto
  10. python:
  11. protoc --python_out=. *.proto
  12. clean:
  13. -@rm *_pb2.py
  14. -@rm *.pb.go
  15. help:
  16. @echo Generate basic structs for all kinds of languages.
  17. @echo
  18. @echo Usage:
  19. @echo
  20. @echo make [all] : generates for all languages supported.
  21. @echo make "< go | python | > : generates for specific language."
  22. @echo make clean : remove all generated files.
  23. @echo make help : show this message.