-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
55 lines (37 loc) · 1.07 KB
/
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
52
53
54
55
EXAMPLES := $(wildcard examples/*)
RENDERERS := "ukiyoe_curses"
.default: build
.PHONY: build lint test clean build-ukiyoe lint-ukiyoe test-ukiyoe clean-ukiyoe $(EXAMPLES) $(RENDERERS)
############## PROJECT TOP LEVEL ##############
build: build-ukiyoe $(RENDERERS) $(EXAMPLES)
lint: lint-ukiyoe
for dir in $(EXAMPLES); do \
(cd $$dir; cargo lint;) \
done
test: test-ukiyoe
for dir in $(EXAMPLES); do \
(cd $$dir; cargo test;) \
done
clean: clean-ukiyoe
for dir in $(EXAMPLES); do \
(cd $$dir; cargo clean;) \
done
############## UKIYOE TOP LEVEL ##############
build-ukiyoe:
(cd ukiyoe; cargo build;)
lint-ukiyoe:
(cd ukiyoe; cargo lint;)
test-ukiyoe:
(cd ukiyoe; cargo test;)
clean-ukiyoe:
(cd ukiyoe; cargo clean;)
############## RENDERERS TOP LEVEL ##############
$(RENDERERS): build-ukiyoe
(cd $@; cargo build)
############## EXAMPLES ##############
$(EXAMPLES): build-ukiyoe
(cd $@; cargo build)
run-example-curses: examples/curses
(cd examples/curses; cargo run;)
run-example-glfw_opengl3: examples/glfw_opengl3
(cd examples/glfw_opengl3; cargo run;)