aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/Makefile.local
diff options
context:
space:
mode:
authorGravatar Ben Gamari <bgamari.foss@gmail.com>2010-03-12 14:47:34 +0100
committerGravatar Carl Worth <cworth@cworth.org>2010-03-31 17:38:27 -0700
commit266ab595a2fcbc8467eae843557597835269a554 (patch)
tree5eb189d0aa917a2a9372139b447533ee230964e9 /lib/Makefile.local
parentb957a1b029d27c6b2ecd352dbacde3d9d164666f (diff)
Build and link against notmuch shared library, install notmuch.h
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
Diffstat (limited to 'lib/Makefile.local')
-rw-r--r--lib/Makefile.local9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Makefile.local b/lib/Makefile.local
index 495b27e0..f8489468 100644
--- a/lib/Makefile.local
+++ b/lib/Makefile.local
@@ -1,5 +1,5 @@
dir := lib
-extra_cflags += -I$(dir)
+extra_cflags += -I$(dir) -fPIC
libnotmuch_c_srcs = \
$(dir)/libsha1.c \
@@ -18,8 +18,9 @@ libnotmuch_cxx_srcs = \
$(dir)/thread.cc
libnotmuch_modules = $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o)
-$(dir)/notmuch.a: $(libnotmuch_modules)
- $(call quiet,AR) rcs $@ $^
+$(dir)/libnotmuch.so : $(libnotmuch_modules)
+ $(call quiet,CXX,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -shared -Wl,-soname=$(SONAME) -o $@
+ ln -sf $(SONAME) $@
SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs)
-CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/notmuch.a
+CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/libnotmuch.so *.so