From f04a3a8b29f9ea49cc952bc2cda57d4c5d88d32e Mon Sep 17 00:00:00 2001 From: Chris McGee Date: Thu, 6 Nov 2025 13:58:40 -0500 Subject: [PATCH] Make the SwiftPM build system configurable as a make variable --- rpi-4b-blink/Makefile | 2 ++ rpi-5-blink/Makefile | 2 ++ rpi-pico-blink/Makefile | 2 ++ rpi-pico2-neopixel/Makefile | 2 ++ stm32-lvgl/Makefile | 2 ++ stm32-neopixel/Makefile | 2 ++ stm32-uart-echo/Makefile | 2 ++ 7 files changed, 14 insertions(+) diff --git a/rpi-4b-blink/Makefile b/rpi-4b-blink/Makefile index 1ee6e512..70399dfd 100644 --- a/rpi-4b-blink/Makefile +++ b/rpi-4b-blink/Makefile @@ -15,11 +15,13 @@ TOOLSROOT := $(REPOROOT)/Tools TOOLSET := $(TOOLSROOT)/Toolsets/rpi-5-elf.json LLVM_OBJCOPY := llvm-objcopy SWIFT_BUILD := swift build +BUILD_SYSTEM := native # Flags ARCH := aarch64 TARGET := $(ARCH)-none-none-elf SWIFT_BUILD_ARGS := \ + --build-system $(BUILD_SYSTEM) \ --configuration release \ --triple $(TARGET) \ --toolset $(TOOLSET) diff --git a/rpi-5-blink/Makefile b/rpi-5-blink/Makefile index f07ed954..7f5b6442 100644 --- a/rpi-5-blink/Makefile +++ b/rpi-5-blink/Makefile @@ -15,11 +15,13 @@ TOOLSROOT := $(REPOROOT)/Tools TOOLSET := $(TOOLSROOT)/Toolsets/rpi-5-elf.json LLVM_OBJCOPY := llvm-objcopy SWIFT_BUILD := swift build +BUILD_SYSTEM := native # Flags ARCH := aarch64 TARGET := $(ARCH)-none-none-elf SWIFT_BUILD_ARGS := \ + --build-system $(BUILD_SYSTEM) \ --configuration release \ --triple $(TARGET) \ --toolset $(TOOLSET) diff --git a/rpi-pico-blink/Makefile b/rpi-pico-blink/Makefile index 15cee44d..361c1856 100755 --- a/rpi-pico-blink/Makefile +++ b/rpi-pico-blink/Makefile @@ -15,12 +15,14 @@ TOOLSROOT := $(REPOROOT)/Tools TOOLSET := $(TOOLSROOT)/Toolsets/pico.json MACHO2UF2 := $(TOOLSROOT)/macho2uf2.py SWIFT_BUILD := swift build +BUILD_SYSTEM := native # Flags PICO_FAMILY := rp2040 ARCH := armv6m TARGET := $(ARCH)-apple-none-macho SWIFT_BUILD_ARGS := \ + --build-system $(BUILD_SYSTEM) \ --configuration release \ --triple $(TARGET) \ --toolset $(TOOLSET) diff --git a/rpi-pico2-neopixel/Makefile b/rpi-pico2-neopixel/Makefile index 448b28ce..02d12536 100644 --- a/rpi-pico2-neopixel/Makefile +++ b/rpi-pico2-neopixel/Makefile @@ -15,11 +15,13 @@ TOOLSROOT := $(REPOROOT)/Tools TOOLSET := $(TOOLSROOT)/Toolsets/pico2.json MACHO2UF2 := $(TOOLSROOT)/macho2uf2.py SWIFT_BUILD := swift build +BUILD_SYSTEM := native # Setup tools and build flags ARCH := armv7em TARGET := $(ARCH)-apple-none-macho SWIFT_BUILD_ARGS := \ + --build-system $(BUILD_SYSTEM) \ --configuration release \ --triple $(TARGET) \ --toolset $(TOOLSET) diff --git a/stm32-lvgl/Makefile b/stm32-lvgl/Makefile index 54f59dd9..9897a41d 100644 --- a/stm32-lvgl/Makefile +++ b/stm32-lvgl/Makefile @@ -17,11 +17,13 @@ ELF2HEX := $(TOOLSROOT)/elf2hex.py SWIFT_BUILD := swift build NM := nm LLVM_TOOLCHAIN := $(PWD)/llvm-toolchain +BUILD_SYSTEM := native # Flags ARCH := armv7em TARGET := $(ARCH)-none-none-eabi SWIFT_BUILD_ARGS := \ + --build-system $(BUILD_SYSTEM) \ --configuration release \ --triple $(TARGET) \ --toolset $(TOOLSET) \ diff --git a/stm32-neopixel/Makefile b/stm32-neopixel/Makefile index 6b0125c0..ca1a8202 100755 --- a/stm32-neopixel/Makefile +++ b/stm32-neopixel/Makefile @@ -15,11 +15,13 @@ TOOLSROOT := $(REPOROOT)/Tools TOOLSET := $(TOOLSROOT)/Toolsets/stm32f74x.json MACHO2BIN := $(TOOLSROOT)/macho2bin.py SWIFT_BUILD := swift build +BUILD_SYSTEM := native # Flags ARCH := armv7em TARGET := $(ARCH)-apple-none-macho SWIFT_BUILD_ARGS := \ + --build-system $(BUILD_SYSTEM) \ --configuration release \ --triple $(TARGET) \ --toolset $(TOOLSET) diff --git a/stm32-uart-echo/Makefile b/stm32-uart-echo/Makefile index bf727669..d590c2d5 100755 --- a/stm32-uart-echo/Makefile +++ b/stm32-uart-echo/Makefile @@ -15,11 +15,13 @@ TOOLSROOT := $(REPOROOT)/Tools TOOLSET := $(TOOLSROOT)/Toolsets/stm32f74x.json MACHO2BIN := $(TOOLSROOT)/macho2bin.py SWIFT_BUILD := swift build +BUILD_SYSTEM := native # Flags ARCH := armv7em TARGET := $(ARCH)-apple-none-macho SWIFT_BUILD_ARGS := \ + --build-system $(BUILD_SYSTEM) \ --configuration release \ --triple $(TARGET) \ --toolset $(TOOLSET)