summaryrefslogtreecommitdiff
path: root/Makefile
blob: 903549dfd84d0a4f63ae54346c8e716f108ae0f6 (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=pkg/model \
		--go_opt=paths=source_relative \
		--go-grpc_out=pkg/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