]> git.notmuchmail.org Git - notmuch/blobdiff - Makefile
notmuch: Revamp help message a bit.
[notmuch] / Makefile
index 614c57600917cc6e25559ee7147962f8e6460a37..7c15d6c1f0a5b7c88136bcdb7f6e1dc84cc2b44d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,20 @@
-PROGS=g_mime_test xapian-dump
+PROGS=notmuch
 
-MYCFLAGS=-Wall
-MYCXXFLAGS=-Wall
+MYCFLAGS=-Wall -O0 -g `pkg-config --cflags glib-2.0`
+MYCXXFLAGS=$(MYCFLAGS) `xapian-config --cxxflags`
+
+MYLDFLAGS=`pkg-config --libs glib-2.0` `xapian-config --libs`
 
 all: $(PROGS)
 
-g_mime_test: g_mime_test.c
-       $(CC) $(CFLAGS) $(MYCFLAGS) g_mime_test.c `pkg-config --cflags --libs gmime-2.4` -o g_mime_test
+%.o: %.cc
+       $(CXX) -c $(CXXFLAGS) $(MYCXXFLAGS) $^ -o $@
+
+%.o: %.c
+       $(CC) -c $(CFLAGS) $(MYCFLAGS) $^ -o $@
 
-xapian-dump: xapian-dump.cc
-       $(CXX) $(CXXFLAGS) $(MYCXXFLAGS) xapian-dump.cc `xapian-config --libs --cxxflags` -o xapian-dump
+notmuch: notmuch.o database.o date.o message.o xutil.o
+       $(CC) $(MYLDFLAGS) $^ -o $@
 
 clean:
-       rm -f $(PROGS)
+       rm -f $(PROGS) *.o