Zappy - Year end project 2
This is a project that Epitech asked us to create in order to allow us to reveiw the notions of the current year.
Loading...
Searching...
No Matches
Makefile
Go to the documentation of this file.
1##
2## EPITECH PROJECT, 2024
3## Raytracer
4## File description:
5## Makefile
6##
7
8SRC_MAIN = ./src/main.cpp
9
10SRC = ./src/sub_main.cpp \
11 ./src/ArgumentHandling.cpp \
12 ./src/Parsing.cpp \
13
14CXX = g++
15
16RM = rm -rf
17
18OBJ = $(SRC:.cpp=.o)
19
20OBJ_MAIN = $(SRC_MAIN:.cpp=.o)
21
22CXXFLAGS = -Wall -Wextra
23
24CPPFLAGS = -iquote ./include
25
26LDLIBS = -lsfml-audio
27
28LDFLAGS = -L.
29
30NAME = zappy_gui
31
32NAME_TEST = $(NAME)_test
33
34all: $(NAME) update_binary_location
35
36$(NAME): $(OBJ) $(OBJ_MAIN)
37 $(CXX) $(OBJ_MAIN) $(OBJ) -o $(NAME) $(LDFLAGS) $(LDLIBS)
38
39update_binary_location:
40 cp -vf $(NAME) ../../$(NAME)
41
42clean:
43 $(RM) $(OBJ_MAIN)
44 $(RM) $(OBJ)
45 $(RM) *.gcno
46 $(RM) *.gcda
47
48fclean: clean
49 $(RM) $(NAME)
50 $(RM) ../../$(NAME)
51 $(RM) $(NAME_TEST)
52
53re: fclean all
54
55debug: CFLAGS += -g3
56debug: clean all
57
58tests_run: LDLIBS += -lcriterion
59tests_run: CXXFLAGS += -coverage
60tests_run: clean
61tests_run: $(NAME_TEST)
62
63$(NAME_TEST):
64 $(CXX) $(SRC) -o $(NAME_TEST) $(LDFLAGS) $(LDLIBS)
65 ./$(NAME_TEST)
66
67coverage: tests_run
68 gcovr --exclude ./tests
69 gcovr --exclude ./tests --branches
70
71.PHONY: all clean fclean re debug tests_run coverage update_binary_location