Skip to content

Commit bb15724

Browse files
committed
Refine the build system
The top-level 'Makefile' unconditionally includes mk/{arm,riscv}.mk, and the shell substitutions inside those two files run immediately even when the active architecture is Arm. That is why the "no qemu-riscv32 found" message appears during an Arm build.
1 parent 5ecfd87 commit bb15724

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ CFLAGS := -O -g \
1717
BUILD_SESSION := .session.mk
1818

1919
include mk/common.mk
20-
include mk/arm.mk
21-
include mk/riscv.mk
2220
-include $(BUILD_SESSION)
2321

2422
STAGE0 := shecc
@@ -43,6 +41,7 @@ all: config bootstrap
4341
ifeq (,$(filter $(ARCH),$(ARCHS)))
4442
$(error Support ARM and RISC-V only. Select the target with "ARCH=arm" or "ARCH=riscv")
4543
endif
44+
include mk/$(ARCH).mk
4645

4746
ifneq ("$(wildcard $(PWD)/config)","")
4847
TARGET_EXEC := $($(shell head -1 config | sed 's/.*: \([^ ]*\).*/\1/')_EXEC)

0 commit comments

Comments
 (0)