Files
ft_malloc/libft/Makefile
2024-12-03 19:03:30 +01:00

97 lines
2.3 KiB
Makefile
Executable File

# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: tomoron <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/07/28 00:35:01 by tomoron #+# #+# #
# Updated: 2024/12/03 15:26:54 by tomoron ### ########.fr #
# #
# **************************************************************************** #
NAME = libft.a
CC = cc
SRCS = ft_atoi.c\
ft_bzero.c\
ft_calloc.c\
ft_isalnum.c\
ft_isalpha.c\
ft_isascii.c\
ft_isdigit.c\
ft_isprint.c\
ft_itoa.c\
ft_memchr.c\
ft_memcmp.c\
ft_memcpy.c\
ft_memmove.c\
ft_memset.c\
ft_putchar_fd.c\
ft_putendl_fd.c\
ft_putnbr_fd.c\
ft_putstr_fd.c\
ft_split.c\
ft_strchr.c\
ft_strdup.c\
ft_striteri.c\
ft_strjoin.c\
ft_strlcat.c\
ft_strlcpy.c\
ft_strlen.c\
ft_strmapi.c\
ft_strcmp.c\
ft_strnstr.c\
ft_strrchr.c\
ft_strisnbr.c\
ft_strtrim.c\
ft_substr.c\
ft_tolower.c\
ft_toupper.c\
ft_split_set.c\
ft_free_str_arr.c\
ft_set_color.c\
ft_isspace.c\
ft_str_is_only_char.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\
OBJS = $(SRCS:.c=.o)
OBJS_BONUS = $(SRCS_BONUS:.c=.o)
FLAGS = -Wall -Wextra -Werror -g
all: $(NAME)
$(NAME): ft_printf $(OBJS)
$(MAKE) --no-print-directory -C ./ft_printf
cp ./ft_printf/libftprintf.a $(NAME)
ar rcs $(NAME) $(OBJS)
.c.o:
$(CC) $(FLAGS) -c $< -o $@
bonus: $(OBJS) $(OBJS_BONUS)
ar rcs $(NAME) $(OBJS) $(OBJS_BONUS)
clean:
rm -f $(OBJS) $(OBJS_BONUS)
$(MAKE) --no-print-directory -C ./ft_printf fclean
fclean: clean
rm -f $(NAME)
re: fclean all
.PHONY: bonus so clean all re fclean