Received: from eggs.gnu.org ([2001:4830:134:3::10]:34775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ymfaz-0007vB-HX for qemu-devel@nongnu.org; Mon, 27 Apr 2015 05:44:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ymfaw-0001jx-2B for qemu-devel@nongnu.org; Mon, 27 Apr 2015 05:44:57 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:42384) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ymfav-0001jr-Qo for qemu-devel@nongnu.org; Mon, 27 Apr 2015 05:44:53 -0400 Message-ID: <553E0514.5030700@msgid.tls.msk.ru> Date: Mon, 27 Apr 2015 12:44:52 +0300 From: Michael Tokarev MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] libcacard: use the library? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Currently we link individual object files from libcacard to qemu-system binaries, this way (from Makefile.objs): libcacard-y += libcacard/cac.o libcacard/event.o libcacard-y += libcacard/vcard.o libcacard/vreader.o ... common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y) Why can't we use the actual library, and just add the linker flag, -Ilibcacard -lcacard? libcacard is built only when libtool is found, which is kinda illogical since libtool is not needed to link these object files with qemu. And libtool is already used (if found) to link qemu binaries, so using it to link binaries with libcacard is already done. How about replacing these common-obj-$(CONFIG_SMARTCARD_NSS) with appropriate linker flags, and doing that only for these binaries which actually need libcacard? Thanks, /mjt