-all: $(PROGS)
-
-%.o: %.cc
- $(CXX) -c $(CXXFLAGS) $(MYCXXFLAGS) $^ -o $@
-
-%.o: %.c
- $(CC) -c $(CFLAGS) $(MYCFLAGS) $^ -o $@
-
-notmuch: notmuch.o database.o date.o message.o xutil.o
- $(CC) $(MYLDFLAGS) $^ -o $@
-
-notmuch-index-message: notmuch-index-message.cc
- $(CXX) $(CXXFLAGS) $(MYCXXFLAGS) notmuch-index-message.cc `pkg-config --cflags --libs gmime-2.4` `xapian-config --cxxflags --libs` -o notmuch-index-message
-
-xapian-dump: xapian-dump.cc
- $(CXX) $(CXXFLAGS) $(MYCXXFLAGS) xapian-dump.cc `xapian-config --libs --cxxflags` -o xapian-dump
-
-clean:
- rm -f $(PROGS) *.o
+# Finally, include all of the Makefile.local fragments where all the
+# real work is done.
+include Makefile.local $(subdirs:%=%/Makefile.local)