From e65d96fa28a1088fe15acd32d5af328842955598 Mon Sep 17 00:00:00 2001 From: Lukas Jiriste Date: Wed, 27 Sep 2023 16:21:38 +0200 Subject: [PATCH] Makefile now sets Libft submodule up for build and further work. libft.a build and incorporation is now more reasonable. --- Makefile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 23ac4cb..bdb342c 100644 --- a/Makefile +++ b/Makefile @@ -14,15 +14,14 @@ NAME = libftprintf.a all : $(NAME) -$(NAME) : $(OBJECTS) libft.a - mv libft.a $(NAME) +$(NAME) : $(OBJECTS) Libft/libft.a + cp Libft/libft.a $(NAME) $(AR) rcs $(NAME) $(OBJECTS) -libft.a : +Libft/libft.a : Libft/libft.h $(MAKE) -C ./Libft - cp ./Libft/$@ . -%.o : %.c +%.o : %.c Libft/libft.h $(CC) $(CFLAGS) -o $@ -c $< $(INCLUDE) clean : @@ -36,4 +35,11 @@ fclean : clean re : fclean $(MAKE) all +Libft/libft.h : get-Libft + +get-Libft : + git submodule update --init Libft + git -C ./Libft checkout no_crash + + bonus : all -- 2.30.2