cocos2d/cocos2d-x — Issue #720: Android, Build : Build dependencies using official tools and from source
Author: folecr
Created: 2012-02-12 17:38:21+00:00
State: open

Cocos2D-X on Android depends on the following external BINARY libraries :

* libxml2
* libjpeg
* libpng

... also due to the current build system it automatically incorporates

* some Crystax libraries
* libiconv
* unneeded portions of libjpeg in the prebuilt binaries

This needs to be fixed.

## Explanation

Currently external depenencies are built using Crystax's toolchain and distributed as prebuilt binaries.
Reasons :

1. There are no distributable makefiles in the Cocos sources for these dependencies
2. For a long time Android did not support C++ fully
3. It is assumed that the build time will be very long (possibly because of Android's poor build sytem)

### The fix is now possible because Android NDK has

* Better makefiles
* Better C++ support

## Suggested fix

1. Modularize the Android NDK makefiles
2. Add Cocos2dx/Android specific makefiles to external dependencies
3. Fork a correct version of external depenencies to Cocos2D's github
4. Build external dependencies from source
5. Use standard toolchain
6. Remove depenency on 3rd-party toolchain
7. Prove that compile time is reasonable (so that it is possible to distribute as source)