在Makefile中插入如下代码:
include $(sources:.c=.d) %.d: %.c set -e; rm -f $@; $(CC) -MM $(CPPFLAGS) $< > $@.$$$$; sed 's,($*).o[ :]*,1.o $@ : ,g' < $@.$$$$ > $@; rm -f $@.$$$$