From 00af443b8e5814f26c87c7cd8db1a08fec71e0b3 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 20 Oct 2009 15:08:03 -0700 Subject: [PATCH] Makefile: Add automatic dependency tracking to the Makefile. With this, I really don't miss anything from automake. --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 -- 2.43.0