]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Makefile: Allow for board directories to not have a Makefile
authorTom Rini <trini@konsulko.com>
Thu, 21 Sep 2023 23:32:46 +0000 (19:32 -0400)
committerTom Rini <trini@konsulko.com>
Mon, 9 Oct 2023 19:24:31 +0000 (15:24 -0400)
It is entirely possible at this point to have platforms in U-Boot that
do not have board-specific C code (just Kconfig or environment) and so
make it optional to have to descend in to and then build in the board
directory.

Signed-off-by: Tom Rini <trini@konsulko.com>
Makefile
scripts/Makefile.spl

index 4a2d99e1027e49f313e4d5a6d46b146855741274..9d2e31e494ac37ff3dcf41157662b0e28a5a936b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -886,7 +886,7 @@ libs-$(CONFIG_UT_ENV) += test/env/
 libs-$(CONFIG_UT_OPTEE) += test/optee/
 libs-$(CONFIG_UT_OVERLAY) += test/overlay/
 
-libs-y += $(if $(BOARDDIR),board/$(BOARDDIR)/)
+libs-y += $(if $(wildcard $(srctree)/board/$(BOARDDIR)/Makefile),board/$(BOARDDIR)/)
 
 libs-y := $(sort $(libs-y))
 
index 15ac87286d5a07502dc345ec22cdcb2f60822932..32f4384657b1bc64d5bea9e14a8904c314d67cc3 100644 (file)
@@ -96,7 +96,7 @@ c_flags := $(KBUILD_CFLAGS) $(cpp_flags)
 
 HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makefile),y,n)
 
-libs-y += $(if $(BOARDDIR),board/$(BOARDDIR)/)
+libs-y += $(if $(wildcard $(srctree)/board/$(BOARDDIR)/Makefile),board/$(BOARDDIR)/)
 libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/
 
 ifeq ($(CONFIG_TPL_BUILD),y)