From: Zong Li <zong.li@sifive.com>
Date: Tue, 27 Jul 2021 09:06:58 +0000 (+0800)
Subject: board: sifive: compile stuff only related to SPL in SPL build
X-Git-Tag: v2025.01-rc5-pxa1908~1742^2~1
X-Git-Url: http://git.dujemihanovic.xyz/img/html/static/%7B%7B%20%28.OutputFormats.Get?a=commitdiff_plain;h=87e84818857db1d710002217eea66bb3596f5571;p=u-boot.git

board: sifive: compile stuff only related to SPL in SPL build

As (3581811dc26f "riscv: sifive/fu540: Move SPL related functions to spl.c"),
we put the SPL stuff in spl.c, we don't need to compile unleashed.c and
unmatched.c in SPL build.

Signed-off-by: Zong Li <zong.li@sifive.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
---

diff --git a/board/sifive/unleashed/Makefile b/board/sifive/unleashed/Makefile
index 5821679dd9..98e9111cbc 100644
--- a/board/sifive/unleashed/Makefile
+++ b/board/sifive/unleashed/Makefile
@@ -2,8 +2,8 @@
 #
 # Copyright (c) 2019 Western Digital Corporation or its affiliates.
 
-obj-y	+= unleashed.o
-
 ifdef CONFIG_SPL_BUILD
 obj-y += spl.o
+else
+obj-y += unleashed.o
 endif
diff --git a/board/sifive/unmatched/Makefile b/board/sifive/unmatched/Makefile
index e00b330e8c..1345330089 100644
--- a/board/sifive/unmatched/Makefile
+++ b/board/sifive/unmatched/Makefile
@@ -2,9 +2,10 @@
 #
 # Copyright (c) 2020-2021 SiFive, Inc
 
-obj-y   += unmatched.o
 obj-$(CONFIG_ID_EEPROM) += hifive-platform-i2c-eeprom.o
 
 ifdef CONFIG_SPL_BUILD
 obj-y += spl.o
+else
+obj-y += unmatched.o
 endif