only download 1 macOS SDK

This commit is contained in:
Un1q32
2025-09-07 21:13:15 -04:00
parent 7abe99fbc1
commit c205783caa
2 changed files with 5 additions and 11 deletions

3
.gitignore vendored
View File

@@ -5,6 +5,5 @@
*.pdb *.pdb
.DS_Store .DS_Store
pingout pingout
macsdk-intel macsdk
macsdk-arm64
zig zig

View File

@@ -15,20 +15,15 @@ for dep in wget $CLANG $STRIP; do
fi fi
done done
if ! [ -d macsdk-intel ]; then if ! [ -d macsdk ]; then
wget https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.8.sdk.tar.xz -O- | tar -xJ
mv MacOS* macsdk-intel
fi
if ! [ -d macsdk-arm64 ]; then
wget https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz -O- | tar -xJ wget https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz -O- | tar -xJ
mv MacOS* macsdk-arm64 mv MacOS* macsdk
fi fi
mkdir -p build mkdir -p build
$CLANG $CFLAGS -std=c99 -Ijni-headers -fuse-ld=lld oc2rnet.c -bundle -target x86_64-apple-macos10.8 -isysroot macsdk-intel -o build/liboc2rnet-x86_64.dylib $CLANG $CFLAGS -std=c99 -Ijni-headers -fuse-ld=lld oc2rnet.c -bundle -target x86_64-apple-macos10.8 -isysroot macsdk -o build/liboc2rnet-x86_64.dylib
$CLANG $CFLAGS -std=c99 -Ijni-headers -fuse-ld=lld oc2rnet.c -bundle -target arm64-apple-macos11.0 -isysroot macsdk-arm64 -o build/liboc2rnet-arm64.dylib $CLANG $CFLAGS -std=c99 -Ijni-headers -fuse-ld=lld oc2rnet.c -bundle -target arm64-apple-macos11.0 -isysroot macsdk -o build/liboc2rnet-arm64.dylib
# build for other platforms # build for other platforms