]> git.notmuchmail.org Git - notmuch/blobdiff - Makefile
configure: Fix installation of library to work with alternate --prefix
[notmuch] / Makefile
index 7a59ce0ade5dbebc997aa0b92570c36722768493..80eedd0c52d72dbab471bd83452e5e4d30b405a2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+SONAME = libnotmuch.so.1
 WARN_CXXFLAGS=-Wall -Wextra -Wwrite-strings -Wswitch-enum
 WARN_CFLAGS=$(WARN_CXXFLAGS) -Wmissing-declarations
 
@@ -10,9 +11,6 @@ gzip = gzip
 bash_completion_dir = /etc/bash_completion.d
 zsh_completion_dir = /usr/share/zsh/functions/Completion/Unix
 
-global_deps = Makefile Makefile.local Makefile.config \
-                  lib/Makefile lib/Makefile.local
-
 extra_cflags :=
 extra_cxxflags :=
 
@@ -44,12 +42,12 @@ Makefile.config: configure
        @echo ""
        ./configure
 
-include Makefile.config
+subdirs = compat emacs lib
+
+global_deps = Makefile Makefile.config Makefile.local \
+       $(subdirs:%=%/Makefile) $(subdirs:%=%/Makefile.local)
 
-include lib/Makefile.local
-include compat/Makefile.local
-include emacs/Makefile.local
-include Makefile.local
+include Makefile.config Makefile.local $(subdirs:%=%/Makefile.local)
 
 # The user has not set any verbosity, default to quiet mode and inform the
 # user how to enable verbose compiles.