From patchwork Fri Nov 13 05:43:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 544030 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id BA860141431 for ; Fri, 13 Nov 2015 16:44:04 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B06904B9DF; Fri, 13 Nov 2015 06:44:01 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 969eqwuGbqQk; Fri, 13 Nov 2015 06:44:01 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D32074B9D2; Fri, 13 Nov 2015 06:44:00 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 88B574B9CE for ; Fri, 13 Nov 2015 06:43:56 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aFqNiTJNiwEE for ; Fri, 13 Nov 2015 06:43:56 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by theia.denx.de (Postfix) with ESMTPS id 0EEC94B9C7 for ; Fri, 13 Nov 2015 06:43:52 +0100 (CET) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id tAD5hkWX014416; Thu, 12 Nov 2015 23:43:46 -0600 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id tAD5hkTe030304; Thu, 12 Nov 2015 23:43:46 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.224.2; Thu, 12 Nov 2015 23:43:46 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id tAD5hji7024496; Thu, 12 Nov 2015 23:43:45 -0600 From: Nishanth Menon To: Simon Glass , Tom Rini , Masahiro Yamada , Daniel Schwierzeck , Michal Marek , Stefan Roese , Bin Meng Date: Thu, 12 Nov 2015 23:43:31 -0600 Message-ID: <1447393422-4169-2-git-send-email-nm@ti.com> X-Mailer: git-send-email 2.6.2.402.g2635c2b In-Reply-To: <1447393422-4169-1-git-send-email-nm@ti.com> References: <1447393422-4169-1-git-send-email-nm@ti.com> MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH V2 01/12] Makefile: Include vendor common library in include search path X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" When the vendor common libraries exists, then board should be able to reference headers located from a generic base, rather than having to do weird logic such as '#include "../common/xyz.h"'. There are multiple options of implementation, the current strategy expects that: a) Vendor boards that need generic files will define build in: board/$(VENDOR)/common b) Vendor boards that expose generic functions from (a) for usage from other board specific files will provide these headers in: board/$(VENDOR)/common/include/board-common c) Vendor board files that need these function services will refer #include Where, xyz.h is an example header exposing generic vendor common functions. Cc: Simon Glass Cc: Tom Rini Cc: Masahiro Yamada Cc: Daniel Schwierzeck Cc: Michal Marek Cc: Stefan Roese Cc: Bin Meng Signed-off-by: Nishanth Menon --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 61050adb13f5..e7a3e2b4de51 100644 --- a/Makefile +++ b/Makefile @@ -626,6 +626,9 @@ c_flags := $(KBUILD_CFLAGS) $(cpp_flags) # U-Boot objects....order is important (i.e. start must be first) HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makefile),y,n) +# Include vendor headers - they should be in the following location. +# board/$(VENDOR)/common/include/board-common +UBOOTINCLUDE += $(if $(HAVE_VENDOR_COMMON_LIB:y=1), -I$(srctree)/board/$(VENDOR)/common/include) libs-y += lib/ libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/