X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=Makefile;h=7c15d6c1f0a5b7c88136bcdb7f6e1dc84cc2b44d;hp=c1fbd2a19bcc2d6f09c67677b25073660fb6009f;hb=5f8d44fa5b2d308b76f6942852d44c9e7ead4005;hpb=36640b303ea68ae28e89f27694356141f515819b diff --git a/Makefile b/Makefile index c1fbd2a1..7c15d6c1 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,20 @@ -PROGS=notmuch notmuch-index-message xapian-dump +PROGS=notmuch -MYCFLAGS=-Wall -O0 -g -MYCXXFLAGS=-Wall -O0 -g +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) -notmuch: notmuch.c - $(CC) $(CFLAGS) $(MYCFLAGS) notmuch.c `pkg-config --cflags --libs glib-2.0` -o notmuch +%.o: %.cc + $(CXX) -c $(CXXFLAGS) $(MYCXXFLAGS) $^ -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 +%.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