From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id CE7DB3195 for ; Fri, 18 Sep 2015 22:32:59 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 18 Sep 2015 13:33:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,554,1437462000"; d="scan'208";a="772118425" Received: from mcarril6-mobl.zpn.intel.com ([10.219.16.35]) by orsmga001.jf.intel.com with ESMTP; 18 Sep 2015 13:32:59 -0700 From: Mario Carrillo To: dev@dpdk.org Date: Fri, 18 Sep 2015 15:33:09 -0500 Message-Id: <1442608390-12537-7-git-send-email-mario.alfredo.c.arevalo@intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1442608390-12537-1-git-send-email-mario.alfredo.c.arevalo@intel.com> References: <1442608390-12537-1-git-send-email-mario.alfredo.c.arevalo@intel.com> Subject: [dpdk-dev] [PATCH 6/7] mk: Add hierarchy-file support (lib) 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: Fri, 18 Sep 2015 20:33:00 -0000 Add hierarchy-file support to the DPDK libs, when invoking "make install H=1" (hierarchy-file) This hierarchy is based on: http://www.freedesktop.org/software/systemd/man/file-hierarchy.html for this case, if the architecture is 64 bits libs will be instaled in: $(DESTDIR)/usr/lib64 else it will be $(DESTDIR)/usr/lib Signed-off-by: Mario Carrillo --- mk/rte.lib.mk | 16 ++++++++++++++++ mk/rte.sdkinstall.mk | 6 ++++++ 2 files changed, 22 insertions(+) diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk index fcc8e20..3b3136a 100644 --- a/mk/rte.lib.mk +++ b/mk/rte.lib.mk @@ -53,6 +53,22 @@ _CLEAN = doclean .PHONY: all all: install +# +# if H (hierarchy-file) varible is equal "1" +# according to architecture. it will install files +# in /usr/lib64/ or /usr/lib +# +ifeq ($(H),1) + @[ -d $(LIB_DIR) ] || mkdir -p $(LIB_DIR) + $(Q)cp -f $(LIB) $(LIB_DIR) +ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) +ifeq ($(CONFIG_RTE_NEXT_ABI),y) + $(Q)ln -s -f $(LIB) $(basename $(basename $(LIB_DIR)/$(LIB))) +else + $(Q)ln -s -f $(LIB) $(basename $(basename $(LIB_DIR)/$(LIB))) +endif +endif +endif .PHONY: install install: build _postinstall diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk index 723fd97..b506959 100644 --- a/mk/rte.sdkinstall.mk +++ b/mk/rte.sdkinstall.mk @@ -59,9 +59,15 @@ DATA_DIR := $(DESTDIR)/usr/share INCLUDE_DIR := $(DESTDIR)/usr/include SBIN_DIR := $(DESTDIR)/usr/sbin BIN_DIR := $(DESTDIR)/usr/bin +ifeq ($(RTE_ARCH),x86_64) +LIB_DIR := $(DESTDIR)/usr/lib64 +else +LIB_DIR := $(DESTDIR)/usr/lib +endif export INCLUDE_DIR export SBIN_DIR export BIN_DIR +export LIB_DIR endif # -- 2.1.0