From patchwork Mon Nov 18 20:02:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ANDY KENNEDY X-Patchwork-Id: 292182 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 34F142C00C2 for ; Tue, 19 Nov 2013 07:02:50 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 377B3E582; Mon, 18 Nov 2013 20:02:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ChddEHJnjEwW; Mon, 18 Nov 2013 20:02:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5C29EE424; Mon, 18 Nov 2013 20:02:46 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 7A3A01CE805 for ; Mon, 18 Nov 2013 20:02:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 741598FF6D for ; Mon, 18 Nov 2013 20:02:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9kltUm58Io-l for ; Mon, 18 Nov 2013 20:02:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from p02c11o149.mxlogic.net (p02c11o149.mxlogic.net [208.65.144.82]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5CC028FF6B for ; Mon, 18 Nov 2013 20:02:44 +0000 (UTC) Received: from unknown [76.164.174.82] (EHLO ex-hc3.corp.adtran.com) by p02c11o149.mxlogic.net(mxl_mta-7.2.2-0) over TLS secured channel with ESMTP id 3627a825.0.308569.00-363.728369.p02c11o149.mxlogic.net (envelope-from ); Mon, 18 Nov 2013 13:02:44 -0700 (MST) X-MXL-Hash: 528a726466b9fcd6-94f02e1d72a418665a7cb7d28701a9a6fec5db0d Received: from ex-mb1.corp.adtran.com ([fe80::51a3:972d:5f16:9952]) by ex-hc3.corp.adtran.com ([fe80::3892:20fa:600f:75c6%15]) with mapi id 14.01.0438.000; Mon, 18 Nov 2013 14:02:42 -0600 From: ANDY KENNEDY To: "'buildroot@busybox.net'" Thread-Topic: [PATCH] pciutils: install static lib with shared Thread-Index: Ac7kmSR5C5BFKpLvRHGH51Xzwp1tfg== Date: Mon, 18 Nov 2013 20:02:42 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.22.115.180] MIME-Version: 1.0 X-AnalysisOut: [v=2.0 cv=R8u076tX c=1 sm=1 a=J+LXdEUA8t8MtBPt16/Qbg==:17 a] X-AnalysisOut: [=C3ZOIDTcl6cA:10 a=KYXLFeh3yJ4A:10 a=qZHQZMT3apYA:10 a=BLc] X-AnalysisOut: [eEmwcHowA:10 a=kj9zAlcOel0A:10 a=xqWC_Br6kY4A:10 a=eJNrpio] X-AnalysisOut: [GAAAA:8 a=wKMCGbGMdboA:10 a=KpW1Fzg4hP2ZzIk0H94A:9 a=CjuIK] X-AnalysisOut: [1q_8ugA:10 a=DvnSUQUdWHYA:10] X-Spam: [F=0.2000000000; CM=0.500; S=0.200(2010122901)] X-MAIL-FROM: X-SOURCE-IP: [76.164.174.82] Subject: [Buildroot] [PATCH] pciutils: install static lib with shared X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net When building pciutils as shared, also include the static libraries for a more rounded staging directory (useful when PREFER_STATIC_LIB is not set, but should provide a static library for when static linking with libpci is preferred). Signed-off-by: Andy Kennedy diff -Naur a/package/pciutils/pciutils.mk b/package/pciutils/pciutils.mk --- a/package/pciutils/pciutils.mk 2013-09-17 06:42:07.000000000 -0500 +++ b/package/pciutils/pciutils.mk 2013-11-18 13:49:31.000000000 -0600 @@ -17,7 +17,26 @@ PCIUTILS_ZLIB=no endif PCIUTILS_DNS=no +ifeq ($(BR2_PREFER_STATIC_LIB),y) +PCIUTILS_SHARED=no +PCIUTILS_DO_SHARED_BUILD = +else PCIUTILS_SHARED=yes +define PCIUTILS_DO_SHARED_BUILD + $(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" \ + HOST="$(KERNEL_ARCH)-linux" \ + OPT="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + RANLIB=$(TARGET_RANLIB) \ + AR=$(TARGET_AR) \ + -C $(PCIUTILS_DIR) \ + SHARED=yes \ + ZLIB=$(PCIUTILS_ZLIB) \ + DNS=$(PCIUTILS_DNS) \ + LIBKMOD=$(PCIUTILS_KMOD) \ + PREFIX=/usr +endef +endif # Build after busybox since it's got a lightweight lspci ifeq ($(BR2_PACKAGE_BUSYBOX),y) @@ -47,11 +66,12 @@ RANLIB=$(TARGET_RANLIB) \ AR=$(TARGET_AR) \ -C $(PCIUTILS_DIR) \ - SHARED=$(PCIUTILS_SHARED) \ + SHARED=no \ ZLIB=$(PCIUTILS_ZLIB) \ DNS=$(PCIUTILS_DNS) \ LIBKMOD=$(PCIUTILS_KMOD) \ PREFIX=/usr + $(PCIUTILS_DO_SHARED_BUILD) endef # Ditch install-lib if SHARED is an option in the future