X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=Makefile;h=13f2b28d3f4a2081f4fd1b2075ec5ad1fbea3290;hp=614c57600917cc6e25559ee7147962f8e6460a37;hb=ef944693c354eb1e7ec6c578a0f4c14616fc6d60;hpb=11f99eb8eac3206f200a40a536ff3657ba577594 diff --git a/Makefile b/Makefile index 614c5760..13f2b28d 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,35 @@ -PROGS=g_mime_test xapian-dump +PROGS=notmuch -MYCFLAGS=-Wall -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) -g_mime_test: g_mime_test.c - $(CC) $(CFLAGS) $(MYCFLAGS) 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: $(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