U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] how are "CONFIG_*" variables processed by Makefiles?
Date: Wed, 14 Nov 2012 16:58:44 +0100 (CET)	[thread overview]
Message-ID: <735961133.1325719.1352908723962.JavaMail.root@advansee.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1211141022410.14115@oneiric>

Dear Robert P. J. Day,

On Wednesday, November 14, 2012 4:35:15 PM, Robert P. J. Day wrote:
>   i'm sure there's a trivial explanation for this that i'm missing
>   but
> i'm looking at this snippet from arch/arm/cpu/armv7/omap3/Makefile:
> 
> ... snip ...
> COBJS   += board.o
> COBJS   += clock.o
> COBJS   += mem.o
> COBJS   += sys_info.o
> ifdef CONFIG_SPL_BUILD
> COBJS-$(CONFIG_SPL_OMAP3_ID_NAND)       += spl_id_nand.o
> endif
> 
> COBJS-$(CONFIG_DRIVER_TI_EMAC)  += emac.o
> COBJS-$(CONFIG_EMIF4)   += emif4.o
> COBJS-$(CONFIG_SDRC)    += sdrc.o        <--- this line, eg.
> 
> SRCS    := $(SOBJS:.o=.S) $(COBJS:.o=.c)
> OBJS    := $(addprefix $(obj),$(COBJS) $(COBJS-y) $(SOBJS))
> ... snip ...
> 
>   how does the fact that the beagle that i'm building for, which
> defines:
> 
> include/configs/omap3_beagle.h:#define CONFIG_SDRC
> 
> translate that simple #define into a value that can be used by the
> Makefile to select sdrc.o to be compiled?
> 
>   i'm used to the linux kernel config process which explicitly sets
> the variables to the string "y", so that, in the above, the variable
> $(COBJS-y) would pick up those conditional compilations.
> 
>   but what is happening here?  i'm sure it's simple, i just don't see
> where it's happening in the config and build process.  thanks.

Take a look at the following rule in the main Makefile:
$(obj)include/autoconf.mk: $(obj)include/config.h

Best regards,
Beno?t

  reply	other threads:[~2012-11-14 15:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-14 15:35 [U-Boot] how are "CONFIG_*" variables processed by Makefiles? Robert P. J. Day
2012-11-14 15:58 ` Benoît Thébaudeau [this message]
2012-11-14 15:55   ` Robert P. J. Day

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=735961133.1325719.1352908723962.JavaMail.root@advansee.com \
    --to=benoit.thebaudeau@advansee.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