Add Libft/Makefile as dependency for %.c compilation
authorLukáš Jiřiště <gymnazium.jiriste@gmail.com>
Sun, 14 Jan 2024 16:42:57 +0000 (17:42 +0100)
committerLukáš Jiřiště <gymnazium.jiriste@gmail.com>
Sun, 14 Jan 2024 16:42:57 +0000 (17:42 +0100)
Add Libft/Makefile as an order-only-prerequisite for %.c files so that
after cloning the repository the Libft submodule is downloaded. This is
needed because without the Libft headers some files cannot be compiled.

Makefile

index 4267c89c3a4c7f68519d32f95b47a19a53ca4668..25bf565e1d7e2cb8c93676b5e229582d32148a32 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -51,7 +51,7 @@ else
        $(MAKE) -C Libft
 endif
 
-%.o : %.c
+%.o : %.c | Libft/Makefile
        $(CC) $(CFLAGS) -o $@ -c $< $(INCLUDE)
 
 %/Makefile :