forked from jasonacox/Build-OpenSSL-cURL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·54 lines (45 loc) · 898 Bytes
/
Copy pathbuild.sh
File metadata and controls
executable file
·54 lines (45 loc) · 898 Bytes
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
# This script builds openssl+libcurl libraries for the Mac, iOS and tvOS
#
# Jason Cox, @jasonacox
# https://github.com/jasonacox/Build-OpenSSL-cURL
# HTTP2 Support?
NOHTTP2="/tmp/no-http2"
rm -f $NOHTTP2
usage ()
{
echo "usage: $0 [-disable-http2]"
exit 127
}
if [ "$1" == "-h" ]; then
usage
fi
echo "Building OpenSSL"
cd openssl
./openssl-build.sh
cd ..
if [ "$1" == "-disable-http2" ]; then
touch "$NOHTTP2"
else
echo "Building nghttp2 for HTTP2 support"
cd nghttp2
./nghttp2-build.sh
cd ..
fi
echo
echo "Building Curl"
cd curl
./libcurl-build.sh
cd ..
echo
echo "Libraries..."
echo
echo "opensll"
xcrun -sdk iphoneos lipo -info openssl/*/lib/*.a
echo
echo "nghttp2 (rename to libnghttp2.a)"
xcrun -sdk iphoneos lipo -info nghttp2/lib/*.a
echo
echo "libcurl (rename to libcurl.a)"
xcrun -sdk iphoneos lipo -info curl/lib/*.a
rm -f $NOHTTP2