Replace argument recovery with direct build targets. Run host, target, board, coverage, Miri and selected Kani checks while retaining source identities, logs and artifacts, including failed attempts. Keep the PID proof diagnostic exception explicit and match its exact identity alongside passing contract assertions and covers. Validation: final-source verification matrix, assembled workflow tests and documentation build.
32 lines
1.1 KiB
Makefile
32 lines
1.1 KiB
Makefile
SHELL := /bin/sh
|
|
MAKEFLAGS += --no-print-directory
|
|
export CARGO_BUILD_JOBS ?= 2
|
|
|
|
.DEFAULT_GOAL := help
|
|
.DELETE_ON_ERROR:
|
|
|
|
override EMBEDDED_TARGET := thumbv7em-none-eabihf
|
|
CARGO_TARGET_DIR ?= ../target
|
|
override TARGET_DIR := $(CARGO_TARGET_DIR)/$(EMBEDDED_TARGET)/release
|
|
|
|
override BOARDS := geprc-f722-v2 kakute-f7-mini-v3
|
|
override BOARD_PACKAGES := $(addprefix kaptan-,$(BOARDS))
|
|
override BOARD_PACKAGE_ARGS := $(addprefix -p ,$(BOARD_PACKAGES))
|
|
override BOARD_BIN_ARGS := $(addprefix --bin ,$(BOARD_PACKAGES))
|
|
|
|
.NOTPARALLEL:
|
|
.PHONY: help build
|
|
|
|
help:
|
|
@printf '%s\n' 'Usage: make -C firmware/boards build' '' \
|
|
' build Build and package every board in release mode' \
|
|
'CARGO_TARGET_DIR defaults to firmware/target; relative overrides are relative to firmware/boards/.' \
|
|
'For one board: make -C firmware/boards/<board> build|flash'
|
|
|
|
build:
|
|
cargo build --release --locked --offline $(BOARD_PACKAGE_ARGS) $(BOARD_BIN_ARGS) \
|
|
--target $(EMBEDDED_TARGET) --target-dir "$(CARGO_TARGET_DIR)"
|
|
@set -e; for board in $(BOARD_PACKAGES); do \
|
|
../scripts/create-dfu-image.sh "$(TARGET_DIR)/$$board"; \
|
|
done
|