-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (36 loc) · 1.21 KB
/
Makefile
File metadata and controls
44 lines (36 loc) · 1.21 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
# 定义源文件目录
SOURCE_DIR = source
# 定义编译命令,-j8 表示使用 8 个并行任务进行编译
COMPILE_COMMAND = cd $(SOURCE_DIR) && make -j8 && cd ..
# 定义渲染命令前缀
RENDER_COMMAND_PREFIX = ./render --name
# 定义不同清晰度的渲染参数
RENDER_TEST = $(RENDER_COMMAND_PREFIX) graph_test.ppm -x 800 -y 400 --sample-rate 100 --recursive-depth 10
RENDER_MEDIUM = $(RENDER_COMMAND_PREFIX) graph_medium.ppm -x 1920 -y 1080 --sample-rate 100 --recursive-depth 10
RENDER_2K = $(RENDER_COMMAND_PREFIX) graph_2k.ppm -x 2560 -y 1440 --sample-rate 100 --recursive-depth 10
RENDER_4K = $(RENDER_COMMAND_PREFIX) graph_4k.ppm -x 4096 -y 3112 --sample-rate 100 --recursive-depth 10
# test 清晰度渲染任务
test:
@$(COMPILE_COMMAND)
@time $(_TEST)
@code graph_test.ppm
# 中等清晰度渲染任务
medium:
@$(COMPILE_COMMAND)
@time $(_MEDIUM)
@code graph_medium.ppm
# 2K 清晰度渲染任务
2k:
@$(COMPILE_COMMAND)
@time $(_2K)
@code graph_2k.ppm
# 4K 清晰度渲染任务
4k:
@$(COMPILE_COMMAND)
@time $(_4K)
@code graph_4k.ppm
# 清理生成的文件
clean:
@rm -f graph_test.ppm graph_medium.ppm graph_2k.ppm graph_4k.ppm
@cd $(SOURCE_DIR) && make clean && cd ..
@rm -f render