-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (59 loc) · 1.57 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
NAME = minishell
CFLAGS = -Wall -Wextra -Werror
CC = gcc
LIB = libft/libft.a
SRC = ./parsing/parser.c\
./parsing/check_errors.c\
./parsing/check_flags.c\
./parsing/ft_error.c\
./parsing/get_env.c\
./parsing/create_lists_prs.c\
./parsing/get_dollars.c\
./parsing/get_cmd_arg.c\
./parsing/get_files.c\
./parsing/outils.c\
./parsing/check_flgs_sdr.c\
./parsing/read_line.c\
./parsing/outils_readline.c\
./parsing/signals_readline.c\
./parsing/press_key.c\
./parsing/hundel_error.c\
./parsing/get_about_dollar.c\
./parsing/ft_frees.c\
./execution/builtin.c\
./execution/cd_builtin.c\
./execution/cd_chpwd.c\
./execution/echo_builtin.c \
./execution/error_file.c\
./execution/execution.c\
./execution/export_builtin.c\
./execution/linked_list.c\
./execution/message_errors.c\
./execution/open_file.c\
./execution/pipe_execution.c\
./execution/utils.c\
./execution/beta_export.c\
./execution/signal_handler.c
OBJ = $(SRC:.c=.o)
magenta = `tput setaf 5`
white = `tput setaf 7`
bold = $(shell tput bold)
ED = \033[0m
all: $(NAME)
$(NAME): $(OBJ)
@make -C libft
@$(CC) $(CFLAGS) $(OBJ) $(LIB) -lncurses -o $(NAME)
@echo "$(white)${bold}LIBRARY CREATION${ED}"
@echo "$(white)${bold}... DONE ...${ED}"
%.o : %.c
@echo "${bold}${white}COMPILING SRC...[OK]${ED}"
@$(CC) $(CFLAGS) -c $< -o $@
clean:
@rm -f $(OBJ)
@echo "${bold}${magenta}REMOVE LIBRARY...[OK]${ED}"
@make -C libft clean
fclean: clean
@rm -f $(NAME)
@echo "${bold}${magenta}REMOVE EXECUTION...[OK]${ED}"
@make -C libft fclean
re: fclean all