-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
88 lines (70 loc) · 1.98 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
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
##
## EPITECH PROJECT, 2023
## corewar
## File description:
## Makefile
##
PATH_ASM = ./asm
PATH_COREWAR = ./corewar
PATH_COMMON = ./lib/common
PATH_MY = ./lib/my
FTEST_REPO = https://github.com/Atomot/ftest/
FTEST_V = ftest-0.1.0-1.x86_64.rpm
STYLE_GREEN=\033[0;32m
STYLE_ORANGE=\033[0;33m
STYLE_RED=\033[0;31m
STYLE_BLUE=\033[0;34m
STYLE_GREY=\033[0;30m
STYLE_BOLD=\033[1m
STYLE_END=\033[0m
NAME = global_corewar
.PHONY: all clean fclean re
all: $(NAME)
$(NAME):
@printf "$(STYLE_RED)🚚 Lib 'My' Compilation...\
$(STYLE_END)\n"
@$(MAKE) -C $(PATH_MY) -s
@printf "$(STYLE_RED)🚚 Lib 'Common' Compilation...\
$(STYLE_END)\n"
@$(MAKE) -C $(PATH_COMMON) -s
@printf "$(STYLE_RED)\n🚚 Project 'Asm' Compilation...\
$(STYLE_END)\n"
@$(MAKE) -C $(PATH_ASM) -s
@printf "$(STYLE_RED)\n🚚 Project 'Corewar' Compilation...\
$(STYLE_END)\n"
@$(MAKE) -C $(PATH_COREWAR) -s
docker:
@docker run -it --rm -v $(shell pwd):/project -w /project \
epitechcontent/epitest-docker tcsh
clean:
@$(MAKE) -C $(PATH_ASM) clean -s
@$(MAKE) -C $(PATH_COREWAR) clean -s
fclean:
@$(MAKE) -C $(PATH_ASM) fclean -s
@$(MAKE) -C $(PATH_COREWAR) fclean -s
re:
@$(MAKE) all -s
style: fclean
@printf "$(STYLE_RED)🔍 Checking coding style...$(STYLE_END)\n"
@coding-style . .
@cat coding-style-reports.log
tests_criterion:
@printf "$(STYLE_RED)🚚 Lib 'Common' Compilation...\
$(STYLE_END)\n"
@$(MAKE) -C $(PATH_COMMON) tests_criterion -s
@$(MAKE) -C $(PATH_ASM) tests_criterion -s
@$(MAKE) -C $(PATH_COREWAR) tests_criterion -s
ftest:
@which ftest ||\
(wget $(FTEST_REPO)releases/download/v0.1.0/$(FTEST_V) &&\
sudo dnf -y install ftest-0.1.0-1.x86_64.rpm)
@rm -f ftest-0.1.0-1.x86_64.rpm
@cp ./tests/ftest/.ftest.toml .
@ftest && rm .ftest.toml
tests_custom:
@$(MAKE) -C $(PATH_ASM) tests_custom -s
tests_run: tests_criterion
coverage:
@gcovr
coverage_branch:
@gcovr --branch