libft / Makefile 109 commits
14-04-2026
67 lines 1.1 kB
 1NAME		= libft.a
 2
 3CC			= cc
 4CFLAGS		= -Wall -Wextra -Werror
 5
 6SRCS		= ft_isalpha.c \
 7			  ft_isdigit.c \
 8			  ft_isalnum.c \
 9			  ft_isascii.c \
10			  ft_isprint.c \
11			  ft_strlen.c \
12			  ft_memset.c \
13			  ft_bzero.c \
14			  ft_memcpy.c \
15			  ft_memmove.c \
16			  ft_strlcpy.c \
17			  ft_strlcat.c \
18			  ft_toupper.c \
19			  ft_tolower.c \
20			  ft_strchr.c \
21			  ft_strrchr.c \
22			  ft_strncmp.c \
23			  ft_memchr.c \
24			  ft_memcmp.c \
25			  ft_strnstr.c \
26			  ft_atoi.c \
27			  ft_calloc.c \
28			  ft_strdup.c \
29			  ft_substr.c \
30			  ft_strjoin.c \
31			  ft_strtrim.c \
32			  ft_split.c \
33			  ft_itoa.c \
34			  ft_strmapi.c \
35			  ft_striteri.c \
36			  ft_putchar_fd.c \
37			  ft_putstr_fd.c \
38			  ft_putendl_fd.c \
39			  ft_putnbr_fd.c \
40			  ft_lstnew.c \
41			  ft_lstadd_front.c \
42			  ft_lstsize.c \
43			  ft_lstlast.c \
44			  ft_lstadd_back.c \
45			  ft_lstdelone.c \
46			  ft_lstclear.c \
47			  ft_lstiter.c \
48			  ft_lstmap.c
49OBJS		= $(SRCS:.c=.o)
50
51all: $(NAME)
52
53$(NAME): $(OBJS)
54	ar rcs $(NAME) $(OBJS)
55
56%.o: %.c
57	$(CC) $(CFLAGS) -c $< -o $@
58
59clean:
60	rm -f $(OBJS)
61
62fclean: clean
63	rm -f $(NAME)
64
65re: fclean all
66
67.PHONY: all clean fclean re