-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
61 lines (55 loc) · 3.22 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: ktshikot <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2016/08/06 14:38:52 by ktshikot #+# #+# #
# Updated: 2018/11/27 12:17:37 by junius ### ########.fr #
# #
# **************************************************************************** #
NAME = 21sh
SRC = ./src/main.c ./src/commands/ft_commands.c ./src/utils/ft_ctrl_c_signal_handler.c \
./src/commands/ft_cd.c ./src/commands/ft_echo.c ./src/env/ft_env.c \
./src/utils/ft_utils.c ./src/exec/ft_get_data.c ./src/history/ft_history.c \
./src/utils/ft_more_utils.c ./src/keyboard/ft_ctrl_keyboard.c ./src/signals/ft_signals.c\
./src/keyboard/ft_ctrl_terminal.c ./src/keyboard/ft_term_utils.c ./src/pipe/ft_manage_pipes.c \
./src/buffer/ft_manage_buff.c ./src/history/ft_hist_utils.c ./src/memory/ft_free.c \
./src/utils/ft_cmd_utils.c ./src/env/ft_env_utils.c ./src/redirection/ft_redirection.c \
./src/redirection/ft_redirection_utils.c ./src/redirection/ft_here_doc.c \
./src/parenthesis/ft_parenthesis.c ./src/parenthesis/ft_parenthesis_utils.c \
./src/redirection/ft_here_doc_utils.c ./src/env/ft_export.c ./src/logical/ft_logical_op.c \
./src/history/ft_bck_i_search.c ./src/history/ft_manage_hist.c ./src/copy/ft_cut.c \
./src/auto/ft_auto_search.c ./src/auto/ft_auto_utils.c ./src/auto/ft_auto_misc.c \
./src/hash_table/ft_hash_table.c ./src/hash_table/ft_hash_table_utils.c \
./src/exec/ft_execute.c ./src/exec/utils.c ./src/substitution/ft_sub.c ./src/auto/ft_format.c \
./src/pipe/ft_pipes_utils.c
OBJECT = main.o ft_commands.o ft_ctrl_c_signal_handler.o ft_cd.o ft_echo.o \
ft_env.o ft_utils.o ft_get_data.o ft_more_utils.o ft_ctrl_terminal.o \
ft_term_utils.o ft_ctrl_keyboard.o ft_manage_pipes.o ft_manage_buff.o \
ft_history.o ft_signals.o ft_hist_utils.o ft_free.o ft_cmd_utils.o ft_env_utils.o \
ft_redirection.o ft_redirection_utils.o ft_here_doc.o ft_parenthesis.o \
ft_parenthesis_utils.o ft_here_doc_utils.o ft_export.o ft_logical_op.o \
ft_bck_i_search.o ft_manage_hist.o ft_cut.o ft_auto_search.o ft_auto_utils.o \
ft_auto_misc.o ft_hash_table.o ft_hash_table_utils.o ft_execute.o ft_sub.o \
ft_format.o ft_pipes_utils.o utils.o
FLAGS = -Wall -Wextra -Werror -g3
OPTIONS = -c -I libft/includes/ -I includes/
all: $(NAME)
$(NAME):
@make -C libft/
@gcc $(FLAGS) $(OPTIONS) $(SRC)
@gcc -o $(NAME) $(OBJECT) -L libft/ -lft -ltermcap
@chmod 777 $(NAME)
@echo "\x1B[32mCompiled project.\x1B[0m"
@whoami > author
clean:
@make -C libft/ clean
@/bin/rm -f $(OBJECT)
@echo "\x1B[32mCleaned up object files.\x1B[0m"
fclean: clean
@make -C libft/ fclean
@/bin/rm -f $(NAME)
@echo "\x1B[32mCleaned up compiled files.\x1B[0m"
re: fclean all