X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=Makefile;h=13f2b28d3f4a2081f4fd1b2075ec5ad1fbea3290;hp=bf3a5200ff74b99e47c94e0b674c762c3294b2e1;hb=ef944693c354eb1e7ec6c578a0f4c14616fc6d60;hpb=c55c34f4a08829c2734168a912c0ad371b934d30 diff --git a/Makefile b/Makefile index bf3a5200..13f2b28d 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,35 @@ -PROGS=notmuch-index-message xapian-dump +PROGS=notmuch -MYCXXFLAGS=-Wall +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` + +MODULES= \ + notmuch.o \ + database.o \ + date.o \ + message.o \ + message-file.o \ + query.o \ + sha1.o \ + libsha1.o \ + xutil.o 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: $(MODULES) + $(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