-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (62 loc) · 2.18 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: otietz <otietz@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/07/31 15:30:52 by ohnatiuk #+# #+# #
# Updated: 2023/08/18 15:58:15 by otietz ### ########.fr #
# #
# **************************************************************************** #
NAME = minishell
COMP = cc
CFLAGS = -Wall -Werror -Wextra -Ilibft -g
# Add -lncurses after $(OBJS) to ensure proper linking
LDFLAGS = -Llibft -l:libft.a -lreadline -lncurses
SRCS = src/main.c \
src/exec/exec.c \
src/utils/ft_lst_remove.c \
src/exec/internal_command.c \
src/utils/ft_strtok.c \
src/utils/signals.c \
src/utils/data.c \
src/utils/get_env_var_value.c \
src/utils/ft_cd.c \
src/utils/ft_echo.c \
src/utils/ft_pwd.c \
src/utils/ft_unset.c \
src/utils/ft_env.c \
src/utils/ft_export.c \
src/utils/ft_exit.c \
src/parser/tokenize.c \
src/parser/expand.c \
src/parser/parser_utils.c \
src/parser/parse.c \
src/utils/cmdlist.c \
src/utils/execlist.c \
src/utils/utils1.c \
src/utils/env_vars.c \
src/utils/ft_isnum.c \
src/utils/exit_error.c \
src/parser/parse1.c \
src/parser/check_redirects.c \
src/parser/fillredirects.c \
src/exec/executor.c \
src/utils/error.c \
src/exec/heredoc.c \
src/exec/builtin.c \
src/exec/executor_2.c \
src/parser/tokenize_1.c
libft = ./libft/libft.a
OBJS = $(SRCS:.c=.o)
$(NAME): $(libft) $(OBJS)
$(COMP) $(CFLAGS) $(OBJS) -o $(NAME) $(LDFLAGS)
$(libft):
make -C libft && make bonus -C libft
all: $(NAME)
clean:
rm -f $(OBJS) && make -C libft clean
fclean: clean
rm -f $(NAME) && make -C libft fclean
re: fclean all