From 5f4e21ed3a97063c917d7f9ff406548b7e873ddd Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 28 Feb 2021 17:02:08 -0800 Subject: [PATCH] Fix dependency file trying to be made for SRB2.res and not for interface/blua/hardware files --- src/Makefile | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 260175a69..471c55ed3 100644 --- a/src/Makefile +++ b/src/Makefile @@ -554,7 +554,7 @@ OBJS:=$(i_main_o) \ $(i_sound_o) \ $(OBJS) -DEPS:=$(patsubst $(OBJDIR)/%.o,$(DEPDIR)/%.d,$(OBJS)) +DEPS:=$(patsubst $(OBJDIR)/%.o,$(DEPDIR)/%.d,$(filter %.o,$(OBJS))) OBJS+=$(OBJDIR)/comptime.o ifndef SILENT @@ -688,14 +688,33 @@ $(call print,Checking dependency files...) endif endif -$(DEPDIR)/%.d: %.c +undefine deps_rule + # windows makes it too hard ! ifndef WINDOWSHELL ifdef echoName +define deps_rule = @printf "%-20.20s\r" $< + +endef endif endif + +define deps_rule += $(CC) $(CFLAGS) -M -MF $@ -MT $(OBJDIR)/$< $< +endef + +$(DEPDIR)/%.d: %.c + $(deps_rule) + +$(DEPDIR)/%.d: $(INTERFACE)/%.c + $(deps_rule) + +$(DEPDIR)/%.d: hardware/%.c + $(deps_rule) + +$(DEPDIR)/%.d: blua/%.c + $(deps_rule) ifdef VALGRIND $(OBJDIR)/z_zone.o: z_zone.c