1 ################################################################################
2 # Build all of the platforms manually since the `all_platforms' target
3 # doesn't preserve all of the build outputs and overrides CFLAGS.
7 ################################################################################
8 # Prevent a warning from shellcheck:
11 ################################################################################
13 ${enableParallelBuilding:+-j${NIX_BUILD_CORES}}"
15 ################################################################################
16 PRODUCTS
="blackmagic.bin blackmagic.hex blackmagic_dfu.bin blackmagic_dfu.hex"
18 ################################################################################
20 echo "Building for hardware platform $1"
25 if [ "$1" = "hosted" ]; then
26 install -m 0555 blackmagic
"$out/bin"
29 for f
in $PRODUCTS; do
31 mkdir
-p "$out/firmware/$1"
32 install -m 0444 "$f" "$out/firmware/$1"
38 ################################################################################
39 # Start by building libopencm3:
42 ################################################################################
43 # And now all of the platforms:
48 for platform
in platforms
/*/Makefile.inc
; do
49 probe
=$
(basename "$(dirname "$platform")")
50 make_platform
"$probe"