# and the -MM option will list all non-system dependencies.
#----------------------------------------------------------------------
%.d: %.c
- @rm -f $@
- @$(CC) -M $(CFLAGS) $< > $@.tmp && \
- sed $(QUOTE)s,\($*\)\.o[ :]*,\1.o $@ : ,g$(QUOTE) < $@.tmp > $@
- @rm -f $@.tmp
+ $(CC) -M $(CFLAGS) $< -MF $@ -MT $@ -MT $*.o
%.d: %.cpp
- @rm -f $@
- @$(CXX) -M $(CXXFLAGS) $< > $@.tmp && \
- sed $(QUOTE)s,\($*\)\.o[ :]*,\1.o $@ : ,g$(QUOTE) < $@.tmp > $@
- @rm -f $@.tmp
+ @$(CXX) -M $(CXXFLAGS) $< -MF $@ -MT $@ -MT $*.o
%.d: %.m
- @rm -f $@
- @$(CC) -M $(CFLAGS) $< > $@.tmp && \
- sed $(QUOTE)s,\($*\)\.o[ :]*,\1.o $@ : ,g$(QUOTE) < $@.tmp > $@
- @rm -f $@.tmp
+ @$(CC) -M $(CFLAGS) $< -MF $@ -MT $@ -MT $*.o
%.d: %.mm
- @rm -f $@
- @$(CXX) -M $(CXXFLAGS) $< > $@.tmp && \
- sed $(QUOTE)s,\($*\)\.o[ :]*,\1.o $@ : ,g$(QUOTE) < $@.tmp > $@
- @rm -f $@.tmp
+ @$(CXX) -M $(CXXFLAGS) $< -MF $@ -MT $@ -MT $*.o
#----------------------------------------------------------------------
# Include all of the makefiles for each source file so we don't have