-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (34 loc) · 1.01 KB
/
Copy pathMakefile
File metadata and controls
45 lines (34 loc) · 1.01 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
##
## EPITECH PROJECT, 2024
## Makefile
## File description:
## Makefile
##
EXECUTABLE_NAME := trade
CMAKE_GEN_FLAGS :=
CMAKE_BUILD_FLAGS :=
BUILD_DIR := build
DEBUG_DIR := debug
all: build
build:
@cmake -B $(BUILD_DIR) . $(CMAKE_GEN_FLAGS) -DCMAKE_BUILD_TYPE=Release
@cmake --build $(BUILD_DIR) --config Release $(CMAKE_BUILD_FLAGS)
debug:
@cmake -B $(DEBUG_DIR) . $(CMAKE_GEN_FLAGS) -DCMAKE_BUILD_TYPE=Debug
@cmake --build $(DEBUG_DIR) --config Debug $(CMAKE_BUILD_FLAGS)
clean:
@rm -rf *.o .idea/
@find . -type f,d \( -name "*~" -o -name "\#*\#" \) -delete
@find . -type f,d -name "vgcore*" -delete
@find . -type f,d -name "*.gcno" -delete
@find . -type f,d -name "*.gcda" -delete
@find . -type f,d -name "*.gcov" -delete
@rm -rf $(BUILD_DIR) $(DEBUG_DIR)
fclean: clean
@find . -name $(EXECUTABLE_NAME) -delete
@find . -name test_bin -delete
re: fclean all
tests_run: fclean
@gcc -o test_bin $(TESTS_SRC) $(SRCS) --coverage -lcriterion $(CDEBUGFLAGS)
@./test_bin
.PHONY: all clean fclean re tests_run debug