-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
134 lines (95 loc) · 3.75 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: ngoulios <ngoulios@student.hive.fi> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/04/27 23:49:21 by ngoulios #+# #+# #
# Updated: 2024/11/15 23:02:58 by ngoulios ### ########.fr #
# #
# **************************************************************************** #
NAME = libft.a
CC = cc
CFLAGS = -Wall -Wextra -Werror -I./
# **************************************************************************** #
# Source Files #
# **************************************************************************** #
SRC_CTYPE = ctype/ft_isalnum.c \
ctype/ft_isalpha.c \
ctype/ft_isascii.c \
ctype/ft_isdigit.c \
ctype/ft_isprint.c \
ctype/ft_tolower.c \
ctype/ft_isspace.c \
ctype/ft_toupper.c
SRC_MEMORY = memory/ft_memset.c \
memory/ft_memcpy.c \
memory/ft_memmove.c \
memory/ft_memcmp.c \
memory/ft_memchr.c \
memory/ft_memdel.c \
memory/ft_bzero.c \
memory/ft_calloc.c
SRC_STRING = string/ft_strlen.c \
string/ft_strncmp.c \
string/ft_strnstr.c \
string/ft_strdup.c \
string/ft_strchr.c \
string/ft_strlcpy.c \
string/ft_strlcat.c \
string/ft_strjoin.c \
string/ft_split.c \
string/ft_strtrim.c \
string/ft_substr.c \
string/ft_strmapi.c \
string/ft_strrchr.c \
string/ft_striteri.c \
string/ft_atof.c \
string/ft_strcmp.c \
string/ft_strlower.c \
string/ft_strndup.c \
string/ft_strupper.c \
string/ft_strrev.c \
string/ft_strdel.c
SRC_MATH = math/ft_atoi.c \
math/ft_itoa.c \
math/ft_atol.c
SRC_OUTPUT = output/ft_putchar_fd.c \
output/ft_putstr_fd.c \
output/ft_putendl_fd.c \
output/ft_putnbr_fd.c \
output/ft_printf.c \
output/ft_putaddress.c \
output/ft_puthexa.c \
output/ft_putchar.c \
output/ft_putnbr.c \
output/ft_putstr.c \
output/ft_putunsigned.c
SRC_LIST = list/ft_lstnew_bonus.c \
list/ft_lstadd_front_bonus.c \
list/ft_lstsize_bonus.c \
list/ft_lstlast_bonus.c \
list/ft_lstadd_back_bonus.c \
list/ft_lstdelone_bonus.c \
list/ft_lstclear_bonus.c \
list/ft_lstiter_bonus.c \
list/ft_lstmap_bonus.c
SRC_GNL = gnl/get_next_line.c
SRCS = $(SRC_CTYPE) $(SRC_MEMORY) $(SRC_STRING) $(SRC_MATH) $(SRC_OUTPUT) $(SRC_LIST) $(SRC_GNL)
OBJS = $(SRCS:.c=.o)
HEADER = libft.h
# **************************************************************************** #
# Makefile Rules #
# **************************************************************************** #
all: $(NAME)
$(NAME): $(OBJS)
ar rcs $(NAME) $(OBJS)
%.o: %.c $(HEADER)
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJS)
fclean: clean
rm -f $(NAME)
re: fclean all
.PHONY: all clean fclean re