-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
57 lines (51 loc) · 1.36 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
56
57
config="release"
files="share/render.png"
scene="share/scene.json"
param="share/param.json"
all: FORCE
premake5 gmake
make -j8 -C build config=${config}
run: FORCE
premake5 gmake
make -j8 -C build mcrt config=${config}
bin/mcrt ${args}
render: FORCE
premake5 gmake
make -j8 -C build mcrt config=${config}
bin/mcrt ${files} ${scene} ${param}
view-render: FORCE
premake5 gmake
make -j8 -C build mcrt config=${config}
sleep 2s && feh --force-aliasing -R2 -F share/render.png &
bin/mcrt ${files} ${scene} ${param}
profile: FORCE
premake5 gmake
make -j8 -C build mcrt config=${config}
perf record -F 512 -g -- bin/mcrt share/render.png share/scene.json share/param.json
perf script | utils/stackcollapse-perf.pl > share/perf.out
utils/flamegraph.pl share/perf.out > share/perf.svg
rm -rf perf.data
view-profile: profile
$(BROWSER) share/perf.svg
docs: FORCE
make -C docs/
slides: FORCE
make -C docs/slides/
tags: FORCE
ctags -R src/mcrt include/mcrt
cscope -Rb -s src/mcrt -s include/mcrt
clean: FORCE
rm -rf build
rm -rf docs/build
rm -rf docs/slides/build
rm -rf share/perf.out
rm -rf share/perf.svg
rm -rf share/photons.csv
rm -rf share/statistics.csv
rm -rf share/photon_map.csv
distclean: clean
rm -f bin/mcrt
rm -f docs/mcrt.pdf
rm -f docs/slides/slides.pdf
FORCE:
.PHONY: all run render view-render profile view-profile docs slides tags clean distclean