2023-11-03 16:21:15 +01:00
|
|
|
# **************************************************************************** #
|
|
|
|
# #
|
|
|
|
# ::: :::::::: #
|
|
|
|
# Makefile :+: :+: :+: #
|
|
|
|
# +:+ +:+ +:+ #
|
2024-02-04 15:11:02 +01:00
|
|
|
# By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ #
|
2023-11-03 16:21:15 +01:00
|
|
|
# +#+#+#+#+#+ +#+ #
|
|
|
|
# Created: 2023/11/01 11:03:22 by adjoly #+# #+# #
|
2024-02-08 17:08:24 +01:00
|
|
|
# Updated: 2024/02/08 16:49:00 by adjoly ### ########.fr #
|
2023-11-03 16:21:15 +01:00
|
|
|
# #
|
|
|
|
# **************************************************************************** #
|
|
|
|
|
|
|
|
NAME = libft.a
|
|
|
|
|
2024-02-04 15:11:02 +01:00
|
|
|
CC = cc
|
|
|
|
|
|
|
|
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 \
|
2024-02-08 17:08:24 +01:00
|
|
|
print/printf/ft_printf.c \
|
|
|
|
print/printf/ft_putchar.c \
|
|
|
|
print/printf/ft_putnbrbase.c \
|
|
|
|
print/printf/ft_putnbr.c \
|
|
|
|
print/printf/ft_putstr.c \
|
2023-11-11 18:45:48 +01:00
|
|
|
|
2023-11-03 16:21:15 +01:00
|
|
|
OBJS = $(SRCS:.c=.o)
|
|
|
|
|
2024-02-04 15:11:02 +01:00
|
|
|
FLAGS = -Werror -Wall -Wextra -g
|
2023-11-11 18:45:48 +01:00
|
|
|
|
2024-02-04 15:11:02 +01:00
|
|
|
HEADERS = libft.h
|
2023-11-03 16:21:15 +01:00
|
|
|
|
2024-02-04 15:26:48 +01:00
|
|
|
LIB = print/printf/libftprintf.a \
|
|
|
|
io/get_next_line/get_next_line.a
|
2023-11-03 16:21:15 +01:00
|
|
|
|
|
|
|
$(NAME): $(OBJS)
|
2024-02-04 15:11:02 +01:00
|
|
|
make -C io/get_next_line/
|
|
|
|
make -C print/printf/
|
2024-02-08 17:08:24 +01:00
|
|
|
ar -rcs $(NAME) $(OBJS) $(LIB)
|
2023-11-03 16:21:15 +01:00
|
|
|
|
|
|
|
%.o: %.c
|
2024-02-04 15:11:02 +01:00
|
|
|
$(CC) $(FLAGS) -I $(HEADERS) $< -c -o $@
|
2023-11-03 16:21:15 +01:00
|
|
|
|
|
|
|
all: $(NAME)
|
|
|
|
|
|
|
|
clean:
|
2024-02-04 15:11:02 +01:00
|
|
|
make -C io/get_next_line/ clean
|
|
|
|
make -C print/printf clean
|
|
|
|
rm -f $(OBJS)
|
2023-11-03 16:21:15 +01:00
|
|
|
|
|
|
|
fclean: clean
|
2024-02-04 15:11:02 +01:00
|
|
|
make -C io/get_next_line/ fclean
|
|
|
|
make -C print/printf/ fclean
|
2023-11-03 16:21:15 +01:00
|
|
|
rm -f $(NAME)
|
|
|
|
|
|
|
|
re: fclean all
|
|
|
|
|
2024-02-04 15:11:02 +01:00
|
|
|
.PHONY: clean all re fclean
|