From: Macpaul Lin Date: Wed, 15 Dec 2010 15:27:29 +0800 Subject: [U-Boot] [PATCH] config.mk: add drivers as default include PATH Message-ID: <1292398049-3606-1-git-send-email-macpaul@andestech.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Some device drivers and their header files will invoke some definitions for assembly code. If a device is required to be initilized in board.S or in lowlevel_init.S, such memory controller, flash controller, power control units. Sometimes we both need to access these devices in bootstrap process and later in normal operation period. Hence the definitions of these drivers in the header files is required to be found in cpu and board folders. Moreover, these devices is usually built into multiple different SoC with different architectures. So the header files should be able to be shared among the SoCs. Add this CPPFLAGS += -I$(TOPDIR)/drivers into the default include PATH will avoid such code "#include "../../../../../drivers/mtd/flash.h" So this patch is suggested. Signed-off-by: Macpaul Lin --- config.mk | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/config.mk b/config.mk index 19e0a6e..52f2280 100644 --- a/config.mk +++ b/config.mk @@ -178,6 +178,7 @@ ifneq ($(OBJTREE),$(SRCTREE)) CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include endif +CPPFLAGS += -I$(TOPDIR)/drivers CPPFLAGS += -I$(TOPDIR)/include CPPFLAGS += -fno-builtin -ffreestanding -nostdinc \ -isystem $(gccincdir) -pipe $(PLATFORM_CPPFLAGS) -- 1.7.3.2