]> git.notmuchmail.org Git - notmuch/blob - Makefile
results_get: Fix to return NULL if past the end of the results
[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 talloc`
6 CXXDEPENDS_FLAGS=`pkg-config --cflags glib-2.0 talloc` `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 talloc` `xapian-config --libs`
12
13 MODULES=                \
14         notmuch.o       \
15         database.o      \
16         date.o          \
17         message.o       \
18         message-file.o  \
19         query.o         \
20         sha1.o          \
21         thread.o        \
22         libsha1.o       \
23         xutil.o
24
25 all: $(PROGS)
26
27 %.o: %.cc
28         $(CXX) -c $(CFLAGS) $(CXXFLAGS) $(MYCXXFLAGS) $< -o $@
29
30 %.o: %.c
31         $(CC) -c $(CFLAGS) $(MYCFLAGS) $< -o $@
32
33 notmuch: $(MODULES)
34         $(CC) $(MYLDFLAGS) $^ -o $@
35
36 Makefile.dep: *.c *.cc
37         $(CXX) -M $(CPPFLAGS) $(CDEPENDS_FLAGS) $(CXXDEPENDS_FLAGS) $^ > $@
38 -include Makefile.dep
39
40 clean:
41         rm -f $(PROGS) *.o Makefile.dep