[U-Boot] how are "CONFIG_*" variables processed by Makefiles?

Robert P. J. Day rpjday at crashcourse.ca
Wed Nov 14 16:35:15 CET 2012


  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.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================


More information about the U-Boot mailing list