Commit 001f3142c30c35493c57268bd49a4f87f8da9f0d

Authored by Simon Glass
Committed by Tom Rini
1 parent 1fbf97dc45

Makefile: Provide an option to select SPL or TPL

At present we have SPL_ which can be used in Makefiles to select between
normal and SPL CONFIGs like this:

    obj-$(CONFIG_$(SPL_)DM)		+= core/

When TPL is being built, SPL_ has the value 'SPL' which is generally a
good idea since they tend to follow each other. But in extreme situations
we may want to distinugish between SPL and TPL. For example we may not
want to enable CONFIG_DM with TPL.

Add a new SPL_TPL_ variable which is set to either empty (for U-Boot
proper), 'SPL' or 'TPL'. This may prove useful with TPL-specific options.

Signed-off-by: Simon Glass <sjg@chromium.org>

Showing 2 changed files with 12 additions and 0 deletions Side-by-side Diff

scripts/Kbuild.include
... ... @@ -321,7 +321,13 @@
321 321  
322 322 ifdef CONFIG_SPL_BUILD
323 323 SPL_ := SPL_
  324 +ifeq ($(CONFIG_TPL_BUILD),y)
  325 +SPL_TPL_ := TPL_
324 326 else
  327 +SPL_TPL_ := SPL_
  328 +endif
  329 +else
325 330 SPL_ :=
  331 +SPL_TPL_ :=
326 332 endif
scripts/Makefile.spl
... ... @@ -37,8 +37,14 @@
37 37  
38 38 ifdef CONFIG_SPL_BUILD
39 39 SPL_ := SPL_
  40 +ifeq ($(CONFIG_TPL_BUILD),y)
  41 +SPL_TPL_ := TPL_
40 42 else
  43 +SPL_TPL_ := SPL_
  44 +endif
  45 +else
41 46 SPL_ :=
  47 +SPL_TPL_ :=
42 48 endif
43 49  
44 50 include $(srctree)/config.mk