FINAL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(CONFIGURE_CXXFLAGS) $(extra_cflags) $(extra_cxxflags)
FINAL_LDFLAGS = $(LDFLAGS) $(CONFIGURE_LDFLAGS)
FINAL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(CONFIGURE_CXXFLAGS) $(extra_cflags) $(extra_cxxflags)
FINAL_LDFLAGS = $(LDFLAGS) $(CONFIGURE_LDFLAGS)
-notmuch: $(notmuch_client_modules) lib/libnotmuch.so
+
+notmuch: $(notmuch_client_modules) lib/libnotmuch.a
+ $(call quiet,CC,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -o $@
+
+notmuch-shared: $(notmuch_client_modules) lib/libnotmuch.so
$(call quiet_mkdir, $(DESTDIR)$(libdir)/)
$(call quiet_mkdir, $(DESTDIR)$(prefix)/include/)
$(call quiet_mkdir, $(DESTDIR)$(prefix)/share/man/man1)
$(call quiet_mkdir, $(DESTDIR)$(libdir)/)
$(call quiet_mkdir, $(DESTDIR)$(prefix)/include/)
$(call quiet_mkdir, $(DESTDIR)$(prefix)/share/man/man1)
$(call quiet_install_data, notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/)
ifeq ($(MAKECMDGOALS), install)
@echo ""
$(call quiet_install_data, notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/)
ifeq ($(MAKECMDGOALS), install)
@echo ""
$(call quiet_install_data, contrib/notmuch-completion.zsh $(DESTDIR)$(zsh_completion_dir)/notmuch)
SRCS := $(SRCS) $(notmuch_client_srcs)
$(call quiet_install_data, contrib/notmuch-completion.zsh $(DESTDIR)$(zsh_completion_dir)/notmuch)
SRCS := $(SRCS) $(notmuch_client_srcs)