-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (47 loc) · 1.51 KB
/
Copy pathMakefile
File metadata and controls
66 lines (47 loc) · 1.51 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# VoidEngine Makefile
# Built with Odin + SDL2
ODIN := odin
OUT_DIR := .
.PHONY: all build shmup demo puzzle void3d shared check test clean run run-demo run-puzzle run-void3d run-void3d-vk vk-shaders
all: build
build: shmup demo puzzle void3d
shmup:
$(ODIN) build examples/shmup -out:$(OUT_DIR)/shmup -debug
demo:
$(ODIN) build examples/demo -out:$(OUT_DIR)/demo -debug
puzzle:
$(ODIN) build examples/puzzle -out:$(OUT_DIR)/puzzle -debug
void3d: vk-shaders
$(ODIN) build examples/void3d -out:$(OUT_DIR)/void3d -debug
vk-shaders:
@mkdir -p examples/void3d/assets/shaders
@cd src/core/shaders && for f in vk_*.vert vk_*.frag; do \
stage=vert; [ "$${f##*.}" = "frag" ] && stage=frag; \
glslc -fshader-stage=$$stage $$f -o ../../../examples/void3d/assets/shaders/$$f.spv || exit 1; \
done
shared:
$(ODIN) build src/core -build-mode:shared -out:$(OUT_DIR)/voidengine.so -debug
check:
$(ODIN) check src/core -no-entry-point
$(ODIN) check examples/shmup -no-entry-point
$(ODIN) check examples/demo -no-entry-point
$(ODIN) check examples/puzzle -no-entry-point
$(ODIN) check examples/void3d -no-entry-point
test:
@echo "Running engine tests..."
$(ODIN) test tests/ -out:$(OUT_DIR)/voidengine-test
clean:
rm -f shmup demo puzzle void3d voidengine.so voidengine-test
run: shmup
./shmup
run-demo: demo
./demo
run-puzzle: puzzle
./puzzle
run-void3d: void3d
./void3d --backend gl
run-void3d-vk: void3d
./void3d --backend vk
bench-void3d: void3d
./void3d --backend gl --bench 600
./void3d --backend vk --bench 600