aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-10-20 15:08:03 -0700
committerGravatar Carl Worth <cworth@cworth.org>2009-10-20 15:09:18 -0700
commit00af443b8e5814f26c87c7cd8db1a08fec71e0b3 (patch)
tree86fa7848237584017ff1e4a88c86430c4ca4ac1c /Makefile
parent28fa0bc2d686761f50f5bd6782b81000c45ee0c4 (diff)
Makefile: Add automatic dependency tracking to the Makefile.
With this, I really don't miss anything from automake.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files 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