From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id AABFE256 for ; Tue, 3 May 2016 17:04:33 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 03 May 2016 08:04:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,572,1455004800"; d="scan'208";a="971626661" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 03 May 2016 08:03:43 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u43F3gwS025079; Tue, 3 May 2016 16:03:42 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id u43F3gPs024443; Tue, 3 May 2016 16:03:42 +0100 Received: (from fyigit@localhost) by sivswdev02.ir.intel.com with id u43F3fSB024438; Tue, 3 May 2016 16:03:41 +0100 From: Ferruh Yigit To: dev@dpdk.org Cc: Thomas Monjalon , Ferruh Yigit Date: Tue, 3 May 2016 16:03:39 +0100 Message-Id: <1462287819-24407-1-git-send-email-ferruh.yigit@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <5728A686.5040004@intel.com> References: <5728A686.5040004@intel.com> Subject: [dpdk-dev] [PATCH v2] mk: add rpath for applications X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2016 15:04:34 -0000 Add default library output folder to the library search folder. This is useful for development environment, in production environment DPDK libraries already should be in know locations. Patch removes requirement to set LD_LIBRARY_PATH variable when DPDK compiled as shared library. Signed-off-by: Ferruh Yigit --- mk/rte.app.mk | 4 ++++ scripts/test-null.sh | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mk/rte.app.mk b/mk/rte.app.mk index c66e491..0914e4c 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -185,6 +185,10 @@ LDLIBS += $(_LDLIBS-y) $(CPU_LDLIBS) $(EXTRA_LDLIBS) LDLIBS := $(shell echo $(LDLIBS) | \ awk '{for (i = 1; i <= NF; i++) { if (!seen[$$i]++) print $$i }}') +ifeq ($(RTE_DEVEL_BUILD)$(CONFIG_RTE_BUILD_SHARED_LIB),yy) +LDFLAGS += -rpath=$(RTE_SDK_BIN)/lib +endif + .PHONY: all all: install diff --git a/scripts/test-null.sh b/scripts/test-null.sh index ef6d800..32a47b1 100755 --- a/scripts/test-null.sh +++ b/scripts/test-null.sh @@ -36,7 +36,6 @@ build=${1:-build} coremask=${2:-3} # default using cores 0 and 1 if grep -q SHARED_LIB=y $build/.config; then - export LD_LIBRARY_PATH=$build/lib:$LD_LIBRARY_PATH pmd='-d librte_pmd_null.so' fi -- 2.5.5