Search code examples
androidcompilationmakefileandroid-source

How to speed up mm in module making of AOSP


I am working on the contacts app from android open source project. My android version is 2.3.5_r1. And using mm to make the module, but the making speed is quite slow, so i doubt if there is a method to speed up the making.

PS:Actually if i compile this module in eclipse, i will speed up a litter because the auto build feature of eclipse. But i don't like work with eclipse so give it up.


Solution

  • In order of least cost to you:

    • Don't make clean so much. Allow the makefile to determine what to rebuild.
    • Use CCACHE export USE_CCACHE=1. You're only likely to see the effects of CCACHE upon having rebuilt multiple times. If your project is large set a higher CCACHE size e.g. 10GB ${ANDROID_DIR}/prebuilt/linux-x86/ccache/ccache -M 10G
    • Get a better processor and run with higher -j parameter