-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
76 lines (61 loc) · 2.09 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
76
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: lxu-wu <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/05/10 18:20:11 by lxu-wu #+# #+# #
# Updated: 2022/05/17 17:38:17 by jdecorte ### ########.fr #
# #
# **************************************************************************** #
#=======================================#
#[MINISHELL] Fonctions partie principale#
#=======================================#
SRCS = src/main.c\
\
common/builtins/rep.c\
common/builtins/echo.c\
common/builtins/env.c\
common/builtins/export.c\
common/builtins/unset.c\
common/builtins/utils.c\
\
libft/libft.a\
common/signal/*.c\
common/builtins/exit.c\
\
common/lst/*.c\
common/utils/*\
common/exec/*.c
#====#
#Tags#
#====#
NAME = minishell
CC = gcc
CFLAGS = -Wall -Wextra -Werror -lreadline -L/Users/$(USER)/.brew/opt/readline/lib -I/Users/$(USER)/.brew//opt/readline/include
OBJDIR = ./objs/
SRCDIR = ./src/
COMMONDIR = ./common/
INCLUDES = ./includes/
#=========#
#Commandes#
#=========#
${OBJDIR}%.o : ${SRCDIR}%.c
@gcc ${CFLAGS} -c $< -o $@ -I ${INCLUDES}
${OBJDIR}%.o : ${COMMONDIR}%.c
@gcc ${CFLAGS} -c $< -o $@ -I ${INCLUDES}
$(NAME) : ${OBJDIR}
make bonus -C libft
@gcc ${CFLAGS} ${SRCS} -o ${NAME}
${OBJDIR}:
@mkdir -p ${OBJDIR}
all : $(NAME)
clean :
make clean -C libft
rm -rf ${OBJDIR}
fclean : clean
make fclean -C libft
rm -f ${NAME}
re : fclean all
.PHONY : all clean fclean re