realthunder / cmoss

Scripts for building cross-platform c/c++ mobile open source software libraries.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cross Compiling Scripts for both Android and iOS

Originally forked from https://github.com/mevansam/cmoss, it has since been
rewritten almost entirely.

Tested libraries/program build for Android ndk r13 on Ubuntu 14.04

* breakpad 
* libevent 
* bzip2 
* expat 
* liblog4c 
* cURL 
* boost 
* libldns 
* libjudy 
* json 
* openssl 
* busybox 

Android build prerequesites:

    git, build-essentials, NDK (r13 tested)

Either define envrinonment variable ANDROID_NDK pointing to your NDK location,
or put a symlink named build-droid/android-ndk under this directory.


Tested libraries build for iOS using MacOSX 10.12, XCode 8.2

* libevent 
* liblog4c 
* cURL 
* boost 
* libldns 
* libjudy 
* json 
* expat
* openssl
* libuv
* libarchive

MacOSX Prerequesite:

* Install command line tools:
    xcode-select install
    You probably need to manually open XCode and select xcode command line tools in 'Preference->location'

* Install homebrew
    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

    brew install automake libtool wget pkg-config

To build the above libraries, simply
    ./build.sh default

depending on your system, it will build android arm, and iOS 9 arm7v and arm64
target. The results is located at tmp/build/<mac|droid>/<target>. E.g.

    tmp/build/droid/arm-android-linux/usr/<include|lib|src>
    tmp/build/mac/iPhoneOS/armv7/<include|lib|src>

For Mac, each architecture is separate. No attemp to lipo together a fat
archive yet.

To build x86 android target,
    ./build.sh default i686

for iOS simulator
    ./build.sh default sim

for MacOSX native,
    ./build.sh default mac

Build individual library, use the library name shown in above list
    ./build.sh <library name>

To rebuild a library, manually delete the corresponding library source code
directory in the aboive mentioned src directory, e.g.
    tmp/build/mac/iPhoneOS/armv7/src/boost_1_58_0

Downloaded source code archive is in dl directory.



About

Scripts for building cross-platform c/c++ mobile open source software libraries.


Languages

Language:Shell 87.7%Language:C 12.3%