use -o instead of -MF
Stefan Schuermans

Stefan Schuermans commited on 2017-09-24 09:32:18
Showing 1 changed files, with 2 additions and 2 deletions.

... ...
@@ -139,7 +139,7 @@ lib:
139 139
 	mkdir -p $@
140 140
 
141 141
 obj/%.d: src/%.c | obj
142
-	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -MM -MF $@ -MT $(@:.d=.o) $<
142
+	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -MM -MT $(@:.d=.o) -o $@ $<
143 143
 
144 144
 obj/%.o: src/%.c | obj
145 145
 	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -c -o $@ $<
... ...
@@ -169,7 +169,7 @@ examples/bin:
169 169
 	mkdir -p $@
170 170
 
171 171
 examples/obj/%.d: examples/src/%.c | examples/obj
172
-	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -MM -MF $@ -MT $(@:.d=.o) $<
172
+	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -MM -MT $(@:.d=.o) -o $@ $<
173 173
 
174 174
 examples/obj/%.o: examples/src/%.c | examples/obj
175 175
 	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -c -o $@ $<
176 176