1
0

libft reformat

This commit is contained in:
Adam Joly
2024-02-04 15:11:02 +01:00
parent 6486eb4b3f
commit 45b737cf5f
64 changed files with 730 additions and 205 deletions

119
Makefile
View File

@ -3,87 +3,94 @@
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: adjoly <adjoly@student.42.fr> +#+ +:+ +#+ #
# By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/11/01 11:03:22 by adjoly #+# #+# #
# Updated: 2023/11/14 10:30:27 by adjoly ### ########.fr #
# Updated: 2024/02/04 15:03:34 by adjoly ### ########.fr #
# #
# **************************************************************************** #
NAME = libft.a
CC = clang
CC = cc
SRCS = ft_atoi.c \
ft_bzero.c \
ft_isalnum.c \
ft_isalpha.c \
ft_isascii.c \
ft_isdigit.c \
ft_isprint.c \
ft_putchar_fd.c \
ft_putnbr_fd.c \
ft_putstr_fd.c \
ft_strdup.c \
ft_memcpy.c \
ft_memset.c \
ft_memmove.c \
ft_strlcpy.c \
ft_strlen.c \
ft_substr.c \
ft_tolower.c \
ft_toupper.c \
ft_strlcat.c \
ft_strjoin.c \
ft_strncmp.c \
ft_itoa.c \
ft_calloc.c \
ft_memchr.c \
ft_memcmp.c \
ft_strchr.c \
ft_strrchr.c \
ft_strnstr.c \
ft_putendl_fd.c \
ft_strtrim.c \
ft_split.c \
ft_strmapi.c \
ft_striteri.c \
SRCS_BONUS= 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 \
SRCS = is/ft_isalnum.c \
is/ft_isalpha.c \
is/ft_isascii.c \
is/ft_isdigit.c \
is/ft_isprint.c \
lst/ft_lstadd_back.c \
lst/ft_lstadd_front.c \
lst/ft_lstclear.c \
lst/ft_lstdelone.c \
lst/ft_lstiter.c \
lst/ft_lstlast.c \
lst/ft_lstmap.c \
lst/ft_lstnew.c \
lst/ft_lstsize.c \
mem/ft_bzero.c \
mem/ft_calloc.c \
mem/ft_memchr.c \
mem/ft_memcmp.c \
mem/ft_memcpy.c \
mem/ft_memmove.c \
mem/ft_memset.c \
print/ft_putchar.c \
print/ft_putchar_fd.c \
print/ft_putendl_fd.c \
print/ft_putnbrbase.c \
print/ft_putnbrbase_fd.c \
print/ft_putnbr.c \
print/ft_putnbr_fd.c \
print/ft_putstr.c \
print/ft_putstr_fd.c \
str/ft_atoi.c \
str/ft_itoa.c \
str/ft_split.c \
str/ft_strchr.c \
str/ft_strdup.c \
str/ft_striteri.c \
str/ft_strjoin.c \
str/ft_strlcat.c \
str/ft_strlcpy.c \
str/ft_strlen.c \
str/ft_strmapi.c \
str/ft_strncmp.c \
str/ft_strnstr.c \
str/ft_strrchr.c \
str/ft_strtrim.c \
str/ft_substr.c \
str/ft_tolower.c \
str/ft_toupper.c \
OBJS = $(SRCS:.c=.o)
OBJS_BONUS = $(SRCS_BONUS:.c=.o)
FLAGS = -Werror -Wall -Wextra -g
FLAGS = -Werror -Wall -Wextra
HEADERS = libft.h
HEADER = libft.h
LIB = print/printf/libftprintf.a
$(NAME): $(OBJS)
make -C io/get_next_line/
make -C print/printf/
ar -rcs $(NAME) $(OBJS)
%.o: %.c
$(CC) $(FLAGS) -I $(HEADER) $< -c -o $@
$(CC) $(FLAGS) -I $(HEADERS) $< -c -o $@
all: $(NAME)
bonus: $(OBJS_BONUS)
ar -rcs $(NAME) $(OBJS_BONUS)
clean:
rm -f $(OBJS) $(OBJS_BONUS)
make -C io/get_next_line/ clean
make -C print/printf clean
rm -f $(OBJS)
fclean: clean
make -C io/get_next_line/ fclean
make -C print/printf/ fclean
rm -f $(NAME)
re: fclean all
.PHONY: clean all re fclean
.PHONY: clean all re fclean