-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
151 lines (135 loc) · 3.45 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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: scambier <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/11/08 17:06:10 by scambier #+# #+# #
# Updated: 2024/12/05 16:33:21 by scambier ### ########.fr #
# #
# **************************************************************************** #
#=== CONFIG ===
NAME = libft.a
SRC = \
char/ft_isalpha.c\
char/ft_isdigit.c\
char/ft_isalnum.c\
char/ft_isascii.c\
char/ft_isprint.c\
char/ft_toupper.c\
char/ft_tolower.c\
mem/ft_memset.c\
mem/ft_bzero.c\
mem/ft_memcpy.c\
mem/ft_memmove.c\
mem/ft_memchr.c\
mem/ft_memcmp.c\
mem/ft_calloc.c\
mem/ft_pmem.c\
mem/ft_memdup.c\
mem/ft_memcat.c\
str/ft_strlen.c\
str/ft_strlcpy.c\
str/ft_strlcat.c\
str/ft_strchr.c\
str/ft_strchrf.c\
str/ft_strrchr.c\
str/ft_strncmp.c\
str/ft_strnstr.c\
str/ft_strnset.c\
str/ft_atoi.c\
str/ft_atoi_strict.c\
str/ft_strdup.c\
str/ft_substr.c\
str/ft_strjoin.c\
str/ft_strsjoin.c\
str/ft_strtrim.c\
str/ft_split.c\
str/ft_splitf.c\
str/ft_itoa.c\
str/ft_itoa_base.c\
str/ft_strmapi.c\
str/ft_striteri.c\
str/ft_strarrfree.c\
str/ft_strarrlen.c\
str/ft_strchri.c\
str/ft_atoi_base.c\
str/ft_strcat.c\
str/ft_strrep.c\
lst/ft_lstnew.c\
lst/ft_lstadd_front.c\
lst/ft_lstsize.c\
lst/ft_lstlast.c\
lst/ft_lstadd_back.c\
lst/ft_lstdelone.c\
lst/ft_lstclear.c\
lst/ft_lstiter.c\
lst/ft_lstmap.c\
lst/ft_lstexport.c\
stream/get_next_line.c\
stream/ft_putnbr_fd.c\
stream/ft_putstr_fd.c\
stream/ft_putchar_fd.c\
stream/ft_putnbr_base_fd.c\
stream/ft_get_file.c\
stream/ft_bindump.c\
stream/ft_hexdump.c\
math/ft_min.c\
math/ft_max.c\
math/ft_abs.c\
math/ft_clamp.c\
math/ft_fmin.c\
math/ft_fmax.c\
math/ft_fabs.c\
math/ft_fclamp.c\
printf/putters0.c\
printf/ft_sprintf.c\
printf/ft_fprintf.c\
printf/ft_printf.c\
bst/ft_bst_fetch.c\
bst/ft_bst_getvar.c\
bst/ft_bst_print.c\
bst/ft_var_free.c\
bst/ft_bst_free.c\
bst/ft_bst_new.c\
bst/ft_bst_setvar.c\
bst/ft_var_new.c\
bst/ft_bst_size.c\
bst/ft_bst_export.c\
bst/ft_bst_find_min.c\
bst/ft_bst_remove.c\
bst/ft_bst_find.c\
bit/ft_bit_get.c\
bit/ft_bit_set.c\
bit/ft_bit_invert.c\
strbuilder/ft_strbuilder_new.c\
strbuilder/ft_strbuilder_free.c\
strbuilder/ft_strbuilder_addraw.c\
strbuilder/ft_strbuilder_addchar.c\
strbuilder/ft_strbuilder_addstr.c\
strbuilder/ft_strbuilder_len.c\
strbuilder/ft_strbuilder_build.c\
strbuilder/ft_strbuilder_last.c\
strbuilder/ft_strbuilder_setchars.c\
OBJ_DIR = obj
CFLAGS = -Wall -Werror -Wextra -g3
#=== AUTOMATIC VARS ===
OBJ = $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(basename $(SRC))))
#=== TARGETS ===
default : all
all : $(NAME)
$(OBJ_DIR)/%.o : %.c
@mkdir -p $(dir $@)
cc $(CFLAGS) -o $@ -c $< -I.
$(NAME) : $(OBJ)
ar rc $(NAME) $(OBJ)
clean :
rm -rf $(OBJ_DIR) || true
fclean : clean
rm $(NAME) || true
re : fclean all
test : all
cc main.c -g3 -c
cc main.o -L. -lft
.PHONY : re fclean clean all default