From: zzs <zzs213@126.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] without board level config.mk How to add CPPFLAGS
Date: Mon, 28 Mar 2011 17:19:16 +0800 [thread overview]
Message-ID: <20110328091916.GC26252@greatfirst.com> (raw)
In-Reply-To: <20110328085301.DC63AD1BDBF@gemini.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
next prev parent reply other threads:[~2011-03-28 9:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-28 8:03 [U-Boot] without board level config.mk How to add CPPFLAGS zzs
2011-03-28 8:53 ` Wolfgang Denk
2011-03-28 9:19 ` zzs [this message]
2011-03-28 10:28 ` Wolfgang Denk
2011-03-28 13:49 ` zzs
2011-03-28 18:15 ` Wolfgang Denk
2011-03-29 1:24 ` zzs
2011-03-29 11:21 ` Wolfgang Denk
2011-03-30 1:22 ` zzs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110328091916.GC26252@greatfirst.com \
--to=zzs213@126.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox