Apple Silicon, iOS simulator, and External Build System target

I have run into the issue of trying to use a static library in an iOS app running in the simulator on an M1 (Apple Silicon) mac. However I'm having a difficult time adapting existing recommended solutions to my use-case.

As I understand it, the root cause is that previously iOS simulator targets were always Intel but now on Apple Silicon the simulator targets can also be arm64. The recommended solution is to use XCFramework to better handle the combinations of platform and arch (e.g. iOS simulator + arm64).

I have a cross-platform C library with a Makefile that I have in Xcode as an "External Build System" target. In the Xcode target it calls /usr/bin/make with the following arguments, where it passes relevant build settings from the iOS Framework to this external make task. On Intel-based Macs this has worked to automatically change the arch and SDK depending on the build target chosen in Xcode, e.g. building for simulator or making an archive.

build CONF=$CONFIGURATION CND_PLATFORM=$PLATFORM_NAME IPHONEOS_DEPLOYMENT_TARGET=$IPHONEOS_DEPLOYMENT_TARGET CFLAGS="-arch $PLATFORM_PREFERRED_ARCH -isysroot $SDKROOT -fembed-bitcode"

Where I believe I'm stuck is that, when building for iOS simulator on my M1 MacBook, the $PLATFORM_NAME is correctly set for the simulator but the $PLATFORM_PREFERRED_ARCH still shows x86_64. When the iOS Framework goes to link with the static library produced by this makefile it complains about missing symbols (presumably because it's looking for arm64 symbols).

How can I pass the correct contextual build information to this External Build System (makefile) target for the iOS Simulator on Apple Silicon?