X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=Makefile;h=1737a32e61dee659c9568e657e7c33577f06166b;hp=b7ebfb816802cb4a4a1ff7ee3b2c0330a1fe33d2;hb=526b7144f7d692e04ce950dfa7d0ee1bdf792cdc;hpb=0e777a8f800af062aba39a95a003f3e1d8f33793 diff --git a/Makefile b/Makefile index b7ebfb81..1737a32e 100644 --- a/Makefile +++ b/Makefile @@ -1,26 +1,35 @@ -PROGS=notmuch notmuch-index-message xapian-dump +PROGS=notmuch -MYCFLAGS=-Wall -O0 -g `pkg-config --cflags glib-2.0` +MYCFLAGS=-Wall -O0 -g `pkg-config --cflags glib-2.0 talloc` MYCXXFLAGS=$(MYCFLAGS) `xapian-config --cxxflags` -MYLDFLAGS=`pkg-config --libs glib-2.0` `xapian-config --libs` +MYLDFLAGS=`pkg-config --libs glib-2.0 talloc` `xapian-config --libs` + +MODULES= \ + notmuch.o \ + database.o \ + date.o \ + message.o \ + message-file.o \ + query.o \ + sha1.o \ + libsha1.o \ + xutil.o all: $(PROGS) %.o: %.cc - $(CXX) -c $(CXXFLAGS) $(MYCXXFLAGS) $^ -o $@ + $(CXX) -c $(CFLAGS) $(CXXFLAGS) $(MYCXXFLAGS) $< -o $@ %.o: %.c - $(CC) -c $(CFLAGS) $(MYCFLAGS) $^ -o $@ + $(CC) -c $(CFLAGS) $(MYCFLAGS) $< -o $@ -notmuch: notmuch.o database.o message.o xutil.o +notmuch: $(MODULES) $(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 +Makefile.dep: *.c *.cc + $(CC) -M $(CPPFLAGS) $(MYCFLAGS) $^ > $@ +-include Makefile.dep clean: - rm -f $(PROGS) *.o + rm -f $(PROGS) *.o Makefile.dep