blob: 660eadb1344d45cea53a9c48956fa34eeb7b993f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/sh
OPENSSL="$HOME/tmp/openssl-1.1.1m-universal"
OSXCROSSBIN="$HOME/src/osxcross/target/bin"
export PATH="$PATH:$OSXCROSSBIN"
make clean || exit 1
rm -f getgbook.amd64 getgbook.arm64
make LDFLAGS="-lssl -lcrypto -L$OPENSSL" CC=o64-clang AR=x86_64-apple-darwin20.4-ar getgbook || exit 1
x86_64-apple-darwin20.4-install_name_tool -change /usr/local/lib/libssl.1.1.dylib @executable_path/libssl.1.1.dylib getgbook
x86_64-apple-darwin20.4-install_name_tool -change /usr/local/lib/libcrypto.1.1.dylib @executable_path/libcrypto.1.1.dylib getgbook || exit 1
mv getgbook getgbook.amd64
make clean || exit 1
make LDFLAGS="-lssl -lcrypto -L$OPENSSL" CC=oa64-clang AR=x86_64-apple-darwin20.4-ar getgbook || exit 1
arm64-apple-darwin20.4-install_name_tool -change /usr/local/lib/libssl.1.1.dylib @executable_path/libssl.1.1.dylib getgbook || exit 1
arm64-apple-darwin20.4-install_name_tool -change /usr/local/lib/libcrypto.1.1.dylib @executable_path/libcrypto.1.1.dylib getgbook || exit 1
mv getgbook getgbook.arm64
lipo -create getgbook.amd64 getgbook.arm64 -output getgbook || exit 1
rm getgbook.amd64 getgbook.arm64
codesign -f -s - getgbook || exit 1
codesign -f -s - libcrypto.1.1.dylib || exit 1
codesign -f -s - libssl.1.1.dylib || exit 1
|