Files
prdgmshift-usbliter8/usb_req_handler/make.sh
T
Paradigm Shift afe8b5c899 Initial commit
2026-06-18 14:22:10 +02:00

17 lines
461 B
Bash
Executable File

#!/bin/bash
set -e
if [[ ! -n $TARGET ]]; then
echo "no TARGET specified!"; exit;
fi
mkdir -p build
clang -arch arm64 handler.c -Os -Wl,-preload -nostdlib -e _custom_handle_usb_req -Wl,-order_file,symorder.txt -Itargets/$TARGET -o build/handler_$TARGET.o
vmacho -f build/handler_$TARGET.o build/handler_$TARGET.bin
echo -n "const " > ../resources/handler_$TARGET.h
xxd -i -n handler_$TARGET build/handler_$TARGET.bin >> ../resources/handler_$TARGET.h