From patchwork Mon Aug 14 09:51:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 27537 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 69CBC9951; Mon, 14 Aug 2017 12:03:26 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 779909147 for ; Mon, 14 Aug 2017 12:03:19 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Aug 2017 03:03:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,372,1498546800"; d="scan'208";a="118723667" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.223]) by orsmga004.jf.intel.com with ESMTP; 14 Aug 2017 03:03:07 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: thomas@monjalon.net, Bruce Richardson Date: Mon, 14 Aug 2017 10:51:30 +0100 Message-Id: <20170814095208.166496-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.13.4 In-Reply-To: <20170814095208.166496-1-bruce.richardson@intel.com> References: <20170814095208.166496-1-bruce.richardson@intel.com> Subject: [dpdk-dev] [RFCv2 02/40] build: create pkg-config file for DPDK X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Bruce Richardson --- meson.build | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 8383d23b5..d7acf174d 100644 --- a/meson.build +++ b/meson.build @@ -36,9 +36,10 @@ project('DPDK', 'C', meson_version: '>= 0.40.1' ) -# set up some global vars for compiler, platform and configuration +# set up some global vars for compiler, platform, configuration, etc. cc = meson.get_compiler('c') dpdk_conf = configuration_data() +dpdk_libraries = [] # for static libs, treat the drivers as regular libraries, otherwise # for shared libs, put them in a driver folder @@ -58,3 +59,17 @@ build_cfg = 'rte_build_config.h' configure_file(output: build_cfg, configuration: dpdk_conf, install_dir: get_option('includedir')) + +# the DPDK libs needs to be passed to the link command in reverse order +dpdk_link_libs = [] +foreach lib: dpdk_libraries + dpdk_link_libs = [lib] + dpdk_link_libs +endforeach + +pkg = import('pkgconfig') +pkg.generate(name: meson.project_name(), + version: meson.project_version(), + libraries: dpdk_link_libs, + description: 'The Data Plane Development Kit (DPDK)', + extra_cflags: '-include "rte_config.h"' +)