-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (47 loc) · 1.51 KB
/
Copy pathMakefile
File metadata and controls
66 lines (47 loc) · 1.51 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E rm -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/iroumec/Documents/Crasty/source
FILES ?= resources/obj/diablo3_pose/diablo3_pose.obj resources/obj/floor.obj
EXEC ?= ./build/rensy
git-uncache: ## "Descachea" los archivos.
@git rm -r --cached .
compile:
@cmake -B build -G Ninja -DCMAKE_CXX_COMPILER=clang++
@cmake --build build -j
run: compile
@$(EXEC) $(FILES)
run-boggie:
@$(MAKE) run FILES="resources/obj/boggie/body.obj"
run-stone:
@$(MAKE) run FILES="resources/obj/giant_stone/Stone.obj"
run-diablo:
@$(MAKE) run FILES="resources/obj/diablo3_pose/diablo3_pose.obj"
run-face:
@$(MAKE) run FILES="resources/obj/african_head/african_head.obj"
timed-run: compile ## The program is executed using all optimizations (-O3) and then executed, measuring its runtime.
@time $(EXEC) $(FILES)
see-imports:
@grep -R "^import " source/*.cppm
tga-to-png: # Requires `sudo apt install imagemagick`.
@for d in resources/interesting_outputs outputs; do \
[ -d "$$d" ] || continue; \
find "$$d" -type f -name "*.tga" \
-exec sh -c 'for f; do magick "$$f" "$${f%.tga}.png"; done' _ {} +; \
done
debug:
gdb --batch \
-ex "run $(FILES)" \
-ex "bt" \
-ex "quit" \
$(EXEC)
delete-logs:
@rm *.log
delete-logs-recursive:
@find . -type f -name "*.log" -delete