feat: add header dependency tracking for programs

This commit is contained in:
2026-07-08 10:24:21 +02:00
parent 3a446bad00
commit 2ace2509be
25 changed files with 99 additions and 27 deletions
+4 -1
View File
@@ -97,7 +97,10 @@ $(LIBDIR)/include/%: $(SRCDIR)/%
$(OBJDIR)/%.o: $(SRCDIR)/%.c Makefile
@mkdir -p $(OBJDIR)
$(CC) $(CFLAGS) -c $< -o $@
$(CC) $(CFLAGS) -MMD -MP -c $< -o $@
clean:
rm -rf $(OBJDIR) $(TARGET_BIN) $(TARGET_LIB) $(LIBDIR)/include
# Auto-generated header dependency tracking (-MMD -MP).
-include $(BASE_OBJS:.o=.d)