aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-04-07 17:05:42 -0700
committerMichael Forney <mforney@mforney.org>2019-04-07 17:05:42 -0700
commitdf9d6fff44ac36fb7f24995494ae46d102a57e7c (patch)
tree899e44d225454cc3304c0cf16a2703e0c17886e7 /Makefile
parente6c8bdd965806f2150a20b5cb7b73623a0ec8c83 (diff)
deps.mk: Include $(objdir) in target name
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 2345fa6..4477c66 100644
--- a/Makefile
+++ b/Makefile
@@ -85,5 +85,5 @@ clean:
rm -rf cc $(DRIVER_OBJ) cc-qbe $(OBJ) stage2 stage3
deps.mk: $(DRIVER_SRC) $(SRC) config.h
- $(CC) $(CFLAGS) -MM $(DRIVER_SRC) $(SRC) >$@
+ for src in $(DRIVER_SRC) $(SRC); do $(CC) $(CFLAGS) -MM -MT "\$$(objdir)/$${src%.c}.o" "$$src"; done >$@
-include deps.mk