Skip to the Quick Start section if you just want to build.
Android has invented it's own build system on top of make, which is intended to build things easier for a target that has different CPU architecture, and with some flexible configuration setting either defined in environment variable or the config file for different combination of build type.
However, people lacking with a large hard disk, fast speed network or fast enough machine may suffer from this not so common build system that we might get used to.
The default guideline for building a single piece of program say the adb tool or dalvikvm inside AOSP is to repo sync the whole repository and perform a full build. Although it maybe the fastest and simplest way, some people may just don't meet the storage space constraint while others may think that it's a total waste of storage space and bandwidth.
After struggling with the error messages day after day, the mysteries are resolved. Building with the Android Building System could be fun and joy with a known possible shortest path!
Visit the official site for a brief overview on Android Building System first.
Assume you have done the setup and fetched the code. Followings are the important keys to note:
### DO NOT EDIT THIS FILE ### include build/core/main.mk ### DO NOT EDIT THIS FILE ###
Without this, the m, mm and mmm bash function won't work even you have executed '. build/envsetup.sh'.(The usage of dot in bash is equivalent to the 'source' command.)
That's all! For sure there should be a static 'dependency list' for a given project but I have not managed to create it yet. Good luck!