@@ -13,58 +13,57 @@ rm -rf build dist venv tmp GUI-Warp *.dmg
1313echo " -- Making binaries ----------------------------------------------------------------------------------------------" &&
1414# NB! Static libraries must be located in the current directory! If changing, adjust Makefile as well!
1515[ -n " $WITH_LIBSSH2 " ] && {
16- echo " -- Downloading/unpacking SSL and SSH2 libraries -----------------------------------------------------------------" &&
17- mkdir tmp &&
18- wget -O tmp/head-openssl.tgz https://github.com/openssl/openssl/archive/refs/heads/master.tar.gz &&
19- wget -O tmp/head-libssh2.tgz https://github.com/libssh2/libssh2/archive/refs/heads/master.tar.gz &&
20- cd tmp &&
21- tar zxvf head-openssl.tgz &&
22- tar zxvf head-libssh2.tgz &&
23-
24- echo " -- Compiling SSL for ARM64 processors ---------------------------------------------------------------------------" &&
25- cd openssl-master &&
26-
27- ./Configure darwin64-arm64-cc no-shared -mmacosx-version-min=11 -no-tests &&
28- make depend &&
29- make -j 4 build_libs &&
30- cp libcrypto.a ../arm64_libcrypto.a &&
31- cp libssl.a ../arm64_libssl.a &&
32-
33-
34- echo " -- Compiling SSL for x86_64 processors --------------------------------------------------------------------------" &&
35- make clean &&
36- ./Configure darwin64-x86_64-cc no-shared -mmacosx-version-min=11 -no-tests &&
37- make depend &&
38- make -j 4 build_libs &&
39- cp libcrypto.a ../x86_64_libcrypto.a &&
40- cp libssl.a ../x86_64_libssl.a &&
41-
42- echo " -- Compiling SSH2 for ARM64 processors --------------------------------------------------------------------------" &&
43- cd ../libssh2-master &&
44- export CFLAGS=" -arch arm64 -pipe -no-cpp-precomp -mmacosx-version-min=11" &&
45- export CPPFLAGS=" -arch arm64 -pipe -no-cpp-precomp -mmacosx-version-min=11" &&
46- autoreconf -fi &&
47- ./configure --host=aarch64-apple-darwin --disable-debug --disable-dependency-tracking --disable-silent-rules --disable-examples-build --with-libz --disable-shared --enable-static &&
48- make -j 4 &&
49- cp src/.libs/libssh2.a ../arm64_libssh2.a &&
50-
51- make clean &&
52- export CFLAGS=" -arch x86_64 -pipe -no-cpp-precomp -mmacosx-version-min=11" &&
53- export CPPFLAGS=" -arch x86_64 -pipe -no-cpp-precomp -mmacosx-version-min=11" &&
54- autoreconf -fi &&
55- ./configure --host=x86_64-apple-darwin --disable-debug --disable-dependency-tracking --disable-silent-rules --disable-examples-build --with-libz --disable-shared --enable-static &&
56- make -j 4 &&
57- cp src/.libs/libssh2.a ../x86_64_libssh2.a &&
58-
59- unset CFLAGS &&
60- unset CPPFLAGS &&
61-
62- echo " -- Making universal libraries -----------------------------------------------------------------------------------" &&
63- cd .. &&
64- lipo -create arm64_libssl.a x86_64_libssl.a -output ../libssl.a &&
65- lipo -create arm64_libcrypto.a x86_64_libcrypto.a -output ../libcrypto.a &&
66- lipo -create arm64_libssh2.a x86_64_libssh2.a -output ../libssh2.a &&
67- cd .. &&
16+ echo " -- Downloading/unpacking SSL and SSH2 libraries -----------------------------------------------------------------"
17+ mkdir tmp
18+ wget -O tmp/head-openssl.tgz https://github.com/openssl/openssl/archive/refs/heads/master.tar.gz
19+ wget -O tmp/head-libssh2.tgz https://github.com/libssh2/libssh2/archive/refs/heads/master.tar.gz
20+ cd tmp
21+ tar zxvf head-openssl.tgz
22+ tar zxvf head-libssh2.tgz
23+
24+ echo " -- Compiling SSL for ARM64 processors ---------------------------------------------------------------------------"
25+ cd openssl-master
26+
27+ ./Configure darwin64-arm64-cc no-shared -mmacosx-version-min=11 -no-tests
28+ make depend
29+ make -j 4 build_libs
30+ cp libcrypto.a ../arm64_libcrypto.a
31+ cp libssl.a ../arm64_libssl.a
32+
33+ echo " -- Compiling SSL for x86_64 processors --------------------------------------------------------------------------"
34+ make clean
35+ ./Configure darwin64-x86_64-cc no-shared -mmacosx-version-min=11 -no-tests
36+ make depend
37+ make -j 4 build_libs
38+ cp libcrypto.a ../x86_64_libcrypto.a
39+ cp libssl.a ../x86_64_libssl.a
40+
41+ echo " -- Compiling SSH2 for ARM64 processors --------------------------------------------------------------------------"
42+ cd ../libssh2-master
43+ export CFLAGS=" -arch arm64 -pipe -no-cpp-precomp -mmacosx-version-min=11"
44+ export CPPFLAGS=" -arch arm64 -pipe -no-cpp-precomp -mmacosx-version-min=11"
45+ autoreconf -fi
46+ ./configure --host=aarch64-apple-darwin --disable-debug --disable-dependency-tracking --disable-silent-rules --disable-examples-build --with-libz --disable-shared --enable-static
47+ make -j
48+ cp src/.libs/libssh2.a ../arm64_libssh2.a
49+
50+ make clean
51+ export CFLAGS=" -arch x86_64 -pipe -no-cpp-precomp -mmacosx-version-min=11"
52+ export CPPFLAGS=" -arch x86_64 -pipe -no-cpp-precomp -mmacosx-version-min=11"
53+ autoreconf -fi
54+ ./configure --host=x86_64-apple-darwin --disable-debug --disable-dependency-tracking --disable-silent-rules --disable-examples-build --with-libz --disable-shared --enable-static
55+ make -j 4
56+ cp src/.libs/libssh2.a ../x86_64_libssh2.a
57+
58+ unset CFLAGS
59+ unset CPPFLAGS
60+
61+ echo " -- Making universal libraries -----------------------------------------------------------------------------------"
62+ cd ..
63+ lipo -create arm64_libssl.a x86_64_libssl.a -output ../libssl.a
64+ lipo -create arm64_libcrypto.a x86_64_libcrypto.a -output ../libcrypto.a
65+ lipo -create arm64_libssh2.a x86_64_libssh2.a -output ../libssh2.a
66+ cd ..
6867
6968 [ ! -f ./libssh2.a -o ! -f ./libcrypto.a -o ! -f libssl.a ] && {
7069 echo " Unable to find static SSH2 library, skipping it"
0 commit comments