From mboxrd@z Thu Jan 1 00:00:00 1970 From: zzs Date: Mon, 28 Mar 2011 17:19:16 +0800 Subject: [U-Boot] without board level config.mk How to add CPPFLAGS In-Reply-To: <20110328085301.DC63AD1BDBF@gemini.denx.de> References: <20110328080338.GB26252@greatfirst.com> <20110328085301.DC63AD1BDBF@gemini.denx.de> Message-ID: <20110328091916.GC26252@greatfirst.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > In message <20110328080338.GB26252@greatfirst.com> you wrote: > > Because the board level config.mk not suggested now(I had seen in some > > email message). So now how can I add my own CPPFLAGS or > > PLATFORM_CPPFLAGS direct in board level Makefile (For some header search > > path)? > > What exactly would you need board specific CPPFLAGS settings for? > I just want to add a -iquote flag for searching my header file which in the linux driver dir. I had wrote a linux driver and has a header file in it. Now I want to write this driver for u-boot. So I think copy that header file to u-boot source tree is not a good idea because I must modify two same file when something wrong. So I want add "-iquote my/header/dir" to CPPFLAGS The Makefile like this : ifeq "$(REPOS_COMMON_DIR)" "" $(error "common repository path must defined in env!") else CPPFLAGS += -iquote $(REPOS_COMMON_DIR)/include -iquote $(REPOS_LINUX_DRIVER_DIR) endif ... COBJS-$(CONFIG_ALTERA_FPGA) += cfg-altera-fpga.o But when make it, the arm-linux-gcc command line not have my "-iquote" flags. Now I add them to both CPPFLAGS and CFLAGS, like this: ifeq "$(REPOS_COMMON_DIR)" "" $(error "common repository path must defined in env!") else CPPFLAGS += -iquote $(REPOS_COMMON_DIR)/include -iquote $(REPOS_LINUX_DRIVER_DIR) CFLAGS += -iquote $(REPOS_COMMON_DIR)/include -iquote $(REPOS_LINUX_DRIVER_DIR) endif ... COBJS-$(CONFIG_ALTERA_FPGA) += cfg-altera-fpga.o It now works! but it's so strange!! Is there any good methods? -- Best Regards, zzs