Commit a1a3560f authored by Nikita Akatyev's avatar Nikita Akatyev :speech_balloon:
Browse files

Merge depfile creation and compilation into one command

Also fixes target name mismatches caused by directory truncation.
parent 9ee9ac76
......@@ -117,8 +117,7 @@ $$(TARGET.$(1)): $$(OBJECTS.$(1)) | $$(DIRS.$(1))
$(LINKER) $(LDFLAGS) $$(OBJECTS.$(1)) -o $$@
$$(OBJDIR.$(1))/%.o: $$(SRCDIR.$(1))/%.c | $$(DIRS.$(1))
$(CC) $(CFLAGS.$(1)) -M -MP $$< >$$@.d
$(CC) $(CFLAGS.$(1)) -c $$< -o $$@
$(CC) $(CFLAGS.$(1)) -MD -MF $$@.d -MP -c $$< -o $$@
-include $$(SRCDEPS.$(1))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment