Add subprojects' inc dir as compilation prerequisite
authorLukas Jiriste <ljiriste@student.42prague.com>
Thu, 29 Feb 2024 09:38:34 +0000 (10:38 +0100)
committerLukas Jiriste <ljiriste@student.42prague.com>
Thu, 29 Feb 2024 09:38:34 +0000 (10:38 +0100)
This forces make to download the subproject headers that are necessary
for compiling the source files to object files.

Makefile

index 037c67320648d28b49ad11f1014ab23e126fda0e..554bc7d346621e7e6a139a5b337ecefbd39afc92 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -63,7 +63,7 @@ else
        $(MAKE) -C Libft
 endif
 
-%.o : %.c
+%.o : %.c | $(SUBINCDIR)
        $(CC) $(CFLAGS) -o $@ -c $< $(INCLUDE)
 
 %/inc :