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