X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=Makefile;h=ff654e11e7944624d55aaa3ab86c98028f35bfe3;hp=0f50a434d22379f8c49a6a69a3cd5946e715bb95;hb=466a7bbf620e4bf1b57097a6d3c474159c475b6d;hpb=7d0886352cff30c5d79155d144f8ef2384b38829 diff --git a/Makefile b/Makefile index 0f50a434..ff654e11 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,24 @@ -PROGS=g_mime_test +PROGS=notmuch + +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) -g_mime_test: g_mime_test.c - $(CC) 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 $@ + +notmuch: notmuch.o database.o date.o message.o message-file.o query.o xutil.o + $(CC) $(MYLDFLAGS) $^ -o $@ + +Makefile.dep: *.c *.cc + $(CC) -M $(CPPFLAGS) $(MYCFLAGS) $^ > $@ +-include Makefile.dep clean: - rm -f $(PROGS) + rm -f $(PROGS) *.o Makefile.dep