diff --git a/Makefile b/Makefile index 5c2bedc6033b1341838f6f40532b83ff0bc02a9b..a4a2fcd845fc6567a9fe6b26312a4d1aef7aad26 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,17 @@ ALL: @echo "THIS IS ONLY FOR DEVELOPMENT. DON'T USE IT" +src: + mkdir -p src/java &&\ + mkdir -p src/python &&\ + mkdir -p src/cpp &&\ + mkdir -p src/js&&\ + protoc -Iproto --java_out=src/java --python_out=src/python --cpp_out=src/cpp --js_out=src/js $$(find ./proto -type f -iname "*.proto") + +clean: + rm -rf src +.PHONY: clean src + formatting: clang-format -i $$(find proto/ -type f -iname "*.proto") diff --git a/README_SETUP.md b/README_SETUP.md index 78222f06fbd69347ab3dbc54ac4943caa5eabb9c..746b15497267349e61fe2b23faf57115455d9d4e 100644 --- a/README_SETUP.md +++ b/README_SETUP.md @@ -17,6 +17,11 @@ contains all necessary configuration. We use [buf](https://docs.buf.build/) for linting. Run `buf lint`. The `buf.yaml` contains all necessary configuration. +## Source code generation + +`make src` generates the protobuf code for Java, C++, Python and JavaScript using +the locally installed `protoc`. + ## Docs We use [cmake](https://cmake.org) as build tool for the documenation and