-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
48 lines (33 loc) · 852 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
COLOR ?= always # Valid COLOR options: {always, auto, never}
CARGO = cargo --color $(COLOR)
SOURCES := $(patsubst %.ppm,%.png,$(wildcard outputs/*/*.ppm))
.DEFAULT_GOAL := help
.PHONY: all bench build check clean doc install publish run test update help
all: $(SOURCES)
echo $(SOURCES)
bench:
@$(CARGO) bench
build:
@$(CARGO) build
check:
@$(CARGO) check
clean:
@$(CARGO) clean
doc:
@$(CARGO) doc
install: build
@$(CARGO) install
publish:
@$(CARGO) publish
run: build
./target/debug/ray-tracing-in-a-weekend
tofile: build
./target/debug/ray-tracing-in-a-weekend > outputs/the_next/05_earth.ppm
test: build
@$(CARGO) test
update:
@$(CARGO) update
%.png: %.ppm
magick convert $< $@
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'