]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Makefile: Provide an option to select SPL or TPL
authorSimon Glass <sjg@chromium.org>
Sun, 2 Apr 2017 15:50:30 +0000 (09:50 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 5 Apr 2017 20:36:58 +0000 (16:36 -0400)
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>
scripts/Kbuild.include
scripts/Makefile.spl

index 1b62aedb00877bb375bf265c4cd5d3c984342553..a3a5c59d0da25446b1407fb013a7ec6e8443a5cc 100644 (file)
@@ -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
index 5370648e853d2d2e9d211069f2dc5d3e12f0f765..4485ea88129f0e58d04be2f052121577b60d2b98 100644 (file)
@@ -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