[U-Boot] without board level config.mk How to add CPPFLAGS
zzs
zzs213 at 126.com
Mon Mar 28 11:19:16 CEST 2011
> In message <20110328080338.GB26252 at 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
More information about the U-Boot
mailing list