Skip to content

Commit

Permalink
Makefile: Provide an option to select SPL or TPL
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
sjg20 authored and trini committed Apr 5, 2017
1 parent 1fbf97d commit 001f314
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/Kbuild.include
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,12 @@ endif

ifdef CONFIG_SPL_BUILD
SPL_ := SPL_
ifeq ($(CONFIG_TPL_BUILD),y)
SPL_TPL_ := TPL_
else
SPL_TPL_ := SPL_
endif
else
SPL_ :=
SPL_TPL_ :=
endif
6 changes: 6 additions & 0 deletions scripts/Makefile.spl
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,14 @@ endif

ifdef CONFIG_SPL_BUILD
SPL_ := SPL_
ifeq ($(CONFIG_TPL_BUILD),y)
SPL_TPL_ := TPL_
else
SPL_TPL_ := SPL_
endif
else
SPL_ :=
SPL_TPL_ :=
endif

include $(srctree)/config.mk
Expand Down

0 comments on commit 001f314

Please sign in to comment.