-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
abao
committed
Sep 17, 2018
1 parent
2619635
commit 903cb34
Showing
4 changed files
with
96 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# cURL for Android | ||
|
||
Compile curl, openssl, zlib with Android NDK. | ||
|
||
## Before build | ||
|
||
Download android ndk-r13b from [here](https://developer.android.com/ndk/downloads/), | ||
and set NDK_ROOT in your system environment variable. | ||
|
||
For example: | ||
|
||
``` | ||
export NDK_ROOT=your_ndk_path | ||
``` | ||
|
||
## Build | ||
|
||
``` | ||
chmod 755 build_for_android.sh | ||
./build_for_android.sh | ||
``` | ||
|
||
## Binary and Library | ||
|
||
``` | ||
# cURL | ||
jni/build/curl/*/curl | ||
jni/libs/*/libcurl.a | ||
jni/libs/*/libcurl.so | ||
# OpenSSL | ||
jni/build/openssl/*/bin/openssl | ||
jni/build/openssl/*/lib/libssl.a | ||
jni/build/openssl/*/lib/libcrypto.a | ||
# zlib | ||
jni/build/zlib/*/lib/libz.a | ||
jni/build/zlib/*/lib/libz.so | ||
``` | ||
|
||
## License | ||
|
||
[GPL-2.0](./LICENSE) | ||
[cURL](https://github.com/curl/curl/blob/master/COPYING) | ||
[OpenSSL](https://github.com/openssl/openssl/blob/master/LICENSE) | ||
[zlib](https://github.com/madler/zlib/blob/master/README) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,20 @@ | ||
#!/bin/bash | ||
# Compile curl & openssl & zlib for android with NDK. | ||
# Copyright (C) 2018 shishuo <[email protected]> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
APP_ABI=(armeabi-v7a x86 arm64-v8a) | ||
|
||
BASE_PATH=$( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,20 @@ | ||
#!/bin/bash | ||
# http://wiki.openssl.org/index.php/Android | ||
# http://doc.qt.io/qt-5/opensslsupport.html | ||
# Compile curl & openssl & zlib for android with NDK. | ||
# Copyright (C) 2018 shishuo <[email protected]> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
APP_ABI=(armeabi-v7a x86 arm64-v8a) | ||
|
||
BASE_PATH=$( | ||
|
@@ -34,6 +48,8 @@ fi | |
## Build OpenSSL | ||
|
||
# compile $1 ABI $2 SYSROOT $3 TOOLCHAIN $4 MACHINE $5 SYSTEM $6 ARCH $7 CROSS_COMPILE | ||
# http://wiki.openssl.org/index.php/Android | ||
# http://doc.qt.io/qt-5/opensslsupport.html | ||
compile() { | ||
cd $SSL_PATH | ||
ABI=$1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,20 @@ | ||
#!/bin/bash | ||
# Compile curl & openssl & zlib for android with NDK. | ||
# Copyright (C) 2018 shishuo <[email protected]> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
APP_ABI=(armeabi-v7a x86 arm64-v8a) | ||
|
||
BASE_PATH=$( | ||
|