-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·125 lines (96 loc) · 2.48 KB
/
Makefile
File metadata and controls
executable file
·125 lines (96 loc) · 2.48 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: sminot <simeon.minot@outlook.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/10/16 14:53:08 by sminot #+# #+# #
# Updated: 2025/02/21 19:24:50 by sminot ### ########.fr #
# #
# **************************************************************************** #
NAME = libft.a
CHAR_DIR = src/char/
CHAR = ft_isalpha.c\
ft_isalnum.c\
ft_isascii.c\
ft_isdigit.c\
ft_isprint.c\
ft_isspace.c\
ft_toupper.c\
ft_tolower.c\
INT_DIR = src/int/
INT = ft_atoi.c\
ft_itoa.c\
LST_DIR = src/lst/
LST = ft_lstnew.c\
ft_lstadd_front.c\
ft_lstsize.c\
ft_lstlast.c\
ft_lstadd_back.c\
ft_lstdelone.c\
ft_lstclear.c\
ft_lstiter.c\
ft_lstmap.c\
MEM_DIR = src/mem/
MEM = ft_bzero.c\
ft_calloc.c\
ft_memchr.c\
ft_memcmp.c\
ft_memcpy.c\
ft_memmove.c\
ft_memset.c\
PUT_DIR = src/put/
PUT = putchar_fd.c\
putstr_fd.c\
putnbr_fd.c\
putendl_fd.c\
ft_printf.c\
STR_DIR = src/str/
STR = ft_split.c\
ft_strchr.c\
ft_strdup.c\
ft_striteri.c\
ft_strjoin.c\
ft_strlcat.c\
ft_strlcpy.c\
ft_strlen.c\
ft_strmapi.c\
ft_strcmp.c\
ft_strndup.c\
ft_strncmp.c\
ft_strnstr.c\
ft_strrchr.c\
ft_strtrim.c\
ft_substr.c\
str_append.c\
GNL_DIR = src/gnl/
GNL = get_next_line.c\
get_next_line_utils.c\
FILE = $(addprefix $(CHAR_DIR), $(CHAR))\
$(addprefix $(INT_DIR), $(INT))\
$(addprefix $(MEM_DIR), $(MEM))\
$(addprefix $(PUT_DIR), $(PUT))\
$(addprefix $(STR_DIR), $(STR))\
$(addprefix $(GNL_DIR), $(GNL))\
$(addprefix $(LST_DIR), $(LST))\
OBJ_DIR = obj
OBJ = $(addprefix $(OBJ_DIR)/, $(FILE:.c=.o))
DEPS= $(addprefix $(OBJ_DIR)/, $(FILE:.c=.d))
CC = cc
CFLAGS = -Wall -Wextra -Werror -I$(INCLUDE) -MMD
INCLUDE = include
AR = ar -rsc
$(OBJ_DIR)/%.o : %.c
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) -c $< -o $@
all : $(NAME)
$(NAME) : $(OBJ)
$(AR) $(NAME) $(OBJ)
clean :
rm -rf $(OBJ_DIR)
fclean : clean
rm -f $(NAME)
re : fclean all
-include $(DEPS)
.PHONY : all, clean, fclean, re