6573f634b3b83ce04283fc49a2dd78d05fc16468
[notmuch] / Makefile.local
1 all: notmuch
2
3 notmuch_client_srcs =           \
4         notmuch.c               \
5         notmuch-config.c        \
6         notmuch-dump.c          \
7         notmuch-new.c           \
8         notmuch-reply.c         \
9         notmuch-restore.c       \
10         notmuch-search.c        \
11         notmuch-setup.c         \
12         notmuch-show.c          \
13         notmuch-tag.c           \
14         notmuch-time.c          \
15         gmime-filter-reply.c    \
16         query-string.c          \
17         show-message.c
18
19 notmuch_client_modules = $(notmuch_client_srcs:.c=.o)
20 notmuch: $(notmuch_client_modules) lib/notmuch.a
21         $(CC) $(LDFLAGS) $^ -o $@
22
23 notmuch.1.gz:
24         gzip --stdout notmuch.1 > notmuch.1.gz
25
26 install: all notmuch.1.gz
27         for d in $(DESTDIR)/usr/bin/ $(DESTDIR)/usr/share/man/man1 \
28                 $(DESTDIR)/etc/bash_completion.d/ ; \
29         do \
30                 install -C -d $$d ; \
31         done ;
32         install -C notmuch $(DESTDIR)/usr/bin/
33         install -C notmuch.1.gz $(DESTDIR)/usr/share/man/man1/
34         install -C notmuch-completion.bash \
35                 $(DESTDIR)/etc/bash_completion.d/notmuch
36
37 SRCS  := $(SRCS) $(notmuch_client_srcs)
38 CLEAN := $(CLEAN) notmuch $(notmuch_client_modules)