]> git.notmuchmail.org Git - notmuch/blob - Makefile.local
31ab534f82491f60b784ec872aaedf2206605b74
[notmuch] / Makefile.local
1 notmuch_client_srcs =           \
2         $(notmuch_compat_srcs)  \
3         debugger.c              \
4         gmime-filter-reply.c    \
5         notmuch.c               \
6         notmuch-config.c        \
7         notmuch-count.c         \
8         notmuch-dump.c          \
9         notmuch-new.c           \
10         notmuch-reply.c         \
11         notmuch-restore.c       \
12         notmuch-search.c        \
13         notmuch-search-tags.c   \
14         notmuch-setup.c         \
15         notmuch-show.c          \
16         notmuch-tag.c           \
17         notmuch-time.c          \
18         query-string.c          \
19         show-message.c          \
20         json.c
21
22 notmuch_client_modules = $(notmuch_client_srcs:.c=.o)
23 notmuch: $(notmuch_client_modules) lib/libnotmuch.so
24         $(call quiet,CC,$(LDFLAGS)) -Llib -lnotmuch $(filter-out lib/libnotmuch.so,$^) $(FINAL_LDFLAGS) -o $@
25
26 notmuch.1.gz: notmuch.1
27         $(call quiet,gzip) --stdout $^ > $@
28
29 install: all notmuch.1.gz
30         for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/lib/ \
31                 $(DESTDIR)$(prefix)/include/ $(DESTDIR)$(prefix)/share/man/man1 ; \
32         do \
33                 install -d $$d ; \
34         done ;
35         install notmuch $(DESTDIR)$(prefix)/bin/
36         install lib/$(SONAME) $(DESTDIR)$(prefix)/lib/
37         install lib/notmuch.h $(DESTDIR)$(prefix)/include/
38         ln -sf $(SONAME) $(DESTDIR)$(prefix)/lib/libnotmuch.so
39         install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/
40 ifeq ($(MAKECMDGOALS), install)
41         @echo ""
42         @echo "Notmuch is now installed."
43         @echo ""
44         @echo "You may now want to install additional components to support using notmuch"
45         @echo "together with other software packages:"
46         @echo ""
47         @echo " make install-emacs"
48         @echo " make install-bash"
49         @echo " make install-zsh"
50         @echo ""
51 endif
52
53 install-desktop:
54         install -d $(DESTDIR)$(desktop_dir)
55         desktop-file-install --mode 0644 --dir $(DESTDIR)$(desktop_dir) notmuch.desktop
56
57 install-bash:
58         install -d $(DESTDIR)$(bash_completion_dir)
59         install -m0644 contrib/notmuch-completion.bash \
60                 $(DESTDIR)$(bash_completion_dir)/notmuch
61
62 install-zsh:
63         install -d $(DESTDIR)$(zsh_completion_dir)
64         install -m0644 contrib/notmuch-completion.zsh \
65                 $(DESTDIR)$(zsh_completion_dir)/notmuch
66
67 SRCS  := $(SRCS) $(notmuch_client_srcs)
68 CLEAN := $(CLEAN) notmuch $(notmuch_client_modules) notmuch.elc notmuch.1.gz