-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (50 loc) · 2.12 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: nboulif <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2019/02/04 23:59:28 by nboulif #+# #+# #
# Updated: 2019/10/29 10:53:47 by nsondag ### ########.fr #
# #
# **************************************************************************** #
NAME = full_corewar
CC = gcc
ASM_NAME = asm
VM_NAME = corewar
ASM = $(ASM_DIRECTORY)$(ASM_NAME)
VM = $(VM_DIRECTORY)$(VM_NAME)
ASM_DIRECTORY = ./asm/
VM_DIRECTORY = ./corewar/
GREEN = \033[0;32m
RED = \033[0;31m
RESET = \033[0m
.PHONY: all clean fclean re asm corewar asm_test corewar_test
all: $(NAME)
$(NAME): $(ASM_NAME) $(VM_NAME)
@echo "$(NAME): $(GREEN)$(NAME) was created$(RESET)"
$(ASM_NAME):
@echo "$(NAME): $(GREEN)Creating $(ASM)...$(RESET)"
@$(MAKE) -sC $(ASM_DIRECTORY)
$(VM_NAME):
@echo "$(NAME): $(GREEN)Creating $(VM)...$(RESET)"
@$(MAKE) -sC $(VM_DIRECTORY)
asm_test: $(NAME)
@echo "$(NAME): $(GREEN) STARTING TEST ASM FSANITIZE $(RESET)"
@$(MAKE) -sC $(ASM_DIRECTORY) test_f
@echo "$(NAME): $(GREEN) STARTING TEST ASM VALGRIND $(RESET)"
@$(MAKE) -sC $(ASM_DIRECTORY) test_v
corewar_test: $(NAME)
@echo "$(NAME): $(GREEN) STARTING TEST VM DIFF $(RESET)"
@$(MAKE) -sC $(VM_DIRECTORY) test_d
@echo "$(NAME): $(GREEN) STARTING TEST VM COMPARE $(RESET)"
@$(MAKE) -sC $(VM_DIRECTORY) test_c
clean:
@$(MAKE) -sC $(ASM_DIRECTORY) clean
@$(MAKE) -sC $(VM_DIRECTORY) clean
@echo "$(NAME): $(RED)object files were deleted$(RESET)"
fclean: clean
@$(MAKE) -sC $(ASM_DIRECTORY) fclean
@$(MAKE) -sC $(VM_DIRECTORY) fclean
re: fclean all