-
Notifications
You must be signed in to change notification settings - Fork 3
/
libcurl.sh
executable file
·43 lines (34 loc) · 1.24 KB
/
libcurl.sh
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
#!/bin/bash -e
. ./sdk.sh
CURL_VERSION=8.11.0
export ANDR_ROOT=$(pwd)
mkdir -p output/libcurl/lib/$TARGET_ABI
mkdir -p deps; cd deps
if [ ! -d libcurl-src ]; then
if [ ! -f "curl-$CURL_VERSION.tar.gz" ]; then
wget https://curl.haxx.se/download/curl-$CURL_VERSION.tar.gz
fi
tar -xzf curl-$CURL_VERSION.tar.gz
mv curl-$CURL_VERSION libcurl-src
fi
cd libcurl-src
CFLAGS="-I$ANDR_ROOT/deps/openssl-src/include -L$ANDR_ROOT/deps/openssl-src $CFLAGS" \
./configure --host=$TARGET \
--with-openssl \
--prefix=/ --disable-shared --enable-static \
--disable-debug --disable-verbose --disable-versioned-symbols \
--disable-dependency-tracking --disable-libcurl-option \
--disable-ares --disable-cookies --disable-manual \
--disable-proxy --disable-unix-sockets --without-librtmp \
--disable-ftp --disable-ldap --disable-ldaps --disable-rtsp \
--disable-dict --disable-telnet --disable-tftp --disable-pop3 \
--disable-imap --disable-smtp --disable-gopher --disable-sspi \
--without-libpsl
make -j
# update `include` folder
rm -rf ../../output/libcurl/include
cp -r include ../../output/libcurl/
# update lib
rm -rf ../../output/libcurl/lib/$TARGET_ABI/libcurl.a
cp -r lib/.libs/libcurl.a ../../output/libcurl/lib/$TARGET_ABI/
echo "libcurl build successful"