From: Nishanth Menon Date: Thu, 12 Nov 2015 23:43:31 -0600 Subject: [U-Boot] [PATCH V2 01/12] Makefile: Include vendor common library in include search path In-Reply-To: <1447393422-4169-1-git-send-email-nm@ti.com> References: <1447393422-4169-1-git-send-email-nm@ti.com> Message-ID: <1447393422-4169-2-git-send-email-nm@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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/ -- 2.6.2.402.g2635c2b