X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=Makefile;h=ff654e11e7944624d55aaa3ab86c98028f35bfe3;hp=17f29fb1960c202e00c56d70d1b65586340a5ed5;hb=d29a6ec79167e87e4958d9500956668c430db4c6;hpb=a2c467242ac646bb16638906dec1bd075e098674 diff --git a/Makefile b/Makefile index 17f29fb1..ff654e11 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,24 @@ -PROGS=notmuch-index-message xapian-dump +PROGS=notmuch -MYCXXFLAGS=-Wall -O0 -g +MYCFLAGS=-Wall -O0 -g `pkg-config --cflags glib-2.0 talloc` +MYCXXFLAGS=$(MYCFLAGS) `xapian-config --cxxflags` + +MYLDFLAGS=`pkg-config --libs glib-2.0 talloc` `xapian-config --libs` all: $(PROGS) -notmuch-index-message: notmuch-index-message.cc - $(CC) $(CXXFLAGS) $(MYCXXFLAGS) notmuch-index-message.cc `pkg-config --cflags --libs gmime-2.4` `xapian-config --cxxflags --libs` -o notmuch-index-message +%.o: %.cc + $(CXX) -c $(CXXFLAGS) $(MYCXXFLAGS) $< -o $@ + +%.o: %.c + $(CC) -c $(CFLAGS) $(MYCFLAGS) $< -o $@ + +notmuch: notmuch.o database.o date.o message.o message-file.o query.o xutil.o + $(CC) $(MYLDFLAGS) $^ -o $@ -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) + rm -f $(PROGS) *.o Makefile.dep