summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
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
+