-# Filter all other driver objects out of each driver's link commands.
-$(foreach drv,$(DRIVERS),\
-$(eval $(drv)SRC := $(patsubst %.c,%.o,$(filter-out $(patsubst %,src/%.c,$(filter-out $(drv),$(DRIVERS))),$(cSRC) $(cGEN))))\
-$(eval $(drv)-dSRC := $(patsubst %.o,%-d.o,$($(drv)SRC))))
+# Determine binary/ir targets (object files and driver binaries)
+cTRG := $(patsubst %.c,%.o,$(cSRC) $(cGEN))
+ldSRC := $(filter-out $(DRIVERS:%=\%/%.o),$(cTRG))
+cTRG += $(cTRG:%.o=%-d.o)
+ldTRG := $(DRIVERS:%=%-d) $(DRIVERS)
+ldDEP = $(filter %/$1.o,$(cTRG)) $(if $(filter %-d,$1),$(ldSRC:%.o=%-d.o),$(ldSRC))
+
+# Determine if '1' is newer than '2'
+TSTAMP = $(if $(wildcard $1),$(shell stat -c %Y $1),0$(info nots: $1))
+NEWER = $(eval 4 := $(call TSTAMP,$(dir $2)$1))
+NEWER += $(eval 5 := $(call TSTAMP,$2))
+NEWER += $(if $(filter $5,$(firstword $(sort $4 $5))),$1,$2)