Here is a solution updated to NDK8c
Zero step : download and fix Android NDK I donโt know how, but ndk has a very interesting drawback that (in my oppinion) does not allow you to compile many things, so in order to compile OpenSSL, you need to make a small correction, extract ndk8c, your tools, and then edit the file: android-NDK-R8C / build / gmsl / __ gmsl line 512: line change
int_encode = $(__gmsl_tr1)$(wordlist 1,$1,$(__gmsl_input_int))
with line
int_encode = $(__gmsl_tr1)$(wordlist 1,$(words $1),$(__gmsl_input_int))
And you are fine!
step one . Download OpenSSL and compile for Android: either compile the migrated version here or Download the official version of OpenSSL version 1.0.0c and then compile it for Android using the guide provided in github, which I linked for the version compatible with Android.
So the next step is to get libssl.so and libcrypto.so and put them in the NDK folder for easy access, so copy them from
openssl-folder/libs/armeabi/
to
android-ndk-r8c/platforms/android-8/arch-arm/usr/lib
so when compiling you can enable libs using the simple linker switch -lssl -lcrypto
Step Two : Get The Latest Curl Source For Here
Open the file in Docs / INSTALL and follow the steps necessary to create a stand-alone toolchain and place it in the desired folder, and then in the difficult part I will need the Android source code to continue the configuration, although I have a standalone compiled openssl, you can also include it header files, in any case, this is a more complicated version, so you choose what you do, I didnโt decide to avoid them so that you can go to the Google AOSP Website and follow the steps to create and initialize the environment.
so it would be something like:
1.download,
So finally, we need to compile curl with SSL support, so
Step three
extract curl to the desired folder (I have a specific desire to disable everything except http / s so that the library is as low as ~ 300k if you want more libraries in your library, delete --disable-protocol for the desired protocol ) follow these steps:
make clean export PATH=/opt/arm-linux-androideabi-4.4.3/bin:$PATH export LDFLAGS="\ -lssl \ -lcrypto \ -L/home/user/Development/Tools/sdk/android/ndk/platforms/android-8/arch-arm/usr/lib" export CFLAGS="\ -I/home/user/Development/AOSP/2.3.7/system/core/include \ -I/home/user/Development/Tools/sdk/android/ndk/platforms/android-8/arch-arm/usr/include" ./configure --host=arm-linux-androideabi \ --with-ssl=/home/user/Development/Projects/portingLibs/openssl-android-master \ --disable-ftp \ --disable-gopher \ --disable-file \ --disable-imap \ --disable-ldap \ --disable-ldaps \ --disable-pop3 \ --disable-proxy \ --disable-rtsp \ --disable-smtp \ --disable-telnet \ --disable-tftp \ --without-gnutls \ --without-libidn \ --without-librtmp \ --disable-dict make Note that in the block above, if you don't want to use the AOSP source, you could switch -I/home/user/Development/AOSP/2.3.7/system/core/include \ with the include folder for your ssl distribution.
So you have: static:
curl-7.28.1/lib/.libs/libcurl.a
and sharing:
curl-7.28.1/lib/.libs/libcurl.so.5.3
So that he ... takes the file and compiles :)