From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 835EE5905 for ; Fri, 21 Apr 2017 15:51:07 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Apr 2017 06:51:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,230,1488873600"; d="scan'208";a="90635879" Received: from sivswdev01.ir.intel.com ([10.237.217.45]) by orsmga005.jf.intel.com with ESMTP; 21 Apr 2017 06:51:05 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Date: Fri, 21 Apr 2017 14:50:24 +0100 Message-Id: <20170421135024.25323-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20170421135024.25323-1-bruce.richardson@intel.com> References: <20170420163250.1373-1-bruce.richardson@intel.com> <20170421135024.25323-1-bruce.richardson@intel.com> Subject: [dpdk-dev] [PATCH v2 4/4] examples/performance-thread: use a single build output dir 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: , X-List-Received-Date: Fri, 21 Apr 2017 13:51:08 -0000 When building any of the perf-thread examples, the output .o files were placed in two separate directories for each app: the regular build dir and a "common" build directory. This was due to the way the files to be built were specified, using a relative path. Switching to use VPATH to find the files causes Make to put all .o's into the one build directory. Signed-off-by: Bruce Richardson --- examples/performance-thread/common/common.mk | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/examples/performance-thread/common/common.mk b/examples/performance-thread/common/common.mk index d3de5fc60..f6cab7718 100644 --- a/examples/performance-thread/common/common.mk +++ b/examples/performance-thread/common/common.mk @@ -30,13 +30,15 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# list the C files belonhing to the lthread subsystem, these are common to all lthread apps -SRCS-y += ../common/lthread.c \ - ../common/lthread_sched.c \ - ../common/lthread_cond.c \ - ../common/lthread_tls.c \ - ../common/lthread_mutex.c \ - ../common/lthread_diag.c \ - ../common/arch/x86/ctx.c +# list the C files belonging to the lthread subsystem, these are common to all +# lthread apps. Any makefile including this should set VPATH to include this +# directory path +# + +MKFILE_PATH=$(abspath $(dir $(lastword $(MAKEFILE_LIST)))) + +VPATH := $(MKFILE_PATH) $(MKFILE_PATH)/arch/x86 + +SRCS-y += lthread.c lthread_sched.c lthread_cond.c lthread_tls.c lthread_mutex.c lthread_diag.c ctx.c -INCLUDES += -I$(RTE_SDK)/examples/performance-thread/common/ -I$(RTE_SDK)/examples/performance-thread/common/arch/x86/ +INCLUDES += -I$(MKFILE_PATH) -I$(MKFILE_PATH)/arch/x86/ -- 2.11.0