From: Lukas Jiriste Date: Wed, 27 Sep 2023 14:21:38 +0000 (+0200) Subject: Makefile now sets Libft submodule up for build and further work. X-Git-Url: https://git.ljiriste.work/?a=commitdiff_plain;h=e65d96fa28a1088fe15acd32d5af328842955598;p=42%2Fft_printf.git Makefile now sets Libft submodule up for build and further work. libft.a build and incorporation is now more reasonable. --- 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