From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 84612431FC4 for ; Wed, 20 Jan 2010 12:07:42 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.84 X-Spam-Level: X-Spam-Status: No, score=-2.84 tagged_above=-999 required=5 tests=[AWL=-0.241, BAYES_00=-2.599] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SY5h4PJN+b7C for ; Wed, 20 Jan 2010 12:07:41 -0800 (PST) Received: from mail-bw0-f215.google.com (mail-bw0-f215.google.com [209.85.218.215]) by olra.theworths.org (Postfix) with ESMTP id 352FE431FBC for ; Wed, 20 Jan 2010 12:07:41 -0800 (PST) Received: by mail-bw0-f215.google.com with SMTP id 7so1699290bwz.6 for ; Wed, 20 Jan 2010 12:07:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=Xroj28lG92guECqox/J+U37o3b3HDY2LWmGCytfvrUI=; b=seC3BJfS0F+vjpxiGCD8VQEIvYuPoHLd8OquRbsCiJBtCxythEqWQ9wXO6LtNkS1Si 3NcP754SOCps+tSynOzIb1PXXM8tqOcGItZGRiShURQ4w4loFEt2d8d+BpxyVl1njKlj LiCSVWJx9OH+CzGDQk+zat5YfogkNkyLD2Jfg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=Oj2orqNwJqiZVo9Eo1SyKeg7ka7jBvnEsf0GxFye1PuM9+AFhE94AsvqHQKuxQAX9D a3j1WvBVrgv1uhsXvmdIPfPtctV1ubqzkNXhm8cndKA1wgeY1sM5eZF8B3SoTiSCaYz9 k6916Nkr5b7eflHlOhwF5FAgprQs1NhueqCLk= Received: by 10.103.81.13 with SMTP id i13mr213619mul.55.1264018060829; Wed, 20 Jan 2010 12:07:40 -0800 (PST) Received: from localhost.localdomain (umass-959-105.wireless.umass.edu [128.119.77.105]) by mx.google.com with ESMTPS id 25sm944791mul.50.2010.01.20.12.07.39 (version=SSLv3 cipher=RC4-MD5); Wed, 20 Jan 2010 12:07:40 -0800 (PST) From: Ben Gamari To: notmuch@notmuchmail.org, cworth@cworth.org Date: Wed, 20 Jan 2010 15:07:27 -0500 Message-Id: <1264018047-28362-2-git-send-email-bgamari.foss@gmail.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1264018047-28362-1-git-send-email-bgamari.foss@gmail.com> References: <1264018047-28362-1-git-send-email-bgamari.foss@gmail.com> Subject: [PATCH] Build and link against notmuch shared library X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 20:07:43 -0000 --- Makefile.local | 5 +++-- lib/Makefile.local | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile.local b/Makefile.local index 933ff4c..6e851e4 100644 --- a/Makefile.local +++ b/Makefile.local @@ -21,8 +21,8 @@ notmuch_client_srcs = \ show-message.c notmuch_client_modules = $(notmuch_client_srcs:.c=.o) -notmuch: $(notmuch_client_modules) lib/notmuch.a - $(call quiet,CXX,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -o $@ +notmuch: $(notmuch_client_modules) + $(call quiet,CXX,$(LDFLAGS)) -lnotmuch $^ $(FINAL_LDFLAGS) -o $@ notmuch.1.gz: notmuch.1 $(call quiet,gzip) --stdout $^ > $@ @@ -33,6 +33,7 @@ install: all notmuch.1.gz install -d $$d ; \ done ; install notmuch $(DESTDIR)$(prefix)/bin/ + install lib/libnotmuch.so $(DESTDIR)$(prefix)/lib/ install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/ install-emacs: install emacs diff --git a/lib/Makefile.local b/lib/Makefile.local index 70489e1..5e5a6e6 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,8 @@ 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 -o $@ SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs) -CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/notmuch.a +CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/notmuch.so -- 1.6.3.3