1 Return-Path: <bgamari.foss@gmail.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 09AA4431FC9
\r
6 for <notmuch@notmuchmail.org>; Sun, 24 Jan 2010 13:23:54 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.819 tagged_above=-999 required=5 tests=[AWL=0.780,
\r
12 BAYES_00=-2.599] autolearn=ham
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id PgzW+EfFAzpy for <notmuch@notmuchmail.org>;
\r
16 Sun, 24 Jan 2010 13:23:52 -0800 (PST)
\r
17 Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com
\r
19 by olra.theworths.org (Postfix) with ESMTP id 13ECA431FC0
\r
20 for <notmuch@notmuchmail.org>; Sun, 24 Jan 2010 13:23:52 -0800 (PST)
\r
21 Received: by mail-qy0-f172.google.com with SMTP id 2so1454613qyk.6
\r
22 for <notmuch@notmuchmail.org>; Sun, 24 Jan 2010 13:23:51 -0800 (PST)
\r
23 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
24 h=domainkey-signature:received:received:from:to:cc:subject:date
\r
25 :message-id:x-mailer:in-reply-to:references;
\r
26 bh=2REmTz3dNITQCO8FgMdhpWGbC8kJNZsoJmyHL7LuMNo=;
\r
27 b=xtxKq51viZS47tam1cn0fczl7r4sK+6gCQ8Znrgm4481mmYEpQDXCWVNYx3IMECyTZ
\r
28 gD2FyXNzhxzMhL/6L+ZralarDfFp7nH1OrDN+BxOhrQc4R9YpTvfd9zfAlWYv/qGRBuW
\r
29 gosjR/w2l/SWcJ0/HeBurWza2HNCPBGbvitL8=
\r
30 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
\r
31 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
32 b=BTGbRFimTWUhUu19blljzcNLu6U3WggTiJsS2pyd/EmTxirQ3QRLkj1clGyNEsT3Ue
\r
33 ApJDDjwoEvI6y4bir7B+DXZd8UjaCj1kxo9m6xnz9Nub0yyb84aID5Wvpb8NhbgR3/Va
\r
34 bY+UNwKZG/h82by/GU6MMGoweJpqQwh1brSYw=
\r
35 Received: by 10.224.87.228 with SMTP id x36mr3589999qal.232.1264368231754;
\r
36 Sun, 24 Jan 2010 13:23:51 -0800 (PST)
\r
37 Received: from localhost.localdomain
\r
38 (pool-72-70-241-97.spfdma.east.verizon.net [72.70.241.97])
\r
39 by mx.google.com with ESMTPS id 6sm10145914qwk.41.2010.01.24.13.23.49
\r
40 (version=SSLv3 cipher=RC4-MD5); Sun, 24 Jan 2010 13:23:50 -0800 (PST)
\r
41 From: Ben Gamari <bgamari.foss@gmail.com>
\r
42 To: notmuch@notmuchmail.org,
\r
44 Date: Sun, 24 Jan 2010 16:23:35 -0500
\r
45 Message-Id: <1264368215-7101-3-git-send-email-bgamari.foss@gmail.com>
\r
46 X-Mailer: git-send-email 1.6.3.3
\r
47 In-Reply-To: <1264368215-7101-2-git-send-email-bgamari.foss@gmail.com>
\r
48 References: <1264272821-sup-5331@ben-laptop>
\r
49 <1264368215-7101-1-git-send-email-bgamari.foss@gmail.com>
\r
50 <1264368215-7101-2-git-send-email-bgamari.foss@gmail.com>
\r
51 Subject: [notmuch] [PATCH 2/2] Build and link against notmuch shared library
\r
52 X-BeenThere: notmuch@notmuchmail.org
\r
53 X-Mailman-Version: 2.1.13
\r
55 List-Id: "Use and development of the notmuch mail system."
\r
56 <notmuch.notmuchmail.org>
\r
57 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
58 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
59 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
60 List-Post: <mailto:notmuch@notmuchmail.org>
\r
61 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
62 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
64 X-List-Received-Date: Sun, 24 Jan 2010 21:23:54 -0000
\r
68 Makefile.local | 6 ++++--
\r
69 lib/Makefile.local | 10 ++++++----
\r
70 3 files changed, 11 insertions(+), 6 deletions(-)
\r
72 diff --git a/Makefile b/Makefile
\r
73 index 64b9d4a..6f296bb 100644
\r
77 +SONAME = libnotmuch.so.1
\r
78 WARN_CXXFLAGS=-Wall -Wextra -Wwrite-strings -Wswitch-enum
\r
79 WARN_CFLAGS=$(WARN_CXXFLAGS) -Wmissing-declarations
\r
81 diff --git a/Makefile.local b/Makefile.local
\r
82 index d579242..a61eb67 100644
\r
83 --- a/Makefile.local
\r
84 +++ b/Makefile.local
\r
85 @@ -21,8 +21,8 @@ notmuch_client_srcs = \
\r
88 notmuch_client_modules = $(notmuch_client_srcs:.c=.o)
\r
89 -notmuch: $(notmuch_client_modules) lib/notmuch.a
\r
90 - $(call quiet,CXX,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -o $@
\r
91 +notmuch: $(notmuch_client_modules) lib/libnotmuch.so
\r
92 + $(call quiet,CC,$(LDFLAGS)) -lnotmuch $(filter-out lib/libnotmuch.so,$^) $(FINAL_LDFLAGS) -o $@
\r
94 notmuch.1.gz: notmuch.1
\r
95 $(call quiet,gzip) --stdout $^ > $@
\r
96 @@ -33,6 +33,8 @@ install: all notmuch.1.gz
\r
99 install notmuch $(DESTDIR)$(prefix)/bin/
\r
100 + install lib/$(SONAME) $(DESTDIR)$(prefix)/lib/
\r
101 + ln -sf $(DESTDIR)$(prefix)/lib/$(SONAME) $(DESTDIR)$(prefix)/lib/libnotmuch.so
\r
102 install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/
\r
104 install-emacs: install emacs
\r
105 diff --git a/lib/Makefile.local b/lib/Makefile.local
\r
106 index 70489e1..cfefc9b 100644
\r
107 --- a/lib/Makefile.local
\r
108 +++ b/lib/Makefile.local
\r
111 -extra_cflags += -I$(dir)
\r
112 +extra_cflags += -I$(dir) -fPIC
\r
114 libnotmuch_c_srcs = \
\r
116 @@ -18,8 +18,10 @@ libnotmuch_cxx_srcs = \
\r
119 libnotmuch_modules = $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o)
\r
120 -$(dir)/notmuch.a: $(libnotmuch_modules)
\r
121 - $(call quiet,AR) rcs $@ $^
\r
122 +$(dir)/$(SONAME): $(libnotmuch_modules)
\r
123 + $(call quiet,CXX,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -Wl,-soname=$(SONAME) -shared -o $@
\r
124 +$(dir)/libnotmuch.so: $(dir)/$(SONAME)
\r
125 + ln -sf $(dir)/$(SONAME) $(dir)/libnotmuch.so
\r
127 SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs)
\r
128 -CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/notmuch.a
\r
129 +CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/libnotmuch.so $(dir)/$(SONAME)
\r