summaryrefslogtreecommitdiff
path: root/Makefile
blob: 7ef18f307d94d7249c6ef69ae3515061dccc90de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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