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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
+5
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user