-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (35 loc) · 1.08 KB
/
Copy pathMakefile
File metadata and controls
43 lines (35 loc) · 1.08 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
ROOT_DIR = $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
TARGET = $(ROOT_DIR)/target/release/ray-tracer
DBGTARGET = $(ROOT_DIR)/target/debug/ray-tracer
INPDIR = ./scenes
BASE_EXAMPLES = $(wildcard $(INPDIR)/example*.xml)
CUSTOM_EXAMPLES = $(INPDIR)/animation.xml $(INPDIR)/spotlight.xml $(INPDIR)/cook-torrance.xml $(INPDIR)/depth_of_field.xml $(INPDIR)/julia_animated.xml $(INPDIR)/julia_set.xml
.PHONY: release debug-target all debug chess
release:
cargo build --release
debug-target:
cargo build
all: release
@- echo "Tracing base scenes."
@- $(foreach SCENE, $(BASE_EXAMPLES), \
echo ""; \
$(TARGET) $(SCENE) -p; \
echo ""; \
)
@- echo "Tracing custom scenes. This might take a while..."
@- $(foreach SCENE, $(CUSTOM_EXAMPLES), \
echo ""; \
$(TARGET) $(SCENE) -p; \
echo ""; \
)
debug: debug-target
@- echo "Tracing base scenes."
@- $(foreach SCENE, $(BASE_EXAMPLES), \
echo ""; \
$(DBGTARGET) $(SCENE) -p; \
echo ""; \
)
chess: release
@- echo "Tracing chess scene. This might take a while..."
@- echo ""
@- $(TARGET) $(INPDIR)/chess.xml -p