libft.a build and incorporation is now more reasonable.
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 :
re : fclean
$(MAKE) all
+Libft/libft.h : get-Libft
+
+get-Libft :
+ git submodule update --init Libft
+ git -C ./Libft checkout no_crash
+
+
bonus : all