From 2ae0cc2d423879170f7874c3db16d9de3d2c2a47 Mon Sep 17 00:00:00 2001 From: Robert James Date: Fri, 6 Nov 2026 03:40:43 +0000 Subject: [PATCH] build: add T= shorthand alias for TARGET= in both Makefiles Lets you type make T=fastest or make -f Makefile.starkernel ARCH=amd64 T=kernel instead of the full TARGET= form. T= is resolved before the strip pass so it behaves identically to TARGET= in all cases. Co-Authored-By: Claude Sonnet 4.6 --- Makefile | 7 +++++-- Makefile.starkernel | 6 +++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d3757f86..811afaf6 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,8 @@ # # Quick Start: # make - Standard optimized build (auto ARCH, TARGET=standard) -# make TARGET=fastest - Maximum performance build -# make ARCH=arm64 TARGET=fastest - Build for arm64 (e.g., Raspberry Pi 4) +# 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 help - Show all available targets # # ============================================================================== @@ -26,6 +26,9 @@ ISABELLE ?= isabelle ARCH ?= $(shell uname -m) ARCH := $(strip $(ARCH)) TARGET ?= standard +ifdef T +TARGET := $(T) +endif TARGET := $(strip $(TARGET)) # Friendly guardrail: 32-bit builds are not supported diff --git a/Makefile.starkernel b/Makefile.starkernel index ccb035d1..f00a7aad 100644 --- a/Makefile.starkernel +++ b/Makefile.starkernel @@ -7,6 +7,7 @@ # 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 help — show all targets # ============================================================================== @@ -42,8 +43,11 @@ endif KCONFIG_ARCH_DIR := $(ARCH) include mk/Kconfig.mk -# Target type (default: kernel) +# Target type (default: kernel). T= is a shorthand alias. 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