From: Carl Worth Date: Tue, 20 Oct 2009 22:08:03 +0000 (-0700) Subject: Makefile: Add automatic dependency tracking to the Makefile. X-Git-Tag: 0.1~810 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=00af443b8e5814f26c87c7cd8db1a08fec71e0b3;p=notmuch.git Makefile: Add automatic dependency tracking to the Makefile. With this, I really don't miss anything from automake. --- diff --git a/Makefile b/Makefile index 7c15d6c1..86516402 100644 --- a/Makefile +++ b/Makefile @@ -8,13 +8,17 @@ MYLDFLAGS=`pkg-config --libs glib-2.0` `xapian-config --libs` all: $(PROGS) %.o: %.cc - $(CXX) -c $(CXXFLAGS) $(MYCXXFLAGS) $^ -o $@ + $(CXX) -c $(CXXFLAGS) $(MYCXXFLAGS) $< -o $@ %.o: %.c - $(CC) -c $(CFLAGS) $(MYCFLAGS) $^ -o $@ + $(CC) -c $(CFLAGS) $(MYCFLAGS) $< -o $@ notmuch: notmuch.o database.o date.o message.o xutil.o $(CC) $(MYLDFLAGS) $^ -o $@ +Makefile.dep: *.c *.cc + $(CC) -M $(CPPFLAGS) $(MYCFLAGS) $^ > $@ +-include Makefile.dep + clean: - rm -f $(PROGS) *.o + rm -f $(PROGS) *.o Makefile.dep