Skip to content

Script to build autotools-based library project for Android with configurable settings

License

Notifications You must be signed in to change notification settings

abzico/androidbuildlib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

androidbuildlib

Script to build autotools-based library project for Android with configurable settings

Install

Place androidbuildlib at your executable path i.e. /usr/local/bin/ or even sym-link it as per your convenient. Then you're ready to use it.

How to use

cd to your target autotools-based library project. Then execute androidbuildlib.

By default it will build the libraries according to what has been set in Makefile.am according to autotools way; into build/ directory for 4 target architectures namely armeabi-v7a, x86, arm64-v8a and x86_64.

You have the following configurable settings

  • out_path - target installation path to install generated library files for all archs, it need to be in relative path from the directory executing this script [default is build]
  • host_tag - host value that will build the library (hint: you can take a look for this value at your $ANDROID_NDK_HOME/toolchains/llvm/prebuilt/ [default is linux-x86_64]
  • minsdkversion - minimum sdk version to support, this is value of api level [default is 18]
  • target_abis - target abis to build for, separated by space [default is "armeabi-v7a x86 arm64-v8a x86_64"]
  • configure_params - addtitional parameters to add to ./configure. [default is empty]
  • fresh_build - whether or not this is a fresh build, user might be using this when repeatitively build the same project over and over i.e. while debugging, so there's no need to keep re-execute './configure' and 'make clean' again. [default is true]

To execute with custom settings, you do it like this

androidbuildlib out_path=mybuild target_abis="armeabi-v7a x86"

That will build for target armeabi-v7a and x86, then put the result library files into mybuild directory. Other default settings are applied, so it is built against api level 18, and on linux 64-bit as host.

Show Help Text

Use androidbuildlib --help to show help text.

Note

For now, it only works for a library project that depends on standard libraries which Android already provided like libz etc. But it won't work if the library project depends on something else custom.

License

MIT Angry Baozi (https://abzi.co)

About

Script to build autotools-based library project for Android with configurable settings

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages