build: T= aliases ARCH= (board/SBC selection), lock StarForth to fastest
T= is now shorthand for ARCH=, selecting the target board (raspi, amd64, aarch64, riscv64). StarForth TARGET is locked to fastest — it's the only build profile. Makefile.starkernel T= wired the same way before ARCH normalization runs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,9 +3,10 @@
|
||||
# ==============================================================================
|
||||
#
|
||||
# Quick Start:
|
||||
# make - Standard optimized build (auto ARCH, TARGET=standard)
|
||||
# make TARGET=fastest - Maximum performance build (T= is a shorthand: make T=fastest)
|
||||
# make ARCH=arm64 T=fastest - Build for arm64 (e.g., Raspberry Pi 4)
|
||||
# make - Build for host arch (fastest profile, always)
|
||||
# make T=raspi - Build for Raspberry Pi 4 (T= is a shorthand for ARCH=)
|
||||
# make T=amd64 - Build for x86_64
|
||||
# make T=riscv64 - Build for RISC-V 64
|
||||
# make help - Show all available targets
|
||||
#
|
||||
# ==============================================================================
|
||||
@@ -22,14 +23,13 @@ CC = gcc
|
||||
# See docs/DEVELOPER.md for installation instructions
|
||||
ISABELLE ?= isabelle
|
||||
|
||||
# Architecture / target selection
|
||||
# Architecture / target selection — T= is a shorthand for ARCH= (board/SBC)
|
||||
ifdef T
|
||||
ARCH ?= $(T)
|
||||
endif
|
||||
ARCH ?= $(shell uname -m)
|
||||
ARCH := $(strip $(ARCH))
|
||||
TARGET ?= standard
|
||||
ifdef T
|
||||
TARGET := $(T)
|
||||
endif
|
||||
TARGET := $(strip $(TARGET))
|
||||
TARGET := fastest
|
||||
|
||||
# Friendly guardrail: 32-bit builds are not supported
|
||||
unsupported_32bit_arches := i386 i486 i586 i686 x86 armv6 armv7 armv7l arm
|
||||
|
||||
+8
-8
@@ -4,10 +4,9 @@
|
||||
#
|
||||
# Quick start:
|
||||
# make -f Makefile.starkernel — build for host arch
|
||||
# make -f Makefile.starkernel ARCH=amd64 qemu — build + boot (x86_64)
|
||||
# make -f Makefile.starkernel ARCH=aarch64 qemu — build + boot (aarch64)
|
||||
# make -f Makefile.starkernel ARCH=riscv64 qemu — build + boot (riscv64)
|
||||
# make -f Makefile.starkernel ARCH=amd64 T=kernel — T= is a shorthand for TARGET=
|
||||
# make -f Makefile.starkernel T=amd64 qemu — build + boot (x86_64) T= is shorthand for ARCH=
|
||||
# make -f Makefile.starkernel T=aarch64 qemu — build + boot (aarch64)
|
||||
# make -f Makefile.starkernel T=riscv64 qemu — build + boot (riscv64)
|
||||
# make -f Makefile.starkernel help — show all targets
|
||||
# ==============================================================================
|
||||
|
||||
@@ -27,6 +26,10 @@ canon_arch = $(strip \
|
||||
$(if $(filter riscv riscv64,$1),riscv64,$1))))))
|
||||
|
||||
UNAME_M := $(shell uname -m)
|
||||
# T= is a shorthand for ARCH= (board/SBC selection)
|
||||
ifdef T
|
||||
ARCH ?= $(T)
|
||||
endif
|
||||
ARCH ?= $(call canon_arch,$(UNAME_M))
|
||||
override ARCH := $(call canon_arch,$(ARCH))
|
||||
|
||||
@@ -43,11 +46,8 @@ endif
|
||||
KCONFIG_ARCH_DIR := $(ARCH)
|
||||
include mk/Kconfig.mk
|
||||
|
||||
# Target type (default: kernel). T= is a shorthand alias.
|
||||
# Target type (default: kernel)
|
||||
TARGET ?= kernel
|
||||
ifdef T
|
||||
TARGET := $(T)
|
||||
endif
|
||||
|
||||
# Kernel-only flags (Phase 6): repointed through the Kconfig bridge, same
|
||||
# drop-in-replacement-for-`?=` behavior as every other family in this
|
||||
|
||||
Reference in New Issue
Block a user