diff options
| author | n1c00o <n@nc0.fr> | 2023-02-06 21:55:34 +0100 |
|---|---|---|
| committer | Nicolas <34602094+n1c00o@users.noreply.github.com> | 2023-02-06 22:35:54 +0100 |
| commit | 56d459c02009a72e381687697e4af19fa4990900 (patch) | |
| tree | 102a2d9d27e5efea433c297823beb75310730e90 | |
| parent | 38db6a4a74ce289744073de909124b49dc625100 (diff) | |
Add Makefile
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | Makefile | 24 |
2 files changed, 25 insertions, 0 deletions
@@ -1,2 +1,3 @@ /.idea/ /.vscode/ +/bin/
\ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4307c8b --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +clean: + rm -rf bin + +GENERATOR_DEPS:=$(shell find cmd/generator -type f -name '*.go') + +generator: $(GENERATOR_DEPS) + go build -o=bin/generator -mod=vendor -race $(GENERATOR_DEPS) + +TESTCLIENT_DEPS:=$(shell find cmd/testclient -type f -name '*.go') + +testclient: $(TESTCLIENT_DEPS) + go build -o=bin/testclient -mod=vendor -race $(TESTCLIENT_DEPS) + +API_DEPS:=$(shell find api -type f -name '*.proto') + +api: $(API_DEPS) + protoc --proto_path=./ \ + --proto_path=third_party/googleapis \ + --proto_path=third_party/grpc-proto \ + --go_out=. \ + --go_opt=paths=source_relative \ + --go-grpc_out=. \ + --go-grpc_opt=paths=source_relative \ + $(API_DEPS) |
