From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4F363A0C3F for ; Sat, 12 Jun 2021 01:12:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4803D4014F; Sat, 12 Jun 2021 01:12:45 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2074.outbound.protection.outlook.com [40.107.244.74]) by mails.dpdk.org (Postfix) with ESMTP id 4B6BA4003F for ; Sat, 12 Jun 2021 01:12:43 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LrmpFlrf4LSb3KVfnyS60G5w8dIEsXC6hyTbDPJ8hbC+xyB3uE0onEiFWCkapjjCi9AW9ZonbkKUVBryZLQ0LccSGoihKBYECTtJ1y9raNJrgmXbo7pvfVwPR6i76v/MBvpwTZuhpFT5uXkbyw5ITv2i0xb7yUFdTUsWCxOB4rKQk94khtEcZNzNgNCg9olvfd/MqwtZV+qv6Jm8HUA0Z9zI0U8xD7o44i9EtsQq722oG1rK9huFeTKe5r2z2Di9hcV3ieso0QD9VNL53rHvW09LBEZJIKbkignIIymo2ZmtpldjodCaUVUOwED6f+1eaej/0AEQH2e/t/3yAeN8Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PK2eWQFeBsBNq+LQCUk2RmbAa83BYCEUOjWR9TFdzJA=; b=JdRwa1MchNMn5zB3AESE8fheZLWqY3rmDTYGkerxztspxK9fnetDEtVALIFMf/zxLRUDV0JD4oPF80ti0P+NSaaXvtm0nB8FqTKx5/6QlkRq9TDy2W0+rI0m89rpb+bY1Ha4TifKhkqo+0ZR+T6Uk4AUCXn1hskGm7e8ScLPBHKoMoyJjMFznfOF3P715O6jJaqnk1Fk9+6qbWPO9rLqhk241XS3SlOpfJWRkqXwB8RREPlulNdtNgSPc54uxDVQxvnYkEmMC+nRnTFOyYIsC9EjPQzomVLIkSux72L0IYakxfPJN2H9g0A6spH8romq1LfjAE5JjB1cRsA401YzQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PK2eWQFeBsBNq+LQCUk2RmbAa83BYCEUOjWR9TFdzJA=; b=LK5x6hRSq6P6hZFniSbknuoo+r2b8/W8Ne3/4FA31xxMkEe44vLkv+YX7cE+/1sVX7gfYGTfcFMZXmu++0Pqt8DemRcr7ErLeyVTBCf6cTYeZNut17eJLCehprAhNAvA/9CyNft1JMzO0WNZIyh5EQuLt3nEep8WvapYxDS6glLOaDjp5PEeGPnmFkjVHABgaqKUqFvtF9HHiDK+Cch80w/6QJ5ztVq9DR7nLbOdozUSKKlYMvYS1adERLGk+mSYVAVA6p0I+O5wDf9BTc0lSBQ+mGqbQLs4RPGdaYw5fXyIH+UfQlYZmH/0fLFymZRdVn4PVeN1wvzxM3PHbgDJFg== Received: from MW4PR04CA0314.namprd04.prod.outlook.com (2603:10b6:303:82::19) by DM6PR12MB4778.namprd12.prod.outlook.com (2603:10b6:5:167::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.20; Fri, 11 Jun 2021 23:12:38 +0000 Received: from CO1NAM11FT035.eop-nam11.prod.protection.outlook.com (2603:10b6:303:82:cafe::a0) by MW4PR04CA0314.outlook.office365.com (2603:10b6:303:82::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Fri, 11 Jun 2021 23:12:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by CO1NAM11FT035.mail.protection.outlook.com (10.13.175.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4219.21 via Frontend Transport; Fri, 11 Jun 2021 23:12:38 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 11 Jun 2021 23:12:36 +0000 From: Xueming Li To: Jerin Jacob CC: Luca Boccassi , Bruce Richardson , dpdk stable Date: Sat, 12 Jun 2021 07:02:56 +0800 Message-ID: <20210611230433.8208-82-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210611230433.8208-1-xuemingl@nvidia.com> References: <20210510160258.30982-229-xuemingl@nvidia.com> <20210611230433.8208-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a86733fe-b8b4-4078-e000-08d92d2e6809 X-MS-TrafficTypeDiagnostic: DM6PR12MB4778: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KG7aqYIcdbb2/ndLEAMRMRhTXfY/A4euneHJlRZfx/E3dQUe9Mbq/Qv3UMieZzepQKl7nrB6RHTnhmtmxcTgX/amnD6Noq0mrWlAIBnaXyWImMJESM1V1l+H755STJJ7MuBAYyO41Z1MNy9ZyVUdMjp2uNu0GUkkIsAdPbqDtvuTCHl9whBUngialE/e7jn8rZ1HtQCU3/5F/xbgSWQHH3KtKL9EHrA5o9VfodCAm7LVWJkiQIaK7/vuYG3qifuoy1I0bvfrj9hBJ1s4rtRCmRnXqESaQtbvIrJ6+0AF7WlxbhSXSnfjabYWJtrfAo3iutqSWW157n/tIKVX3x65i2FNJxUgRUhw5fxaTEfCKuDPUjRbuTHH5TPLHw0AuU9KITXLELNougBHz1z7I/yzeqUqSaogujfBrpRM/0WXSwz4ZRjtbkDEFWoZEoNpNJF+Uhpar4NWv3Buo3zAbGYyLBSkdq70/nXqJTCWV0Ouq2kuNnfv61VtV1NbwllToMXSkH3NL0gfz5yMHEuAymhvoWoOYY5qHzh2LUf4eK70T8y5jhI2thOgoVer07ZPaOyMrwQfby/zpr+eYfQHRcuPlL2FpqhuY0KlzdmJcvtVBAONI4W6MXId8lsdsCVU7S82JmxQ6PBGcv+KioKUbd4vy5S9SnKHN4IidnBF1rS8qHchsfKlte2rGtqBvgpUNktNK7OP/tVRNqgRWiUXvFjNF4tAan7d699oS2D8yVqSSA40ZeR+JBbRc5QBZ4QqapoTjWa6P6/YQsIia1rFpg2ocsqFctFL2neRrZWWHVrAQHa9GqlARZynENZ1kjtUoJTu X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(376002)(396003)(136003)(39860400002)(346002)(46966006)(36840700001)(6286002)(70586007)(6666004)(30864003)(8936002)(82740400003)(8676002)(966005)(86362001)(2906002)(5660300002)(1076003)(4326008)(47076005)(336012)(36860700001)(82310400003)(26005)(16526019)(186003)(55016002)(83380400001)(7696005)(316002)(54906003)(7636003)(53546011)(356005)(36906005)(6916009)(426003)(2616005)(36756003)(478600001)(70206006)(579004)(559001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2021 23:12:38.5499 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a86733fe-b8b4-4078-e000-08d92d2e6809 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT035.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4778 Subject: [dpdk-stable] patch 'examples: fix pkg-config override' has been queued to stable release 20.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/14/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/10ddae775cb9eecad1351c2952bc1fe57e9df570 Thanks. Xueming Li --- >From 10ddae775cb9eecad1351c2952bc1fe57e9df570 Mon Sep 17 00:00:00 2001 From: Jerin Jacob Date: Wed, 5 May 2021 19:55:25 +0530 Subject: [PATCH] examples: fix pkg-config override Cc: Luca Boccassi [ upstream commit 11e027022d0f72f3cd7419b83e69a9ceb342666d ] Move pkg-config override to beginning in the Makefile to allow use PKGCONF variable to detect the libdpdk availability. Fixes: fda34680eb9a ("examples: remove legacy sections of makefiles") Signed-off-by: Jerin Jacob Acked-by: Bruce Richardson --- examples/bbdev_app/Makefile | 6 +++--- examples/bond/Makefile | 6 +++--- examples/cmdline/Makefile | 6 +++--- examples/distributor/Makefile | 6 +++--- examples/ethtool/ethtool-app/Makefile | 6 +++--- examples/ethtool/lib/Makefile | 6 +++--- examples/eventdev_pipeline/Makefile | 6 +++--- examples/fips_validation/Makefile | 6 +++--- examples/flow_classify/Makefile | 6 +++--- examples/flow_filtering/Makefile | 6 +++--- examples/helloworld/Makefile | 6 +++--- examples/ioat/Makefile | 6 +++--- examples/ip_fragmentation/Makefile | 6 +++--- examples/ip_pipeline/Makefile | 6 +++--- examples/ip_reassembly/Makefile | 6 +++--- examples/ipsec-secgw/Makefile | 6 +++--- examples/ipv4_multicast/Makefile | 6 +++--- examples/kni/Makefile | 6 +++--- examples/l2fwd-cat/Makefile | 6 +++--- examples/l2fwd-crypto/Makefile | 6 +++--- examples/l2fwd-event/Makefile | 6 +++--- examples/l2fwd-jobstats/Makefile | 6 +++--- examples/l2fwd-keepalive/Makefile | 6 +++--- examples/l2fwd-keepalive/ka-agent/Makefile | 6 +++--- examples/l2fwd/Makefile | 6 +++--- examples/l3fwd-acl/Makefile | 6 +++--- examples/l3fwd-graph/Makefile | 6 +++--- examples/l3fwd-power/Makefile | 6 +++--- examples/l3fwd/Makefile | 6 +++--- examples/link_status_interrupt/Makefile | 6 +++--- examples/multi_process/client_server_mp/mp_client/Makefile | 6 +++--- examples/multi_process/client_server_mp/mp_server/Makefile | 6 +++--- examples/multi_process/hotplug_mp/Makefile | 6 +++--- examples/multi_process/simple_mp/Makefile | 6 +++--- examples/multi_process/symmetric_mp/Makefile | 6 +++--- examples/ntb/Makefile | 6 +++--- examples/packet_ordering/Makefile | 6 +++--- examples/performance-thread/l3fwd-thread/Makefile | 5 +++-- examples/performance-thread/pthread_shim/Makefile | 6 +++--- examples/pipeline/Makefile | 6 +++--- examples/ptpclient/Makefile | 6 +++--- examples/qos_meter/Makefile | 6 +++--- examples/qos_sched/Makefile | 6 +++--- examples/rxtx_callbacks/Makefile | 6 +++--- examples/server_node_efd/node/Makefile | 6 +++--- examples/server_node_efd/server/Makefile | 6 +++--- examples/service_cores/Makefile | 6 +++--- examples/skeleton/Makefile | 6 +++--- examples/timer/Makefile | 6 +++--- examples/vdpa/Makefile | 6 +++--- examples/vhost/Makefile | 6 +++--- examples/vhost_blk/Makefile | 6 +++--- examples/vhost_crypto/Makefile | 6 +++--- examples/vm_power_manager/Makefile | 6 +++--- examples/vm_power_manager/guest_cli/Makefile | 6 +++--- examples/vmdq/Makefile | 6 +++--- examples/vmdq_dcb/Makefile | 6 +++--- 57 files changed, 171 insertions(+), 170 deletions(-) diff --git a/examples/bbdev_app/Makefile b/examples/bbdev_app/Makefile index 2f156736d1..942e106ac2 100644 --- a/examples/bbdev_app/Makefile +++ b/examples/bbdev_app/Makefile @@ -7,8 +7,10 @@ APP = bbdev # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/bond/Makefile b/examples/bond/Makefile index 8700b589fb..d96afe2cba 100644 --- a/examples/bond/Makefile +++ b/examples/bond/Makefile @@ -7,8 +7,10 @@ APP = bond_app # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -21,8 +23,6 @@ static: build/$(APP)-static LDFLAGS += -lrte_net_bond -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile index 09da84ba0b..fd7ae682a4 100644 --- a/examples/cmdline/Makefile +++ b/examples/cmdline/Makefile @@ -7,8 +7,10 @@ APP = cmdline # all source are stored in SRCS-y SRCS-y := main.c commands.c parse_obj_list.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile index d7615f9a32..ade6df08b3 100644 --- a/examples/distributor/Makefile +++ b/examples/distributor/Makefile @@ -7,8 +7,10 @@ APP = distributor_app # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/ethtool/ethtool-app/Makefile b/examples/ethtool/ethtool-app/Makefile index 93ef5c27c3..cda3f14252 100644 --- a/examples/ethtool/ethtool-app/Makefile +++ b/examples/ethtool/ethtool-app/Makefile @@ -12,8 +12,10 @@ LDFLAGS += -L../lib/build LDFLAGS_STATIC = -l:librte_ethtool.a LDFLAGS_SHARED = -lrte_ethtool +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -24,8 +26,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED += $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/ethtool/lib/Makefile b/examples/ethtool/lib/Makefile index b4af9b0c91..a33040e66a 100644 --- a/examples/ethtool/lib/Makefile +++ b/examples/ethtool/lib/Makefile @@ -2,15 +2,15 @@ # Copyright(c) 2015-2020 Intel Corporation -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +PKGCONF ?= pkg-config + +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif ifneq ($(shell uname),Linux) $(error This application can only operate in a linux environment) endif -PKGCONF ?= pkg-config - # library name LIB = librte_ethtool.so LIB_STATIC = librte_ethtool.a diff --git a/examples/eventdev_pipeline/Makefile b/examples/eventdev_pipeline/Makefile index f5072a2b0c..faf667a54a 100644 --- a/examples/eventdev_pipeline/Makefile +++ b/examples/eventdev_pipeline/Makefile @@ -9,8 +9,10 @@ SRCS-y := main.c SRCS-y += pipeline_worker_generic.c SRCS-y += pipeline_worker_tx.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -21,8 +23,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/fips_validation/Makefile b/examples/fips_validation/Makefile index 8f82a4c6c5..c41fdb0006 100644 --- a/examples/fips_validation/Makefile +++ b/examples/fips_validation/Makefile @@ -17,8 +17,10 @@ SRCS-y += fips_dev_self_test.c SRCS-y += fips_validation_xts.c SRCS-y += main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -29,8 +31,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/flow_classify/Makefile b/examples/flow_classify/Makefile index 4c215daf1b..7e892405de 100644 --- a/examples/flow_classify/Makefile +++ b/examples/flow_classify/Makefile @@ -7,8 +7,10 @@ APP = flow_classify # all source are stored in SRCS-y SRCS-y := flow_classify.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile index 9bc9179346..7453414d24 100644 --- a/examples/flow_filtering/Makefile +++ b/examples/flow_filtering/Makefile @@ -5,8 +5,10 @@ APP = flow SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -17,8 +19,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile index 436569f5a6..b16773a02f 100644 --- a/examples/helloworld/Makefile +++ b/examples/helloworld/Makefile @@ -7,8 +7,10 @@ APP = helloworld # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/ioat/Makefile b/examples/ioat/Makefile index c13ad8d8af..c7a54bffbf 100644 --- a/examples/ioat/Makefile +++ b/examples/ioat/Makefile @@ -7,8 +7,10 @@ APP = ioatfwd # all source are stored in SRCS-y SRCS-y := ioatfwd.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/ip_fragmentation/Makefile b/examples/ip_fragmentation/Makefile index f6baf635bb..c7a27e4f14 100644 --- a/examples/ip_fragmentation/Makefile +++ b/examples/ip_fragmentation/Makefile @@ -8,8 +8,10 @@ APP = ip_fragmentation # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -20,8 +22,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile index 4b391973cb..e71cd61b43 100644 --- a/examples/ip_pipeline/Makefile +++ b/examples/ip_pipeline/Makefile @@ -20,8 +20,10 @@ SRCS-y += thread.c SRCS-y += tmgr.c SRCS-y += cryptodev.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -32,8 +34,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile index 740f4721d0..28158225a6 100644 --- a/examples/ip_reassembly/Makefile +++ b/examples/ip_reassembly/Makefile @@ -8,8 +8,10 @@ APP = ip_reassembly # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -20,8 +22,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile index 7670cc3684..94a685a9ce 100644 --- a/examples/ipsec-secgw/Makefile +++ b/examples/ipsec-secgw/Makefile @@ -22,8 +22,10 @@ SRCS-y += flow.c CFLAGS += -gdwarf-2 +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -34,8 +36,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile index 7ea44e6f63..2f054fe27d 100644 --- a/examples/ipv4_multicast/Makefile +++ b/examples/ipv4_multicast/Makefile @@ -8,8 +8,10 @@ APP = ipv4_multicast # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -20,8 +22,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/kni/Makefile b/examples/kni/Makefile index bbf3bcae12..3dad5329d8 100644 --- a/examples/kni/Makefile +++ b/examples/kni/Makefile @@ -7,8 +7,10 @@ APP = kni # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile index 9ba1135612..532db37ba6 100644 --- a/examples/l2fwd-cat/Makefile +++ b/examples/l2fwd-cat/Makefile @@ -7,8 +7,10 @@ APP = l2fwd-cat # all source are stored in SRCS-y SRCS-y := l2fwd-cat.c cat.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile index 7731eccd03..09aec4d52d 100644 --- a/examples/l2fwd-crypto/Makefile +++ b/examples/l2fwd-crypto/Makefile @@ -7,8 +7,10 @@ APP = l2fwd-crypto # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/l2fwd-event/Makefile b/examples/l2fwd-event/Makefile index 384224b24a..e011e31d1e 100644 --- a/examples/l2fwd-event/Makefile +++ b/examples/l2fwd-event/Makefile @@ -13,8 +13,10 @@ SRCS-y += l2fwd_common.c SRCS-y += l2fwd_event_generic.c SRCS-y += l2fwd_event_internal_port.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -25,8 +27,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile index fcb60b2a33..9a71c68fa8 100644 --- a/examples/l2fwd-jobstats/Makefile +++ b/examples/l2fwd-jobstats/Makefile @@ -7,8 +7,10 @@ APP = l2fwd-jobstats # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile index 09a891149b..ace9b4687e 100644 --- a/examples/l2fwd-keepalive/Makefile +++ b/examples/l2fwd-keepalive/Makefile @@ -7,8 +7,10 @@ APP = l2fwd-keepalive # all source are stored in SRCS-y SRCS-y := main.c shm.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -21,8 +23,6 @@ static: build/$(APP)-static LDFLAGS += -pthread -lrt -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/l2fwd-keepalive/ka-agent/Makefile b/examples/l2fwd-keepalive/ka-agent/Makefile index 8b329a78b1..00d364fcbf 100644 --- a/examples/l2fwd-keepalive/ka-agent/Makefile +++ b/examples/l2fwd-keepalive/ka-agent/Makefile @@ -9,8 +9,10 @@ SRCS-y := main.c CFLAGS += -I.. +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -23,8 +25,6 @@ static: build/$(APP)-static LDFLAGS += -lpthread -lrt -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile index b180deb862..85669a298a 100644 --- a/examples/l2fwd/Makefile +++ b/examples/l2fwd/Makefile @@ -7,8 +7,10 @@ APP = l2fwd # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) # Add flag to allow experimental API as l2fwd uses rte_ethdev_set_ptype API diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile index 3420ea3a9c..f5d2099d8b 100644 --- a/examples/l3fwd-acl/Makefile +++ b/examples/l3fwd-acl/Makefile @@ -7,8 +7,10 @@ APP = l3fwd-acl # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/l3fwd-graph/Makefile b/examples/l3fwd-graph/Makefile index 6e3d0bca06..4f6ee27272 100644 --- a/examples/l3fwd-graph/Makefile +++ b/examples/l3fwd-graph/Makefile @@ -7,8 +7,10 @@ APP = l3fwd-graph # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) -DALLOW_EXPERIMENTAL_API LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/l3fwd-power/Makefile b/examples/l3fwd-power/Makefile index d69854c9f8..d1eb10e6e1 100644 --- a/examples/l3fwd-power/Makefile +++ b/examples/l3fwd-power/Makefile @@ -7,8 +7,10 @@ APP = l3fwd-power # all source are stored in SRCS-y SRCS-y := main.c perf_core.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile index 7e70bbd826..fb4f30c172 100644 --- a/examples/l3fwd/Makefile +++ b/examples/l3fwd/Makefile @@ -8,8 +8,10 @@ APP = l3fwd SRCS-y := main.c l3fwd_lpm.c l3fwd_em.c l3fwd_event.c SRCS-y += l3fwd_event_generic.c l3fwd_event_internal_port.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -20,8 +22,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) # Added for 'rte_eth_link_to_str()' diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile index fa608c56a0..c5c342d8e5 100644 --- a/examples/link_status_interrupt/Makefile +++ b/examples/link_status_interrupt/Makefile @@ -7,8 +7,10 @@ APP = link_status_interrupt # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/multi_process/client_server_mp/mp_client/Makefile b/examples/multi_process/client_server_mp/mp_client/Makefile index bc00a1c875..e694b5659e 100644 --- a/examples/multi_process/client_server_mp/mp_client/Makefile +++ b/examples/multi_process/client_server_mp/mp_client/Makefile @@ -9,8 +9,10 @@ SRCS-y := client.c CFLAGS += -I../shared +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -21,8 +23,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/multi_process/client_server_mp/mp_server/Makefile b/examples/multi_process/client_server_mp/mp_server/Makefile index d066524b36..39c481171a 100644 --- a/examples/multi_process/client_server_mp/mp_server/Makefile +++ b/examples/multi_process/client_server_mp/mp_server/Makefile @@ -9,8 +9,10 @@ SRCS-y := main.c init.c args.c CFLAGS += -I../shared +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -21,8 +23,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/multi_process/hotplug_mp/Makefile b/examples/multi_process/hotplug_mp/Makefile index 3122449d62..f72e3442db 100644 --- a/examples/multi_process/hotplug_mp/Makefile +++ b/examples/multi_process/hotplug_mp/Makefile @@ -7,8 +7,10 @@ APP = hotplug_mp # all source are stored in SRCS-y SRCS-y := main.c commands.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/multi_process/simple_mp/Makefile b/examples/multi_process/simple_mp/Makefile index d03597c4c2..32ab346449 100644 --- a/examples/multi_process/simple_mp/Makefile +++ b/examples/multi_process/simple_mp/Makefile @@ -7,8 +7,10 @@ APP = simple_mp # all source are stored in SRCS-y SRCS-y := main.c mp_commands.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/multi_process/symmetric_mp/Makefile b/examples/multi_process/symmetric_mp/Makefile index 45b7214cba..8dc6f56857 100644 --- a/examples/multi_process/symmetric_mp/Makefile +++ b/examples/multi_process/symmetric_mp/Makefile @@ -7,8 +7,10 @@ APP = symmetric_mp # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/ntb/Makefile b/examples/ntb/Makefile index d35dabc471..2fa9a05823 100644 --- a/examples/ntb/Makefile +++ b/examples/ntb/Makefile @@ -7,8 +7,10 @@ APP = ntb_fwd # all source are stored in SRCS-y SRCS-y := ntb_fwd.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - CFLAGS += -D_FILE_OFFSET_BITS=64 LDFLAGS += -pthread diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile index 09abda91ea..de1a8b9b47 100644 --- a/examples/packet_ordering/Makefile +++ b/examples/packet_ordering/Makefile @@ -7,8 +7,10 @@ APP = packet_ordering # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/performance-thread/l3fwd-thread/Makefile b/examples/performance-thread/l3fwd-thread/Makefile index ca1a5d087e..6a878482a3 100644 --- a/examples/performance-thread/l3fwd-thread/Makefile +++ b/examples/performance-thread/l3fwd-thread/Makefile @@ -9,10 +9,12 @@ SRCS-y := main.c include ../common/common.mk +PKGCONF ?= pkg-config + CFLAGS += -DALLOW_EXPERIMENTAL_API # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -23,7 +25,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) diff --git a/examples/performance-thread/pthread_shim/Makefile b/examples/performance-thread/pthread_shim/Makefile index 6b19ff63fe..bf5458e3c7 100644 --- a/examples/performance-thread/pthread_shim/Makefile +++ b/examples/performance-thread/pthread_shim/Makefile @@ -13,8 +13,10 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -D_GNU_SOURCE LDFLAGS += "-Wl,--copy-dt-needed-entries" +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -27,8 +29,6 @@ static: build/$(APP)-static LDFLAGS += -lpthread -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/pipeline/Makefile b/examples/pipeline/Makefile index d0a1f02e1c..86bcc00bd2 100644 --- a/examples/pipeline/Makefile +++ b/examples/pipeline/Makefile @@ -11,8 +11,10 @@ SRCS-y += main.c SRCS-y += obj.c SRCS-y += thread.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -23,8 +25,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile index 9f56a5e7a0..37c32ff873 100644 --- a/examples/ptpclient/Makefile +++ b/examples/ptpclient/Makefile @@ -7,8 +7,10 @@ APP = ptpclient # all source are stored in SRCS-y SRCS-y := ptpclient.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile index 7a53818296..5558ba939a 100644 --- a/examples/qos_meter/Makefile +++ b/examples/qos_meter/Makefile @@ -7,8 +7,10 @@ APP = qos_meter # all source are stored in SRCS-y SRCS-y := main.c rte_policer.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile index f42406fe1c..0a748f5277 100644 --- a/examples/qos_sched/Makefile +++ b/examples/qos_sched/Makefile @@ -7,8 +7,10 @@ APP = qos_sched # all source are stored in SRCS-y SRCS-y := main.c args.c init.c app_thread.c cfg_file.c cmdline.c stats.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/rxtx_callbacks/Makefile b/examples/rxtx_callbacks/Makefile index a618cdf751..d11e0b4153 100644 --- a/examples/rxtx_callbacks/Makefile +++ b/examples/rxtx_callbacks/Makefile @@ -7,8 +7,10 @@ APP = rxtx_callbacks # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/server_node_efd/node/Makefile b/examples/server_node_efd/node/Makefile index 2120de5397..2c93872e5b 100644 --- a/examples/server_node_efd/node/Makefile +++ b/examples/server_node_efd/node/Makefile @@ -9,8 +9,10 @@ SRCS-y := node.c CFLAGS += -I../shared +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -21,8 +23,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/server_node_efd/server/Makefile b/examples/server_node_efd/server/Makefile index 6b5878d8c0..f51ef134dc 100644 --- a/examples/server_node_efd/server/Makefile +++ b/examples/server_node_efd/server/Makefile @@ -9,8 +9,10 @@ SRCS-y := main.c init.c args.c CFLAGS += -I../shared +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -21,8 +23,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/service_cores/Makefile b/examples/service_cores/Makefile index 754333c878..2054677f96 100644 --- a/examples/service_cores/Makefile +++ b/examples/service_cores/Makefile @@ -7,8 +7,10 @@ APP = service_cores # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile index 4fa97cb975..4be77631ee 100644 --- a/examples/skeleton/Makefile +++ b/examples/skeleton/Makefile @@ -7,8 +7,10 @@ APP = basicfwd # all source are stored in SRCS-y SRCS-y := basicfwd.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/timer/Makefile b/examples/timer/Makefile index 70b1af9f4b..1c8b8f294e 100644 --- a/examples/timer/Makefile +++ b/examples/timer/Makefile @@ -7,8 +7,10 @@ APP = timer # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/vdpa/Makefile b/examples/vdpa/Makefile index c4b2184ead..369ff331e1 100644 --- a/examples/vdpa/Makefile +++ b/examples/vdpa/Makefile @@ -8,8 +8,10 @@ APP = vdpa SRCS-y := main.c CFLAGS += -DALLOW_EXPERIMENTAL_API +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -20,8 +22,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile index 8c969caaad..2b88a38fc3 100644 --- a/examples/vhost/Makefile +++ b/examples/vhost/Makefile @@ -7,8 +7,10 @@ APP = vhost-switch # all source are stored in SRCS-y SRCS-y := main.c virtio_net.c ioat.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -21,8 +23,6 @@ static: build/$(APP)-static LDFLAGS += -pthread -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/vhost_blk/Makefile b/examples/vhost_blk/Makefile index 792591386e..c6a1f76633 100644 --- a/examples/vhost_blk/Makefile +++ b/examples/vhost_blk/Makefile @@ -7,8 +7,10 @@ APP = vhost-blk # all source are stored in SRCS-y SRCS-y := blk.c vhost_blk.c vhost_blk_compat.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - LDFLAGS += -pthread PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) diff --git a/examples/vhost_crypto/Makefile b/examples/vhost_crypto/Makefile index 27abd91998..cc7f2abb90 100644 --- a/examples/vhost_crypto/Makefile +++ b/examples/vhost_crypto/Makefile @@ -8,8 +8,10 @@ APP = vhost-crypto SRCS-y := main.c CFLAGS += -DALLOW_EXPERIMENTAL_API +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -20,8 +22,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile index 8ac1180b2f..c462f49fcf 100644 --- a/examples/vm_power_manager/Makefile +++ b/examples/vm_power_manager/Makefile @@ -1,8 +1,10 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2020 Intel Corporation +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -25,8 +27,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/vm_power_manager/guest_cli/Makefile b/examples/vm_power_manager/guest_cli/Makefile index 1ee1ca1017..751ca6e185 100644 --- a/examples/vm_power_manager/guest_cli/Makefile +++ b/examples/vm_power_manager/guest_cli/Makefile @@ -7,8 +7,10 @@ APP = guest_vm_power_mgr # all source are stored in SRCS-y SRCS-y := main.c vm_power_cli_guest.c parse.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile index 749ed53c6f..cc976384fa 100644 --- a/examples/vmdq/Makefile +++ b/examples/vmdq/Makefile @@ -7,8 +7,10 @@ APP = vmdq_app # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile index 1dd42105d6..a34e7e36d4 100644 --- a/examples/vmdq_dcb/Makefile +++ b/examples/vmdq_dcb/Makefile @@ -7,8 +7,10 @@ APP = vmdq_dcb_app # all source are stored in SRCS-y SRCS-y := main.c +PKGCONF ?= pkg-config + # Build using pkg-config variables if possible -ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0) $(error "no installation of DPDK found") endif @@ -19,8 +21,6 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PKGCONF ?= pkg-config - PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-06-12 06:53:58.710398300 +0800 +++ 0082-examples-fix-pkg-config-override.patch 2021-06-12 06:53:56.400000000 +0800 @@ -1 +1 @@ -From 11e027022d0f72f3cd7419b83e69a9ceb342666d Mon Sep 17 00:00:00 2001 +From 10ddae775cb9eecad1351c2952bc1fe57e9df570 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 11e027022d0f72f3cd7419b83e69a9ceb342666d ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org @@ -75 +77 @@ -index 03bf1edb10..86ac8a4009 100644 +index 2f156736d1..942e106ac2 100644 @@ -100 +102 @@ -index 313a5389ee..ad711a5bee 100644 +index 8700b589fb..d96afe2cba 100644 @@ -125 +127 @@ -index 0b6a3c6dd5..8a2d3b4b5a 100644 +index 09da84ba0b..fd7ae682a4 100644 @@ -150 +152 @@ -index 9630fea3f8..d4d43fbfca 100644 +index d7615f9a32..ade6df08b3 100644 @@ -175 +177 @@ -index 685afbdf3c..5b4f02d4b9 100644 +index 93ef5c27c3..cda3f14252 100644 @@ -223 +225 @@ -index 5cf88ca41a..962ff96368 100644 +index f5072a2b0c..faf667a54a 100644 @@ -248 +250 @@ -index 1cc33450c1..ff3cd4a87a 100644 +index 8f82a4c6c5..c41fdb0006 100644 @@ -273 +275 @@ -index 1caa93a9ba..539bf9682b 100644 +index 4c215daf1b..7e892405de 100644 @@ -298 +300 @@ -index b0cdeab3ac..411297597e 100644 +index 9bc9179346..7453414d24 100644 @@ -323 +325 @@ -index 1b4dfcdde9..2a6a2f1527 100644 +index 436569f5a6..b16773a02f 100644 @@ -348 +350 @@ -index c82ba17582..178fc8778c 100644 +index c13ad8d8af..c7a54bffbf 100644 @@ -373 +375 @@ -index b5b546e200..48ac67be5e 100644 +index f6baf635bb..c7a27e4f14 100644 @@ -396 +398 @@ - LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) + CFLAGS += -DALLOW_EXPERIMENTAL_API @@ -398 +400 @@ -index 96f492a5ea..785c7ee38c 100644 +index 4b391973cb..e71cd61b43 100644 @@ -423 +425 @@ -index f9d0e5a6c3..f940cbfd05 100644 +index 740f4721d0..28158225a6 100644 @@ -448 +450 @@ -index 55a7ac6d85..89af54bd37 100644 +index 7670cc3684..94a685a9ce 100644 @@ -473 +475 @@ -index 614b177057..971fa4ef0c 100644 +index 7ea44e6f63..2f054fe27d 100644 @@ -498 +500 @@ -index f87e93dcf8..753cb96f5f 100644 +index bbf3bcae12..3dad5329d8 100644 @@ -523 +525 @@ -index 85066612bc..23a09550a4 100644 +index 9ba1135612..532db37ba6 100644 @@ -548 +550 @@ -index 8d44e95ed7..1657f3c351 100644 +index 7731eccd03..09aec4d52d 100644 @@ -573 +575 @@ -index 1570b1f839..4d041ba3db 100644 +index 384224b24a..e011e31d1e 100644 @@ -598 +600 @@ -index 1a8842c64f..ec498169da 100644 +index fcb60b2a33..9a71c68fa8 100644 @@ -623 +625 @@ -index bcc075f0d9..5b6e3e3905 100644 +index 09a891149b..ace9b4687e 100644 @@ -648 +650 @@ -index ef4950f239..22aa6af511 100644 +index 8b329a78b1..00d364fcbf 100644 @@ -673 +675 @@ -index 44bc9ef4d3..79c9dc0f25 100644 +index b180deb862..85669a298a 100644 @@ -698 +700 @@ -index 49ad698117..85fd2c47a1 100644 +index 3420ea3a9c..f5d2099d8b 100644 @@ -723 +725 @@ -index 9622e2358b..f64ccc6d59 100644 +index 6e3d0bca06..4f6ee27272 100644 @@ -745 +747 @@ - CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) + CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) -DALLOW_EXPERIMENTAL_API @@ -748 +750 @@ -index 50edc34e6a..0a6aa5a3a4 100644 +index d69854c9f8..d1eb10e6e1 100644 @@ -773 +775 @@ -index 2381a215f0..0badedb499 100644 +index 7e70bbd826..fb4f30c172 100644 @@ -777 +779 @@ - SRCS-y := main.c l3fwd_lpm.c l3fwd_fib.c l3fwd_em.c l3fwd_event.c + SRCS-y := main.c l3fwd_lpm.c l3fwd_em.c l3fwd_event.c @@ -798 +800 @@ -index 583a847364..c892d828d5 100644 +index fa608c56a0..c5c342d8e5 100644 @@ -823 +825 @@ -index 2c389f35b7..26e774fd5c 100644 +index bc00a1c875..e694b5659e 100644 @@ -848 +850 @@ -index bc04ab733e..c564286d4b 100644 +index d066524b36..39c481171a 100644 @@ -873 +875 @@ -index 75ae8eb9a7..6b20d6e49a 100644 +index 3122449d62..f72e3442db 100644 @@ -898 +900 @@ -index 675e8c3f9f..1d0a260e64 100644 +index d03597c4c2..32ab346449 100644 @@ -923 +925 @@ -index 5a671e54af..e76acb89b2 100644 +index 45b7214cba..8dc6f56857 100644 @@ -948 +950 @@ -index 8e1f52f17f..d9b6e53090 100644 +index d35dabc471..2fa9a05823 100644 @@ -973 +975 @@ -index dcf583ec06..47b64888ef 100644 +index 09abda91ea..de1a8b9b47 100644 @@ -998 +1000 @@ -index 4f518358d0..14ce9c0eb2 100644 +index ca1a5d087e..6a878482a3 100644 @@ -1001,3 +1003,3 @@ -@@ -17,10 +17,12 @@ $(error "Cannot generate statically-linked binaries with this version of pkg-con - endif - endif +@@ -9,10 +9,12 @@ SRCS-y := main.c + + include ../common/common.mk @@ -1015 +1017 @@ -@@ -31,7 +33,6 @@ shared: build/$(APP)-shared +@@ -23,7 +25,6 @@ shared: build/$(APP)-shared @@ -1024 +1026 @@ -index 5aa401dc49..5acf74fff3 100644 +index 6b19ff63fe..bf5458e3c7 100644 @@ -1027 +1029 @@ -@@ -21,8 +21,10 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API +@@ -13,8 +13,10 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API @@ -1039 +1041 @@ -@@ -35,8 +37,6 @@ static: build/$(APP)-static +@@ -27,8 +29,6 @@ static: build/$(APP)-static @@ -1049 +1051 @@ -index fcba51fd4d..c19df3a489 100644 +index d0a1f02e1c..86bcc00bd2 100644 @@ -1074 +1076 @@ -index f0d38c5c49..909bb65257 100644 +index 9f56a5e7a0..37c32ff873 100644 @@ -1099 +1101 @@ -index 1772c75a1e..de5b435166 100644 +index 7a53818296..5558ba939a 100644 @@ -1124 +1126 @@ -index 8187542eb1..346d66d41e 100644 +index f42406fe1c..0a748f5277 100644 @@ -1149 +1151 @@ -index 4296b19f67..f980b033cb 100644 +index a618cdf751..d11e0b4153 100644 @@ -1174 +1176 @@ -index 56550e6fe1..115e2da7a0 100644 +index 2120de5397..2c93872e5b 100644 @@ -1199 +1201 @@ -index 50e18e150e..8eb75fe352 100644 +index 6b5878d8c0..f51ef134dc 100644 @@ -1224 +1226 @@ -index df0284bd01..8cc00cf02c 100644 +index 754333c878..2054677f96 100644 @@ -1249 +1251 @@ -index bbd2dc181c..026ee48a88 100644 +index 4fa97cb975..4be77631ee 100644 @@ -1274 +1276 @@ -index 4c0a0f62f9..a74f3c3254 100644 +index 70b1af9f4b..1c8b8f294e 100644 @@ -1299 +1301 @@ -index 470ca57dfc..d974db4f40 100644 +index c4b2184ead..369ff331e1 100644 @@ -1324 +1326 @@ -index 145b3f79a4..587ea2ab47 100644 +index 8c969caaad..2b88a38fc3 100644 @@ -1349 +1351 @@ -index 2fe199454a..79fcee6131 100644 +index 792591386e..c6a1f76633 100644 @@ -1374 +1376 @@ -index ce6f046244..84de8431a6 100644 +index 27abd91998..cc7f2abb90 100644 @@ -1399 +1401 @@ -index 2fff8dadda..d2f83f0da1 100644 +index 8ac1180b2f..c462f49fcf 100644 @@ -1424 +1426 @@ -index e9dff47534..17b52f23b8 100644 +index 1ee1ca1017..751ca6e185 100644 @@ -1449 +1451 @@ -index 8edda6cd63..34c7778ec0 100644 +index 749ed53c6f..cc976384fa 100644 @@ -1474 +1476 @@ -index b5d2efa4af..d784586f6a 100644 +index 1dd42105d6..a34e7e36d4 100644