-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (57 loc) · 1.9 KB
/
Makefile
File metadata and controls
67 lines (57 loc) · 1.9 KB
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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: semin <semin@student.42seoul.kr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/01/11 12:49:29 by soum #+# #+# #
# Updated: 2022/02/14 01:10:29 by semin ### ########.fr #
# #
# **************************************************************************** #
NAME = minishell
SRCS = main.c \
src/init_shell.c \
src/prompt.c \
src/check_cmd.c \
src/parsing_cmd.c \
src/error.c \
src/free_list.c \
src/execute.c \
src/env.c \
src/env_util.c \
src/unset.c \
src/export.c \
src/exit.c \
src/cd.c \
src/pipe.c \
src/redirection.c \
src/parsing_util.c \
src/rd_util.c \
src/util.c \
src/reparsing_cmd.c \
src/quote.c \
src/quote_split.c \
src/echo.c \
src/heredoc.c \
LIBFT = libft
LIBFT_LIB = Libft/libft.a
INCLUDES = ./includes/minishell.h
CC = gcc
CFLAGES = -Wall -Wextra -Werror
COMFILE_FLAGS = -lreadline -L/opt/homebrew/opt/readline/lib
OBJ_FLAGS = -I/opt/homebrew/opt/readline/include
.c.o :
$(CC) $(CFLAGES) $(OBJ_FLAGS) -c $< -o $(<:.c=.o) -I $(INCLUDES)
OBJS = $(SRCS:.c=.o)
all : $(NAME)
$(NAME) : $(OBJS)
make all -C $(LIBFT)/
$(CC) $(CFLAGES) $(OBJS) $(COMFILE_FLAGS) $(LIBFT_LIB) -o $(NAME)
re : fclean all
clean :
rm -f $(OBJS)
make clean -C $(LIBFT)
fclean : clean
rm -f $(NAME)
rm -f $(LIBFT_LIB)