-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
115 lines (100 loc) · 2.84 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
##
## EPITECH PROJECT, 2018
## Makefile
## File description:
## Makefile
##
SRC = $(SRC_DIR)main.c \
$(SRC_DIR)globals_vars.c \
$(SRC_DIR)init_struct.c \
$(SRC_DIR)load_42shrc.c \
$(SRC_DIR)signal_ign.c \
$(SRC_DIR)print_prompt.c \
$(SRC_DIR)input_parser.c \
$(SRC_DIR)free_list.c \
$(SRC_DIR)shell_close.c \
$(ENV_DIR)copy_env.c \
$(ENV_DIR)shell_getenv.c \
$(ENV_DIR)get_id_env.c \
$(TOKENIZER_DIR)tokenizer.c \
$(TOKENIZER_DIR)create_token.c \
$(TOKENIZER_DIR)find_delim.c \
$(TOKENIZER_DIR)check_token_list.c \
$(TOKENIZER_DIR)split_token_list.c \
$(TOKENIZER_DIR)delete_token.c \
$(PARSER_DIR)sep_list_parser.c \
$(PARSER_DIR)pipe_list_parser.c \
$(PARSER_DIR)check_pipe_position.c \
$(PARSER_DIR)get_redirection.c \
$(EXEC_DIR)my_exec.c \
$(EXEC_DIR)exec_pipe.c \
$(EXEC_DIR)open_pipe.c \
$(EXEC_DIR)pipe_redir_fd.c \
$(EXEC_DIR)redir_fd.c \
$(EXEC_DIR)is_builtin.c \
$(EXEC_DIR)exec_builtin.c \
$(EXEC_DIR)exec_command.c \
$(EXEC_DIR)close_pipe.c \
$(EXEC_DIR)wait_pipe.c \
$(TRANSFORM_TOKEN)transform_tokens_to_argv.c \
$(TRANSFORM_TOKEN)transform_token.c \
$(TRANSFORM_TOKEN)get_tilde.c \
$(TRANSFORM_TOKEN)get_last_return.c \
$(TRANSFORM_TOKEN)get_var.c \
$(TRANSFORM_TOKEN)get_glob.c \
$(TRANSFORM_TOKEN)get_alias.c \
$(BUILTIN_DIR)builtin_tab.c \
$(BUILTIN_DIR)my_alias.c \
$(BUILTIN_DIR)my_builtins.c \
$(BUILTIN_DIR)my_cd.c \
$(BUILTIN_DIR)my_echo.c \
$(BUILTIN_DIR)my_env.c \
$(BUILTIN_DIR)my_exit.c \
$(BUILTIN_DIR)my_getenv.c \
$(BUILTIN_DIR)my_kill.c \
$(BUILTIN_DIR)my_setenv.c \
$(BUILTIN_DIR)my_unsetenv.c \
$(BUILTIN_DIR)my_where.c \
$(BUILTIN_DIR)my_which.c \
$(BUILTIN_DIR)my_whoami.c \
$(MY_POWER4_DIR)my_power4.c \
$(MY_POWER4_DIR)power4_ia.c \
$(MY_POWER4_DIR)power4_test_win.c \
$(MY_SNAKE_DIR)colors.c \
$(MY_SNAKE_DIR)exit.c \
$(MY_SNAKE_DIR)game_loop.c \
$(MY_SNAKE_DIR)my_snack.c \
$(MY_SNAKE_DIR)read_no_block.c \
$(MY_SNAKE_DIR)speed_snack.c \
SRC_DIR = src/
ENV_DIR = $(SRC_DIR)env/
TOKENIZER_DIR = $(SRC_DIR)tokenizer/
PARSER_DIR = $(SRC_DIR)parser/
EXEC_DIR = $(SRC_DIR)exec/
TRANSFORM_TOKEN = $(EXEC_DIR)transform_token/
BUILTIN_DIR = $(SRC_DIR)builtin/
GAME_DIR = $(SRC_DIR)game/
MY_POWER4_DIR = $(GAME_DIR)my_power4/
MY_SNAKE_DIR = $(GAME_DIR)my_snake/
LIB_DIR = lib/
INC_DIR = include/
OBJ = $(SRC:.c=.o)
CFLAGS += -W -Wall -Wextra \
-I $(INC_DIR) \
-O3
LDFLAGS = -L $(LIB_DIR) -lmy -lncurses
NAME = 42sh
all: $(NAME)
debug: CFLAGS += -g
debug: re
$(NAME): $(OBJ)
@make -C $(LIB_DIR) --no-print-directory
@gcc -o $(NAME) $(OBJ) $(LDFLAGS)
clean:
@rm -f $(OBJ)
@make clean -C $(LIB_DIR) --no-print-directory
fclean: clean
@rm -f $(NAME)
@make fclean -C $(LIB_DIR) --no-print-directory
re: fclean all
.PHONY: all debug re clean fclean