This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to avoid clean build using mm-B on Android?

I am building an Android Application on Blaze Tablet. The application has a lot of C modules that has the sequence of Java->JNI->C code. I am currently building all the C modules using mm -B option in the TI baseport (mydroid) within the external folder. When I want to build all C modules, I call the individual modules' mm -B function one after the other. I have 2 questions in this regard.

  1. I wanted to know if there is a way to do incremental build on a set of modules. The scenario here is that I am building a set of modules one after another from a script. I have observed that all the modules mentioned in the script get built irrespective of whether a change has been made to it or not. This clean build takes time. Is there a way out of this?

  2. Whenever mm -B is executed, the libraries built are placed in out/target/product//obj/lib/ path by default. I wanted to know if we can change this path and whenever the mm -B command is called, the libraries are copied to the corresponding modules paths and not to this common path.

I dont have much knowledge of the envsetup.sh that has the definition of these mm and mmm functions

  • About:

    1. You can read documentation in Android NDK, like docs/OVERVIEW.html and docs/ANDROID-MK.html doc/APPLICATION-MK.html. They show options on how to organize the build system, for example using next line is going to make mm command to include all the subdirectories, there is more information in this files and other files in doc directory.

    include $(call all-subdir-makefiles) 

    or the use of

    include $(CLEAR_VARS)

    that allows to call many modules or executables from one Android.mk.

    2. Check mydroid/build/core/build-system.html for LOCAL_MODULE_PATH, LOCAL_PATH and LOCAL_MODULE, between other options. But the directory you mention is a temporal directory, libraries or binaries are located depending on Android.mk option in either out/target/product/[blaze]/system/bin/ or out/target/product/[blaze]/system/lib/. You can check Android.mk options in Android NDK documentation too.

    To download Android NDK go to - http://developer.android.com/tools/sdk/ndk/index.html