![]() ![]() rwxr-xr-x 1 6760 Jun 23 01:52 setenv-android.sh Adjust the Cross-Compile Script setenv-android.sh is used to set the cross-compilation environment.Īfter collecting the required files, your working directory will look similar to below. Openssl-1.0.1g.tar.gz is the OpenSSL Library. You won't need all the files from the location. Next, acquire the auxiliary files which can be obtained from below (see Downloads section) or. Projects range from simple NDK based command line programs to Android activities using the JNI bridge. There are six steps to building the OpenSSL Library for use in various projects, and they are listed below. While the Executive Summary provided the whirlwind instructions for building and installing the OpenSSL library, this sections provides detailed instructions. $ sudo -E make install CC=$ANDROID_TOOLCHAIN/arm-linux-androideabi-gcc RANLIB=$ANDROID_TOOLCHAIN/arm-linux-androideabi-ranlib Compile and Link against the Library arm-linux-androideabi-gcc -I /usr/local/ssl/include my_prog.c -o my_prog.exe -L /usr/local/ssl/lib -lssl -lcrypto OpenSSL Library Root needs some of the user's environment $ make all Install the OpenSSL Library # The -E is important. openssldir=/usr/local/ssl/$ANDROID_API -prefix=/usr/local/ssl/$ANDROID_API config shared no-ssl2 no-ssl3 no-comp no-hw no-engine \ $ perl -pi -e 's/install: all install_docs install_sw/install: install_docs install_sw/g' # Perl is optional, and may fail in OpenSSL 1.1.0 $ chmod a+x setenv-android.sh Build the OpenSSL Library # From the 'root' directory Prepare the OpenSSL Sources # From the 'root' directory The files can be obtained from, , and below (see Downloads section). ANDROID_API and ANDROID_TOOLCHAIN will be set by the setenv-android.sh script. Before running the commands download openssl-1.0.1g.tar.gz and setenv-android.sh place the files in the same directory (the 'root' directory mentioned below) ensure ANDROID_NDK_ROOT is set and verify setenv-android.sh suites your taste. Use the following commands to build and install the OpenSSL library for Android. 2.6 Compile and Link against the Library.1.4 Compile and Link against the Library.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |