-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
128 lines (119 loc) · 2.81 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: rle <rle@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2016/11/28 09:03:31 by rle #+# #+# #
# Updated: 2017/05/26 18:39:28 by rle ### ########.fr #
# #
# **************************************************************************** #
NAME = libft.a
OBJ = $(addprefix ./srcs/, \
$(addprefix libft/, \
$(addsuffix .o, \
ft_append_char \
ft_append_str \
ft_memset \
ft_bzero \
ft_memcpy \
ft_memccpy \
ft_memmove \
ft_memchr \
ft_memcmp \
ft_strlen \
ft_strdup \
ft_strncpy \
ft_strcpy \
ft_strcat \
ft_strncat \
ft_strlcat \
ft_strchr \
ft_strrchr \
ft_strstr \
ft_strnstr \
ft_strcmp \
ft_strncmp \
ft_atoi \
ft_isalpha \
ft_isdigit \
ft_isalnum \
ft_isascii \
ft_isprint \
ft_toupper \
ft_tolower \
ft_memalloc \
ft_memdel \
ft_strnew \
ft_strdel \
ft_strclr \
ft_striter \
ft_striteri \
ft_strmap \
ft_strmapi \
ft_strequ \
ft_strnequ \
ft_strsub \
ft_strjoin \
ft_strtrim \
ft_strtrim \
ft_strsplit \
ft_strreplace \
ft_strswap \
ft_itoa \
ft_putchar \
ft_putstr \
ft_putendl \
ft_putnbr \
ft_putchar_fd \
ft_putstr_fd \
ft_putendl_fd \
ft_putnbr_fd \
ft_strrev \
ft_lstnew \
ft_lstdelone \
ft_lstadd \
ft_lstdel \
ft_lstiter \
ft_lstmap \
ft_wd_len \
ft_count_wds \
ft_int_length \
ft_strn_append \
ft_copystr \
ft_realloc \
get_next_line \
) \
) \
$(addprefix ft_printf/, \
$(addsuffix .o, \
ft_printf \
flags \
params \
size_converters \
write_hex \
hex_helpers \
write_int \
int_helpers \
write_octal \
octal_helpers \
write_unsigned_int \
unsigned_helpers \
write_ptr \
write_char \
write_string \
) \
) \
)
CC = @gcc -Wall -Werror -Wextra -I ./includes
all: $(NAME)
$(NAME): $(OBJ) $(LIB)
@ar rc $(NAME) $(OBJ)
@echo "\x1B[33mLibrary made"
%.o: %.c
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
clean:
@rm -f $(OBJ)
@rm -f $(NAME)
re: clean all