#!/usr/bin/env bash # Builds the firmware for all devices. BUILD_ROOT overrides the output directory (default: build). set -euo pipefail ROOT=$(cd "$(dirname "$0")/.." && pwd) OUT=${BUILD_ROOT:-$ROOT/build} DEVICES=(evk e27_rgb e14_rgb gu10_rgb e27_cw e14_cw gu10_cw g95_cw) for d in "${DEVICES[@]}"; do echo "== $d" cmake -S "$ROOT" -B "$OUT/$d" -G Ninja \ -DCMAKE_TOOLCHAIN_FILE="$ROOT/cmake/arm-none-eabi.cmake" -DNINLIGHT_DEVICE="$d" >/dev/null cmake --build "$OUT/$d" done ls -1 "$OUT"/*/ninlight_*.fls "$OUT"/*/ninlight_*_ota.img