raiguard/tcom

git clone https://git.raiguard.me/raiguard/tcom

Caleb HeuerVet0071db6

trunk
857 B35 linesraw
1exe_name := "tcom"
2version := shell("./scripts/generate_version.sh")
3
4common_flags := '-error-pos-style:unix -collection:tcom=src -disallow-do -show-timings -define:VERSION=' + version
5
6alias b := build
7alias c := check
8alias d := debug
9alias r := run
10alias br := build-run
11
12[arg('profile', pattern='(debug|fastdebug|release)')]
13build profile='debug' *custom_flags:
14	odin build src \
15		-out:{{exe_name}} {{common_flags}} {{
16			if profile == 'debug' { '-debug' }
17			else if profile == 'fastdebug' { '-debug -o:speed' }
18			else if profile == 'release' { '-o:speed' }
19			else { '' }
20		}} \
21		{{custom_flags}}
22
23check *custom_flags:
24	odin check src -debug {{common_flags}} {{custom_flags}}
25
26debug *args:
27	raddbg ./{{exe_name}} {{args}}
28
29run *args='':
30	./{{exe_name}} {{args}}
31
32test *args='':
33	odin test src {{common_flags}} -debug {{args}}
34
35build-run: build run