From b6a5f4a410b72783d78ca44afc80ebe2f6a3c336 Mon Sep 17 00:00:00 2001 From: carbon Date: Sat, 15 Jun 2024 20:27:37 +0800 Subject: [PATCH] buildroot: specify the compilation directory Signed-off-by: carbon --- buildroot-2024.02/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/buildroot-2024.02/Makefile b/buildroot-2024.02/Makefile index e5053e422..09658b498 100644 --- a/buildroot-2024.02/Makefile +++ b/buildroot-2024.02/Makefile @@ -34,8 +34,12 @@ SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ # or avoid confusing packages that can use the O= syntax for out-of-tree # build by preventing it from being forwarded to sub-make calls. ifneq ("$(origin O)", "command line") +ifneq ($(TARGET_OUTPUT_DIR),) +O := $(TARGET_OUTPUT_DIR) +else O := $(CURDIR)/output endif +endif # Check if the current Buildroot execution meets all the pre-requisites. # If they are not met, Buildroot will actually do its job in a sub-make meeting