notmuch search: Add (relative) date to search output
[notmuch] / Makefile
1 PROGS=notmuch
2
3 WARN_FLAGS=-Wall -Wextra -Wmissing-declarations -Wwrite-strings -Wswitch-enum
4
5 CDEPENDS_FLAGS=`pkg-config --cflags glib-2.0 gmime-2.4 talloc`
6 CXXDEPENDS_FLAGS=$(CDEPENDS_FLAGS) `xapian-config --cxxflags`
7
8 MYCFLAGS=$(WARN_FLAGS) -O0 -g $(CDEPENDS_FLAGS)
9 MYCXXFLAGS=$(WARN_FLAGS) -O0 -g $(CXXDEPENDS_FLAGS)
10
11 MYLDFLAGS=`pkg-config --libs glib-2.0 gmime-2.4 talloc` `xapian-config --libs`
12
13 LIBRARY=                \
14         database.o      \
15         date.o          \
16         index.o         \
17         libsha1.o       \
18         message.o       \
19         message-file.o  \
20         query.o         \
21         sha1.o          \
22         tags.o          \
23         thread.o        \
24         xutil.o
25
26 MAIN=                   \
27         notmuch.o
28
29 all: $(PROGS)
30
31 %.o: %.cc
32         $(CXX) -c $(CFLAGS) $(CXXFLAGS) $(MYCXXFLAGS) $< -o $@
33
34 %.o: %.c
35         $(CC) -c $(CFLAGS) $(MYCFLAGS) $< -o $@
36
37 notmuch: $(MAIN) $(LIBRARY)
38         $(CC) $(MYLDFLAGS) $^ -o $@
39
40 Makefile.dep: *.c *.cc
41         $(CXX) -M $(CPPFLAGS) $(CDEPENDS_FLAGS) $(CXXDEPENDS_FLAGS) $^ > $@
42 -include Makefile.dep
43
44 clean:
45         rm -f $(PROGS) *.o Makefile.dep