Crypto++ NDK build on Windows android


https://www.cryptopp.com/wiki/Android_(Command_Line)

1. Edit  setenv-android.sh (* default arch is arm)
  ANDROID_NDK_ROOT="../../../../android/sdk/ndk-bundle"
  AOSP_TOOLCHAIN_PATH="/cygdrive/d/android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin"

  Ex) Set target is armeabi-v7a
  $ . setenv-android.sh armeabi-v7a

   setenv-android.sh.zip  <== Remove .zip

2. Build
 $ make -f GNUmakefile-cross distclean
 $ make -f GNUmakefile-cross static dynamic

3. strip
$ arm-linux-androideabi-strip --strip-debug libcryptopp.so

4. Install (for deploy include files)
$ make -f GNUmakefile-cross install PREFIX=./install
mkdir -p ./install/include/cryptopp
cp *.h ./install/include/cryptopp
chmod 755 ./install/include/cryptopp
chmod 644 ./install/include/cryptopp/*.h
mkdir -p ./install/lib
cp libcryptopp.a ./install/lib
chmod 644 ./install/lib/libcryptopp.a
cp libcryptopp.so ./install/lib
chmod 755 ./install/lib/libcryptopp.so