forked from lina0322/42seoul_minishell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
72 lines (63 loc) · 1.93 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: llim <llim@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/03/15 17:02:38 by llim #+# #+# #
# Updated: 2021/04/18 20:59:13 by llim ### ########.fr #
# #
# **************************************************************************** #
NAME = minishell
CC = gcc
CFLAGS = -Wall -Wextra -Werror
SRCS = srcs/main.c\
srcs/signal.c \
srcs/prompt.c \
srcs/tokenizer.c \
srcs/token_util.c \
srcs/token_check.c \
srcs/env.c\
srcs/env_util.c\
srcs/export.c\
srcs/export_util.c \
srcs/get_next_line.c \
srcs/ft_pwd.c \
srcs/ft_exit.c \
srcs/ft_cd.c \
srcs/ft_echo.c \
srcs/ft_unset.c \
srcs/ft_export.c \
srcs/cmd.c \
srcs/cmd_parse.c \
srcs/cmd_check.c \
srcs/cmd_util.c \
srcs/path.c \
srcs/execve.c \
srcs/execve_util.c \
srcs/string_util.c \
srcs/term.c \
srcs/cursor.c \
srcs/history.c \
srcs/press_arrow.c \
srcs/free.c \
srcs/builtin.c
INCS = -I includes -I libft
OBJS = $(SRCS:.c=.o)
LIBFT = libft/libft.a
LFT = -L libft -lft -lncurses
all : $(NAME)
$(NAME) : $(LIBFT) $(OBJS)
$(CC) $(CFLAGS) -o $(NAME) $(OBJS) $(LFT) $(INCS)
$(LIBFT) :
@make -C libft/
.c.o :
$(CC) $(CFLAGS) -c $< -o $@ $(INCS)
clean :
@make clean -C libft/
rm -rf $(OBJS)
fclean : clean
@make fclean -C libft/
rm -rf $(NAME)
re : fclean all