diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2025-02-03 01:12:45 -0500 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2025-02-03 01:12:45 -0500 |
commit | 5389e1a5d26fdbf2441fa5a1e101999e8449b9d1 (patch) | |
tree | 069cd37cb8e556c1ba3b47c3ea8576a1aa91ea2c /Makefile |
Batman
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7ef18f3 --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +BUILD_DIR=./build +APP=rafta + +all: setup codegen clean compile + +setup: + git submodule update --init + +codegen: + protoc \ + --proto_path=resources \ + --proto_path=external \ + --go_out=internal/server/model \ + --go_opt=paths=source_relative \ + --go-grpc_out=internal/server/model \ + --go-grpc_opt=paths=source_relative \ + resources/schema.proto + +clean: + rm -rf $(BUILD_DIR) || exit 1 + +compile: + mkdir -p $(BUILD_DIR) || exit 1 + CGO_ENABLED=1 go run ./internal/manualgen > $(BUILD_DIR)/$(APP).1 + CGO_ENABLED=1 go build -o $(BUILD_DIR)/$(APP) . + +.PHONY: run +run: + ./resources/local_dev.sh + |