summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 0ba9cdee9..f6c20a681 100644
--- a/Makefile
+++ b/Makefile
@@ -113,7 +113,8 @@ $1_ASM_OBJS := $$(ASM_SRCS:%.s=build/$1/%.o)
$1_DATA_ASM_OBJS := $$(DATA_ASM_SRCS:%.s=build/$1/%.o)
ifeq ($$(NODEP),)
-build/$1/src/%.o: c_dep = $$(shell $$(SCANINC) src/**/$$(*F).c)
+build/$1/src/%.o: c_path = $$(*D)/$$(*F).c
+build/$1/src/%.o: c_dep = $$(shell $$(SCANINC) $$(wildcard $$(c_path:build/$1/=)))
build/$1/asm/%.o: asm_dep = $$(shell $$(SCANINC) asm/$$(*F).s)
build/$1/data/%.o: asm_dep = $$(shell $$(SCANINC) data/$$(*F).s)
endif