From patchwork Mon Oct 23 11:10:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Eremin-Solenikov X-Patchwork-Id: 116684 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp4524684qgn; Mon, 23 Oct 2017 04:19:09 -0700 (PDT) X-Received: by 10.55.220.195 with SMTP id v186mr2144165qki.324.1508757549065; Mon, 23 Oct 2017 04:19:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508757549; cv=none; d=google.com; s=arc-20160816; b=0ndJGs0PHQRRHUomq4nCiO1Syx1Xlik0s3BdnwR1XBko+LhwSwRM4pkX7E1cwa0k3l 8QQI0E4ptxsW7UPwvst9lLIT+YshWqbDko3IsanibzTEqGLVezdqErYKhsg207MQrjST /uGUSCFgLok+gTO9oWzsGTQBH5citzUSDlhzVAlpjI4r5HUJAGIc71IrpLP2+gMEUCbl rOADAonKStQhkLA/9sbDBC4xqCDaolxvBhOqwajlJt2CzoyXc2UlISxv1Kk8W/1mczH8 c+1Ne0i9j22sNjIYVQep7q9ja71mbo2zKiddwozyS2p8Y0/8eCGkU/a9Q3rxUdI0SV98 N1MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:delivered-to:arc-authentication-results; bh=xcRiRUKrEQ/95O8UsrLWtGIfaCyYsQS8iUaDv2xBqes=; b=PtP8/DyvKxS04ssZ0DqZuqKXN17bxQjJu3Q5kgjo9tBiYn0zFD4ZH4/q4NTB0cRCuI TaFzs28hb2rbkcYfI5wWla2jW0GEZkOdXjeAKezXA0NDja6S7CgBU4YoRygvHfFVzRsl yMjqETW3BpiUhrtF9Vh1nf5BqgJ/+Cen+CjzMF8abEA9PZMEpRL6q5AH3gd/tLWr8ezH I2gwLOiGWCrbLP4AtGEz12DZS1Fjb+ezRkJZPjEGdx7zkpSfY3vgC65W7U8nYw6Sfxiq J4sewe4UNBaVkCOGvyxG4bf6GPkWp5PtZBiBFvboTITD94TE8bGeq9Yk5SPf9vqUTk2T 81kQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id w21si5949299qtk.212.2017.10.23.04.19.08; Mon, 23 Oct 2017 04:19:09 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id BA9A96163C; Mon, 23 Oct 2017 11:19:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_SPAM, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id D42846164A; Mon, 23 Oct 2017 11:12:10 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id AF1CE61617; Mon, 23 Oct 2017 11:12:04 +0000 (UTC) Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by lists.linaro.org (Postfix) with ESMTPS id 62F2761617 for ; Mon, 23 Oct 2017 11:11:12 +0000 (UTC) Received: by mail-lf0-f66.google.com with SMTP id 75so19657508lfx.1 for ; Mon, 23 Oct 2017 04:11:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=xcRiRUKrEQ/95O8UsrLWtGIfaCyYsQS8iUaDv2xBqes=; b=aqFXozn8xW5uMw4SfutysFsjvKuQk2cfeSVDeZrKzaYHOWA/7uKBKfStqijEbvvSbl ZjnqBYByXbSAsESslmcC37S/rUuREYG0zOn7cbIe7rlP5MUzWowu6yHOcXk2rHlZ27yt yykTorCiw0oLmQPNmGiBdfYxlKxXZfl8HqBMrSuCzkDkjR2d4HqXZK/QGDqnggBX2iPu Vf5IL/zs6HHYJtzYfkakRSfV0+oAN5HOFDruFb6HuV9gQX2z3zpE2d5DJ0bcyCAolarB AYVE88F/Xr5w5/BgNvQ0q0bchNViVnRXXi4GXoKG56AGbQTIZPSC9KJJAaTbKrGhHG3z Tt4Q== X-Gm-Message-State: AMCzsaUub1Da7k0F0wm2GPWqV+DSSQ6hw7DWoCLeaMvf4F6xkrt1Oa99 2ze15EZYpgj6OC7FBK0VsVmholmFfK5DPA== X-Google-Smtp-Source: ABhQp+TbpfpLwW8x4wGXL87pyY2WjVuX4YoCVfu+cqk8PTklq/lT1bVBem/X91IMv/x3LJkncjWdTg== X-Received: by 10.46.83.67 with SMTP id t3mr5080927ljd.135.1508757070909; Mon, 23 Oct 2017 04:11:10 -0700 (PDT) Received: from rhovanion.lumag.spb.ru ([94.25.228.135]) by smtp.gmail.com with ESMTPSA id i66sm1854643lji.51.2017.10.23.04.11.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Oct 2017 04:11:10 -0700 (PDT) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Mon, 23 Oct 2017 14:10:35 +0300 Message-Id: <20171023111057.6328-8-dmitry.ereminsolenikov@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171023111057.6328-1-dmitry.ereminsolenikov@linaro.org> References: <20171023111057.6328-1-dmitry.ereminsolenikov@linaro.org> Subject: [lng-odp] [PATCH 07/29] build: move ODP include path to common Makefile.inc X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Signed-off-by: Dmitry Eremin-Solenikov --- Makefile.inc | 12 ++++++++++++ example/Makefile.inc | 12 ++++-------- helper/Makefile.am | 12 ++++-------- helper/test/Makefile.am | 18 +++++------------- platform/Makefile.inc | 2 +- platform/linux-generic/Makefile.am | 8 +------- platform/linux-generic/test/Makefile.inc | 12 ++---------- platform/linux-generic/test/ring/Makefile.am | 2 +- .../test/validation/api/shmem/Makefile.am | 4 ++-- test/Makefile.inc | 17 +++++------------ 10 files changed, 37 insertions(+), 62 deletions(-) create mode 100644 Makefile.inc -- 2.14.2 diff --git a/Makefile.inc b/Makefile.inc new file mode 100644 index 000000000000..10e4041fe662 --- /dev/null +++ b/Makefile.inc @@ -0,0 +1,12 @@ +ODP_INCLUDES = \ + -I$(top_builddir)/platform/@with_platform@/include \ + -I$(top_srcdir)/platform/@with_platform@/include \ + -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \ + -I$(top_srcdir)/include + +HELPER_INCLUDES = \ + -I$(top_srcdir)/helper/include + +LIB = $(top_builddir)/lib diff --git a/example/Makefile.inc b/example/Makefile.inc index 1609066e64c2..498f656faa66 100644 --- a/example/Makefile.inc +++ b/example/Makefile.inc @@ -1,16 +1,12 @@ +include $(top_srcdir)/Makefile.inc + TESTS_ENVIRONMENT = EXEEXT=${EXEEXT} -LIB = $(top_builddir)/lib LDADD = $(LIB)/libodp-linux.la $(LIB)/libodphelper.la $(DPDK_PMDS) AM_CFLAGS = \ -I$(srcdir) \ -I$(top_srcdir)/example \ - -I$(top_srcdir)/platform/@with_platform@/include \ - -I$(top_srcdir)/include/ \ - -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \ - -I$(top_srcdir)/helper/include \ - -I$(top_builddir)/platform/@with_platform@/include \ - -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \ - -I$(top_builddir)/include + $(ODP_INCLUDES) \ + $(HELPER_INCLUDES) AM_LDFLAGS = -L$(LIB) -static diff --git a/helper/Makefile.am b/helper/Makefile.am index ee1c17d6d0a3..2321a2d4f24c 100644 --- a/helper/Makefile.am +++ b/helper/Makefile.am @@ -1,15 +1,11 @@ +include $(top_srcdir)/Makefile.inc + pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libodphelper.pc -LIB = $(top_builddir)/lib AM_CPPFLAGS = \ - -I$(top_builddir)/platform/@with_platform@/include \ - -I$(top_srcdir)/helper/include \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \ - -I$(top_srcdir)/platform/@with_platform@/include \ - -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \ - -I$(top_builddir)/include + $(ODP_INCLUDES) \ + $(HELPER_INCLUDES) AM_LDFLAGS = -version-number '$(ODPHELPER_LIBSO_VERSION)' diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am index 8eee643bee39..27c414aa7461 100644 --- a/helper/test/Makefile.am +++ b/helper/test/Makefile.am @@ -1,25 +1,17 @@ -TESTS_ENVIRONMENT = EXEEXT=${EXEEXT} +include $(top_srcdir)/Makefile.inc -LIB = $(top_builddir)/lib +TESTS_ENVIRONMENT = EXEEXT=${EXEEXT} #in the following line, the libs using the symbols should come before #the libs containing them! The includer is given a chance to add things #before libodp by setting PRE_LDADD before the inclusion. LDADD = $(PRE_LDADD) $(LIB)/libodphelper.la $(LIB)/libodp-linux.la -INCFLAGS = \ - -I$(top_builddir)/platform/@with_platform@/include \ - -I$(top_srcdir)/helper/include \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \ - -I$(top_srcdir)/platform/@with_platform@/include \ - -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/helper - ODP_PLATFORM=${with_platform} -AM_CPPFLAGS = $(INCFLAGS) +AM_CPPFLAGS = \ + $(ODP_INCLUDES) \ + $(HELPER_INCLUDES) AM_LDFLAGS = -static EXECUTABLES = chksum \ diff --git a/platform/Makefile.inc b/platform/Makefile.inc index 0086db779897..4714de0ee805 100644 --- a/platform/Makefile.inc +++ b/platform/Makefile.inc @@ -1,4 +1,4 @@ -LIB = $(top_builddir)/lib +include $(top_srcdir)/Makefile.inc pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libodp-linux.pc diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index c5406760935e..703b12c702ea 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -3,14 +3,8 @@ include $(top_srcdir)/platform/Makefile.inc -AM_CPPFLAGS = -I$(srcdir)/include -AM_CPPFLAGS += -I$(top_srcdir)/include -AM_CPPFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ -AM_CPPFLAGS += -I$(top_builddir)/include -AM_CPPFLAGS += -Iinclude -AM_CPPFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH_DIR) +AM_CPPFLAGS = $(ODP_INCLUDES) AM_CPPFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch/default -AM_CPPFLAGS += -Iinclude AM_CPPFLAGS += -DSYSCONFDIR=\"@sysconfdir@\" AM_CPPFLAGS += $(OPENSSL_CPPFLAGS) diff --git a/platform/linux-generic/test/Makefile.inc b/platform/linux-generic/test/Makefile.inc index dd21917ebfa7..05c89c9132cd 100644 --- a/platform/linux-generic/test/Makefile.inc +++ b/platform/linux-generic/test/Makefile.inc @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.inc + # The following definitions may be used by platform tests that wish to # build specific ODP applications, (i.e those whose do more than validation # test wrapping) @@ -7,16 +9,6 @@ AM_LDFLAGS = -static AM_CFLAGS = $(CUNIT_CFLAGS) LIBCUNIT_COMMON = $(top_builddir)/test/common/libcunit_common.la -LIB = $(top_builddir)/lib LIBODP = $(LIB)/libodphelper.la $(LIB)/libodp-linux.la $(DPDK_PMDS) INCCUNIT_COMMON = -I$(top_srcdir)/test/common -INCODP = \ - -I$(top_builddir)/include \ - -I$(top_builddir)/platform/@with_platform@/include \ - -I$(top_srcdir)/helper/include \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \ - -I$(top_srcdir)/platform/@with_platform@/arch/$(ARCH_DIR) \ - -I$(top_srcdir)/platform/@with_platform@/include \ - -I$(top_srcdir)/test diff --git a/platform/linux-generic/test/ring/Makefile.am b/platform/linux-generic/test/ring/Makefile.am index 376047559cc7..c08959d04f53 100644 --- a/platform/linux-generic/test/ring/Makefile.am +++ b/platform/linux-generic/test/ring/Makefile.am @@ -7,5 +7,5 @@ ring_main_SOURCES = \ ring_basic.c ring_stress.c ring_main_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/include \ - $(INCCUNIT_COMMON) $(INCODP) + $(INCCUNIT_COMMON) $(ODP_INCLUDES) $(HELPER_INCLUDES) ring_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/platform/linux-generic/test/validation/api/shmem/Makefile.am b/platform/linux-generic/test/validation/api/shmem/Makefile.am index 131a511be73b..8753331e0dd2 100644 --- a/platform/linux-generic/test/validation/api/shmem/Makefile.am +++ b/platform/linux-generic/test/validation/api/shmem/Makefile.am @@ -12,11 +12,11 @@ shmem_linux_LDFLAGS = $(AM_LDFLAGS) -lrt shmem_odp1_SOURCES = shmem_odp1.c shmem_odp1.h shmem_common.h shmem_odp1_CFLAGS = $(AM_CFLAGS) \ $(INCCUNIT_COMMON) \ - $(INCODP) + $(ODP_INCLUDES) shmem_odp1_LDADD = $(LIBCUNIT_COMMON) $(LIBODP) shmem_odp2_SOURCES = shmem_odp2.c shmem_odp2.h shmem_common.h shmem_odp2_CFLAGS = $(AM_CFLAGS) \ $(INCCUNIT_COMMON) \ - $(INCODP) + $(ODP_INCLUDES) shmem_odp2_LDADD = $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/Makefile.inc b/test/Makefile.inc index f7c0da21496c..26e188e7d969 100644 --- a/test/Makefile.inc +++ b/test/Makefile.inc @@ -1,21 +1,14 @@ -LIB = $(top_builddir)/lib +include $(top_srcdir)/Makefile.inc #in the following line, the libs using the symbols should come before #the libs containing them! The includer is given a chance to add things #before libodp by setting PRE_LDADD before the inclusion. LDADD = $(PRE_LDADD) $(LIB)/libodphelper.la $(LIB)/libodp-linux.la $(DPDK_PMDS) -INCFLAGS = \ - -I$(top_builddir)/platform/@with_platform@/include \ - -I$(top_srcdir)/helper/include \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \ - -I$(top_srcdir)/platform/@with_platform@/include \ - -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \ - -I$(top_srcdir)/test/common \ - -I$(top_builddir)/include - -AM_CPPFLAGS = $(INCFLAGS) +AM_CPPFLAGS = \ + $(ODP_INCLUDES) \ + $(HELPER_INCLUDES) \ + -I$(top_srcdir)/test/common AM_CFLAGS = $(CUNIT_CFLAGS) AM_LDFLAGS = -L$(LIB) -static