-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
111 lines (91 loc) · 2.49 KB
/
Makefile
File metadata and controls
111 lines (91 loc) · 2.49 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
##
## EPITECH PROJECT, 2024
## B-PDG-300-MAR-3-1-PDGRUSH3-vincent.montero-fontaine
## File description:
## Makefile
##
EXEC = raytracer
LIB = -lconfig++ -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio
UNIT_TEST = tests/unit_tests
SRC = src/main.cpp \
src/primitives/quad.cpp \
src/primitives/sphere.cpp \
src/primitives/cylinder.cpp \
src/primitives/cone.cpp \
src/primitives/triangle.cpp \
src/primitives/pyramide.cpp \
src/boxes.cpp \
src/camera.cpp \
src/color.cpp \
src/error_parser.cpp \
src/graphical.cpp \
src/hittable_list.cpp \
src/hittable.cpp \
src/interval.cpp \
src/material.cpp \
src/new_parser.cpp \
src/ortho.cpp \
src/pdf.cpp \
src/perlin.cpp \
src/ray.cpp \
src/texture.cpp \
src/utility.cpp \
src/vec3.cpp \
src/vecN.cpp \
src/bvh.cpp \
src/obj_loader.cpp \
TEST_SRC = src/primitives/quad.cpp \
src/primitives/sphere.cpp \
src/primitives/cylinder.cpp \
src/primitives/cone.cpp \
src/primitives/triangle.cpp \
src/primitives/pyramide.cpp \
src/boxes.cpp \
src/camera.cpp \
src/color.cpp \
src/error_parser.cpp \
src/graphical.cpp \
src/hittable_list.cpp \
src/hittable.cpp \
src/interval.cpp \
src/material.cpp \
src/new_parser.cpp \
src/ortho.cpp \
src/pdf.cpp \
src/perlin.cpp \
src/ray.cpp \
src/texture.cpp \
src/utility.cpp \
src/vec3.cpp \
src/vecN.cpp \
tests/tests.cpp
GCC_PARAM = -W -Wall -Wextra -O2 -fopenmp
LAST_FLAG = -ansi -pedantic -Werror
FLAG_VAL = --tool=memcheck --leak-check=yes --show-reachable=yes
FLAG_VAL2 = --leak-check=full --show-leak-kinds=all -s
all: $(EXEC)
$(EXEC): $(SRC)
g++ $(GCC_PARAM) $(LIB) -o $@ $^
spe: $(SRC)
g++ $(GCC_PARAM) $(LAST_FLAG) -o $(EXEC) $^
clean:
rm -f $(EXEC)
fclean: clean
@find . -type f \( -name "*~" -o \( -name "*#" -a -name "#*" \) \) -delete
@find . -type f \( -name "#*#" -o -name "*~" \) -delete
@find . -type f \( -name "*.gcno" -o -name "*.gcda" \) -delete
@find . -type f \( -name "*.o" -o -name "vgcore.*" \) -delete
rm -f coding-style-reports.log
tests_run:
@g++ $(TEST_SRC) -o $(UNIT_TEST) $(GCC_PARAMS) $(LIB) -lcriterion -std=c++17
@./$(UNIT_TEST)
style: fclean
coding-style . .
cat coding-style-reports.log
exec: $(EXEC)
clear
@./$(EXEC)
valgrind: all
valgrind $(FLAG_VAL) $(FLAG_VAL2) ./$(EXEC)
re: fclean all
.PHONY: clean fclean spe style valgrind re