What changed, and why it matters
This commit only adds '.PHONY' declarations to many Makefiles. These declarations tell the build system that certain target names are not real files, preventing build mistakes if a file with the same name happens to exist. There is no change to the actual firmware, cryptography, or any code that runs on the device.
No security action needed. This is a routine developer-experience/build-correctness change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is a pure build-system hygiene change. It adds .PHONY target lists to 17 Makefiles and removes a redundant .PHONY line in core/Makefile and core/Makefile.scons. No source code, build commands, compiler flags, dependencies, or generated artifacts are modified. The change cannot affect runtime behavior, attack surface, or security properties of the firmware.
Changed components
Build system (Makefiles only)Inspect captured patch +110 / −8
diff --git a/Makefile b/Makefile
index 736d1498..3f31072f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,29 @@
+.PHONY: help \
+ style_check style \
+ pystyle_check pystyle_quick_check pystyle \
+ changelog_check changelog_style \
+ translations_style translations_style_check \
+ yaml_check editor_check \
+ cstyle_check cstyle \
+ protostyle protostyle_check \
+ defs_check \
+ ruststyle ruststyle_check \
+ typecheck pyright \
+ mocks mocks_check \
+ templates templates_check \
+ solana_templates solana_templates_check \
+ icons icons_check \
+ protobuf protobuf_check \
+ docs_summary_check \
+ vendorheader vendorheader_check \
+ bootloader_hashes bootloader_hashes_check \
+ lsgen lsgen_check \
+ tropic_config tropic_config_check \
+ hsm_keys hsm_keys_check \
+ prodtest_error_codes prodtest_error_codes_check \
+ gen gen_check \
+ uvlock_check
+
## help commands:
help: ## show this help
diff --git a/ci/hardware_tests/tpmb/Makefile b/ci/hardware_tests/tpmb/Makefile
index c8280fd0..2262eff6 100644
--- a/ci/hardware_tests/tpmb/Makefile
+++ b/ci/hardware_tests/tpmb/Makefile
@@ -1,3 +1,5 @@
+.PHONY: default compile
+
default: compile
compile:
diff --git a/common/protob/Makefile b/common/protob/Makefile
index 54b2173a..2930289b 100644
--- a/common/protob/Makefile
+++ b/common/protob/Makefile
@@ -1,3 +1,5 @@
+.PHONY: check combine clean
+
check: messages.pb messages-bitcoin.pb messages-ble.pb messages-bootloader.pb messages-cardano.pb messages-common.pb messages-crypto.pb messages-debug.pb messages-ethereum.pb messages-management.pb messages-monero.pb messages-nem.pb messages-ripple.pb messages-stellar.pb messages-tezos.pb messages-tron.pb messages-eos.pb messages-solana.pb messages-definitions.pb messages-telemetry.pb
%.pb: %.proto
diff --git a/common/udev/dist/Makefile b/common/udev/dist/Makefile
index dff2eb29..cc8bde3d 100644
--- a/common/udev/dist/Makefile
+++ b/common/udev/dist/Makefile
@@ -1,3 +1,5 @@
+.PHONY: all shell
+
VOL_MOUNT = -v $(shell pwd):/release
IMAGETAG = trezor-udev-build-env
diff --git a/core/Makefile b/core/Makefile
index 02e14ea7..3d4efc06 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1,5 +1,29 @@
-.PHONY: vendor
+.PHONY: help \
+ vendor \
+ run emu \
+ test test_rust \
+ test_emu_sanity test_emu test_emu_multicore test_emu_monero \
+ test_emu_u2f test_emu_fido2 \
+ test_emu_click test_emu_click_ui test_emu_click_ui_multicore \
+ test_emu_persistence test_emu_persistence_ui test_emu_upgrade \
+ test_emu_ui test_emu_ui_multicore test_emu_ui_record test_emu_ui_record_multicore \
+ pylint mypy typecheck pyright clippy \
+ audit_rust vet_rust \
+ templates templates_check translations translations_check \
+ translations_crowdin_push translations_crowdin_pull \
+ build build_embed \
+ build_boardloader build_bootloader build_bootloader_ci \
+ build_bootloader_emu build_bootloader_emu_debug \
+ build_prodtest build_prodtest_emu build_secmon build_firmware \
+ build_unix build_unix_frozen build_unix_debug \
+ clean \
+ flash flash_boardloader flash_bootloader flash_bootloader_ci \
+ flash_prodtest flash_firmware \
+ flash_erase flash_erase_bootloader flash_erase_firmware flash_erase_storage \
+ gdb_boardloader gdb_bootloader gdb_prodtest gdb_firmware \
+ bloaty combine combine_fw upload upload_prodtest \
+ coverage unused
BUILD_DIR = build-xtask/artifacts/latest
@@ -350,6 +374,3 @@ coverage: $(COVERAGE_BUILD_DEP) ## generate coverage report
unused: ## find unused micropython code
vulture src src/_vulture_ignore.txt --exclude "messages.py,*/enums/*"
-
-
-.PHONY: templates translations templates_check translations_check
diff --git a/core/Makefile.scons b/core/Makefile.scons
index debd175f..0a10702a 100644
--- a/core/Makefile.scons
+++ b/core/Makefile.scons
@@ -1,5 +1,35 @@
-.PHONY: vendor
+.PHONY: help \
+ vendor \
+ run emu \
+ test test_rust \
+ test_emu_sanity test_emu test_emu_multicore test_emu_monero \
+ test_emu_u2f test_emu_fido2 \
+ test_emu_click test_emu_click_ui test_emu_click_ui_multicore \
+ test_emu_persistence test_emu_persistence_ui test_emu_upgrade \
+ test_emu_ui test_emu_ui_multicore test_emu_ui_record test_emu_ui_record_multicore \
+ pylint mypy typecheck pyright clippy \
+ audit_rust \
+ templates templates_check translations translations_check \
+ translations_crowdin_push translations_crowdin_pull \
+ build build_embed \
+ build_boardloader build_bootloader build_bootloader_ci \
+ build_bootloader_emu build_bootloader_emu_debug \
+ build_prodtest build_prodtest_emu build_secmon build_kernel \
+ build_firmware build_unix build_unix_frozen build_unix_debug build_cross \
+ clean \
+ clean_boardloader clean_bootloader clean_bootloader_ci clean_bootloader_emu \
+ clean_prodtest clean_prodtest_emu clean_secmon clean_kernel \
+ clean_firmware clean_unix clean_cross \
+ flash flash_boardloader flash_bootloader flash_bootloader_ci \
+ flash_prodtest flash_firmware flash_combine \
+ flash_erase flash_erase_bootloader flash_erase_firmware \
+ flash_read_storage flash_erase_storage \
+ flash_bootloader_jlink flash_bootloader_ci_jlink flash_firmware_jlink \
+ openocd openocd_reset \
+ gdb_boardloader gdb_bootloader gdb_prodtest gdb_firmware \
+ bloaty sizecheck combine combine_fw combine_to_hex upload upload_prodtest \
+ coverage unused
# get the number of CPU cores in a "portable" manner
# (accounting for darwin and big.LITTLE archs)
@@ -567,6 +597,3 @@ coverage: $(COVERAGE_BUILD_DEP) ## generate coverage report
unused: ## find unused micropython code
vulture src src/_vulture_ignore.txt --exclude "messages.py,*/enums/*"
-
-
-.PHONY: templates translations templates_check translations_check
diff --git a/core/embed/projects/bootloader/protob/pb/Makefile b/core/embed/projects/bootloader/protob/pb/Makefile
index 056629fc..b341147c 100644
--- a/core/embed/projects/bootloader/protob/pb/Makefile
+++ b/core/embed/projects/bootloader/protob/pb/Makefile
@@ -1,3 +1,5 @@
+.PHONY: all clean
+
all: messages.pb.c messages-debug.pb.c
%.pb.c: %.pb %.options
diff --git a/crypto/Makefile b/crypto/Makefile
index d970202f..1cf47018 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -1,3 +1,5 @@
+.PHONY: all tests tools fuzzer clean clean-fuzzer
+
# CLANG_VERSION is empty if the compiler is not clang-based
CLANG_VERSION = $(shell $(CC) --version | sed -nr 's/^.*clang version ([0-9.]+).*$$/\1/p')
CLANG_VERSION_MAJOR = $(shell echo $(CLANG_VERSION) | cut -f1 -d.)
diff --git a/legacy/bootloader/Makefile b/legacy/bootloader/Makefile
index 7df46de9..ee43a17d 100644
--- a/legacy/bootloader/Makefile
+++ b/legacy/bootloader/Makefile
@@ -1,3 +1,5 @@
+.PHONY: all
+
NAME = bootloader-unaligned
OBJS += startup.o
diff --git a/legacy/firmware/Makefile b/legacy/firmware/Makefile
index df0d97a8..f3f82a49 100644
--- a/legacy/firmware/Makefile
+++ b/legacy/firmware/Makefile
@@ -1,3 +1,5 @@
+.PHONY: clean
+
APPVER = 1.8.0
NAME = trezor
diff --git a/legacy/firmware/protob/Makefile b/legacy/firmware/protob/Makefile
index 9ea84b57..776c40ac 100644
--- a/legacy/firmware/protob/Makefile
+++ b/legacy/firmware/protob/Makefile
@@ -1,3 +1,5 @@
+.PHONY: all clean
+
ifneq ($(V),1)
Q := @
endif
diff --git a/legacy/gen/Makefile b/legacy/gen/Makefile
index 4f0e9304..328cc115 100644
--- a/legacy/gen/Makefile
+++ b/legacy/gen/Makefile
@@ -1,3 +1,5 @@
+.PHONY: all clean
+
CC=cc
all: strwidth
diff --git a/legacy/intermediate_fw/Makefile b/legacy/intermediate_fw/Makefile
index 166ddbfb..d2a03d7e 100644
--- a/legacy/intermediate_fw/Makefile
+++ b/legacy/intermediate_fw/Makefile
@@ -1,3 +1,5 @@
+.PHONY: clean flash_intermediate_fw openocd_reset
+
APPVER = 1.8.0
NAME = trezor
diff --git a/storage/tests/c/Makefile b/storage/tests/c/Makefile
index 8116f96f..3c8cfa80 100644
--- a/storage/tests/c/Makefile
+++ b/storage/tests/c/Makefile
@@ -1,3 +1,5 @@
+.PHONY: clean
+
CC = cc
CFLAGS = -Wall -Wshadow -Wextra -Wpedantic -Werror -Wno-missing-braces
diff --git a/storage/tests/c0/Makefile b/storage/tests/c0/Makefile
index e6375f19..cc1393be 100644
--- a/storage/tests/c0/Makefile
+++ b/storage/tests/c0/Makefile
@@ -1,3 +1,5 @@
+.PHONY: clean
+
CC=cc
CFLAGS=-Wall -fPIC
LIBS=
diff --git a/storage/tests/c3/Makefile b/storage/tests/c3/Makefile
index 7bef97ae..0785fd35 100644
--- a/storage/tests/c3/Makefile
+++ b/storage/tests/c3/Makefile
@@ -1,3 +1,5 @@
+.PHONY: clean
+
CC = cc
CFLAGS = -Wall -Wshadow -Wextra -Wpedantic -Werror -Wno-missing-braces
diff --git a/tests/fido_tests/u2f-tests-hid/Makefile b/tests/fido_tests/u2f-tests-hid/Makefile
index d705c2b9..dbd9c7d4 100644
--- a/tests/fido_tests/u2f-tests-hid/Makefile
+++ b/tests/fido_tests/u2f-tests-hid/Makefile
@@ -4,6 +4,8 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
+.PHONY: all clean
+
all: HIDTest U2FTest
CC ?= cc
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.