I'm trying to debug my android source build environment (Android.mk files). 开发者_开发问答 By default the make system does not show the gcc command line during the build process. What is the best way to enable this?
Probably too late for the asker, but for anyone else who comes along. From the ndk documentation @ https://docs.google.com/document/d/1jXxLV866aY9QXWS_9UwLSJjX1I6d1XfBhk1IeEyRgYE/edit?pli=1
ndk-build NDK_DEBUG=1 --> generate debuggable native code.
ndk-build V=1 --> launch build, displaying build commands.
ndk-build -B --> force a complete rebuild.
ndk-build -B V=1 --> force a complete rebuild and display build commands.
The showcommands make target will display the gcc/g++ command line:
$ make showcommands
More info and other Android.mk build nuggets here: http://elinux.org/Android_Build_System
If you are building with mm:
$ mm showcommands
I found a very detailed documentation in this link: http://hashspeaks.wordpress.com/2010/01/27/android-mk-documentation/
so you should be able to add -v -Wall to LOCAL_CPPFLAGS
精彩评论