-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (26 loc) · 860 Bytes
/
Makefile
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
31
32
33
.DEFAULT_GOAL := init
.PHONY: dev debug release
.DEFAULT: help
help:
@echo "make dev"
@echo " run in dev mode"
@echo "make debug"
@echo " run in debug mode"
@echo "make release"
@echo " run in release mode"
check-odin:
ifeq (, $(shell which odin))
$(error "Odin not in $(PATH), odin (https://odin-lang.org) is required")
endif
check-pre-commit:
ifeq (, $(shell which pre-commit))
$(error "pre-commit not in $(PATH), pre-commit (https://pre-commit.com) is required")
endif
init: check-odin check-pre-commit
pre-commit install
dev:
./build_hot_reload.sh && ./game.bin
debug:
odin build main_release -out:game_debug.bin -no-bounds-check -debug && ./game_debug.bin
release:
odin build main_release -out:game_release.bin -no-bounds-check -o:speed -strict-style -vet-unused -vet-using-stmt -vet-using-param -vet-style -vet-semicolon && ./game.bin