-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
51 lines (45 loc) · 982 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
.PHONY: build check debug test release run
# Build the
build:
@mkdir -p bin
odin build src \
-out:bin/odin-mustache \
-vet \
-show-timings \
-no-dynamic-literals
# Similar to build, but with aggresive optimization and stricter checks.
release:
@mkdir -p bin
odin build src \
-out:bin/odin-mustache \
-o:speed \
-vet \
-strict-style \
-show-timings \
-no-dynamic-literals \
-warnings-as-errors
# Run an example program.
run: release
bin/odin-mustache test/template.txt test/data.json test/layout.txt
# Check the code only, do not run or build.
check:
odin check src -vet -strict-style -no-dynamic-literals
# Build in debug mode.
debug:
@mkdir -p bin
odin build src \
-out:bin/odin-mustache \
-debug \
-show-timings \
-strict-style \
-vet \
-warnings-as-errors
# Run tests.
test:
@mkdir -p bin
odin test src \
-out:bin/odin-mustache-test \
-debug \
-show-timings \
-strict-style \
-warnings-as-errors