Splitting test to work with bonuses

This commit is contained in:
Leonardo Algarra 2025-10-18 17:29:17 +02:00
parent 01072e0ae6
commit af6faffeb5
3 changed files with 187 additions and 23 deletions

View file

@ -6,7 +6,7 @@
# By: lalgarra <lalgarra@student.42madrid.com> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2025/10/15 18:42:55 by lalgarra #+# #+# #
# Updated: 2025/10/15 19:28:30 by lalgarra ### ########.fr #
# Updated: 2025/10/18 16:30:09 by lalgarra ### ########.fr #
# #
# **************************************************************************** #
@ -17,9 +17,11 @@ LIBDIR = ../repo_algarra
#LIBDIR = ../vogsphere_repo
SOURCES = test_printf.c
OBJECTS = $(SOURCES:.c=.o)
SRCBONUS = test_printf_bonus.c
OBJBONUS = $(SRCBONUS:.c=.o)
CFLAGS += -Wall -Wextra -Werror -g3 -iquote $(LIBDIR) -O0
$(NAME): $(OBJECTS) $(LIBDIR)/libftprintf.a
@ -28,16 +30,20 @@ $(NAME): $(OBJECTS) $(LIBDIR)/libftprintf.a
$(LIBDIR)/libftprintf.a:
$(MAKE) -C $(LIBDIR) all
bonus: $(OBJBONUS)
$(MAKE) -C $(LIBDIR) fclean bonus
$(CC) $(CFLAGS) $(OBJBONUS) -L$(LIBDIR) -lftprintf -o $@
.PHONY: clean fclean re
clean:
#removes objects (.o)#
rm -f $(OBJECTS)
rm -f $(OBJECTS) $(OBJBONUS)
$(MAKE) -C $(LIBDIR) clean
fclean: clean
#removes objects (.o) and library#
rm -f $(NAME)
rm -f $(NAME) bonus
$(MAKE) -C $(LIBDIR) fclean
all: $(NAME)