From owner-freebsd-questions@FreeBSD.ORG Sun Dec 16 17:28:40 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E217B2BD for ; Sun, 16 Dec 2012 17:28:40 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id 9A3C98FC13 for ; Sun, 16 Dec 2012 17:28:40 +0000 (UTC) Received: from r56.edvax.de (port-92-195-51-39.dynamic.qsc.de [92.195.51.39]) by mx02.qsc.de (Postfix) with ESMTP id 9E75D24A63; Sun, 16 Dec 2012 18:28:32 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id qBGHSYdG002552; Sun, 16 Dec 2012 18:28:34 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Sun, 16 Dec 2012 18:28:34 +0100 From: Polytropon To: Manish Jain Subject: Re: Question on how do I tell make to choose between static and shared versions of a library Message-Id: <20121216182834.607b9f56.freebsd@edvax.de> In-Reply-To: References: Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 17:28:41 -0000 On Sun, 16 Dec 2012 22:52:05 +0530, Manish Jain wrote: > Under /lib I have both versions - shared (libxyz.so.1) as well as static > (libxyz.a) - of a library. How do I tell make to link to the static > version, not the shared one ? The next obvious question is how to do the > vice versa - tell make to link to the shared version, not the static one. > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" This can be done by addressing the linker through $LDFLAGS. I think "man ld" will be helpful. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...