3 WARN_FLAGS=-Wall -Wextra -Wmissing-declarations -Wwrite-strings -Wswitch-enum
5 NOTMUCH_DEPENDS_FLAGS=`pkg-config --cflags glib-2.0 gmime-2.4 talloc`
6 NOTMUCH_CXX_DEPENDS_FLAGS=$(NOTMUCH_DEPENDS_FLAGS) `xapian-config --cxxflags`
8 NOTMUCH_CFLAGS=$(WARN_FLAGS) -O0 -g $(NOTMUCH_DEPENDS_FLAGS)
9 NOTMUCH_CXXFLAGS=$(WARN_FLAGS) -O0 -g $(NOTMUCH_CXX_DEPENDS_FLAGS)
11 NOTMUCH_LDFLAGS=`pkg-config --libs glib-2.0 gmime-2.4 talloc` \
12 `xapian-config --libs`
32 $(CXX) -c $(CFLAGS) $(CXXFLAGS) $(NOTMUCH_CXXFLAGS) $< -o $@
35 $(CC) -c $(CFLAGS) $(NOTMUCH_CFLAGS) $< -o $@
37 notmuch: $(MAIN) $(LIBRARY)
38 $(CC) $(NOTMUCH_LDFLAGS) $^ -o $@
40 Makefile.dep: *.c *.cc
41 $(CXX) -M $(CPPFLAGS) $(NOTMUCH_DEPENDS_FLAGS) \
42 $(NOTMUCH_CXX_DEPENDS_FLAGS) $^ > $@
46 gzip --stdout notmuch.1 > notmuch.1.gz
49 install -C -D notmuch $(DESTDIR)/usr/bin/notmuch
50 install -C -D notmuch.1.gz $(DESTDIR)/usr/share/man/man1
51 install -C -D notmuch-completion.bash \
52 $(DESTDIR)/etc/bash_completion.d/notmuch
55 rm -f $(PROGS) *.o Makefile.dep