From 81caf71511fcf21ee6e8c281137030d9fc1283a2 Mon Sep 17 00:00:00 2001 From: Robert James Date: Fri, 6 Nov 2026 03:43:15 +0000 Subject: [PATCH] build: T= aliases ARCH= (board/SBC selection), lock StarForth to fastest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- Makefile | 18 +++++++++--------- Makefile.starkernel | 16 ++++++++-------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 811afaf6..35d6cfa9 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/Makefile.starkernel b/Makefile.starkernel index f00a7aad..80a936c5 100644 --- a/Makefile.starkernel +++ b/Makefile.starkernel @@ -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