I have written one module in cpp which uses openssl for SSL communication. I decided to use this module in android application by writing JNI layer above this one. Now the main problem is I need openssl “static” libraries which are built using ndk.
I got the openssl package from this link git repository
This works great if I am using as it is for building shared libraries out of it, but I want to build it for static libraries. I am very new to make files. Can some one please guide me how can I change the makefiles in this openssl package which I got it from above given link to get the static libraries.. ?
thanks in advance.
First of all, your JNI can be linked to shared OpenSSL libraries. You only need to load these libraries from your Java code before you load the JNI library that uses them.
Second, OpenSSL libraries (shared objects) are installed on any Android, so you probably do not have to build them at all. The versions may vary, but in Android 4.01 tree, the version is more advanced than that in eighthave git.
Finally, if your NDK is installed in
$(NDK_ROOT)directory, you can simply run the following command:(from the root directory of eighthive git clone) … and automagically you will find the static libraries obj/local/armeabi/libcrypto.a and obj/local/armeabi/libssl.a