Possible Duplicate:
Prevent ndk-build from automatically cleaning module
Android project with an NDK library. NDK r8c. Compiling under Cygwin (it’s an old project).
A bunch of C++ and C files, and some .a libraries linked via LOCAL_LDLIBS.
Since some time ago, I’m noticing that every NDK build goes over all source files. Even if I call the ndk-build twice in a row, there’s a full rebuild on second try. There’s nothing to the effect in the .mk files that I can see, and the command I invoke to build is a vanilla $NDKPATH/ndk-build. There’s no -B option anywhere.
The only wrinkle is this: on every build, NDK says the following:
/cygdrive/c/android-ndk-r8c/build/core/add-application.mk:128: Android NDK: WARNING:
APP_PLATFORM android-9 is larger than android:minSdkVersion 3 in
/cygdrive/d/AppPath/AndroidManifest.xml
What’s going on, please? Can I somehow see based on what file dates is make making a decision to rebuild it all?
There is a known bug in r8c that causes full rebuilds even without any source code changes. See this bug report.
The suggested fix (not mine) is to change line 289 of build/core/definitions.mk from
$1: $$(__ndk_file_dir)to
$1: | $$(__ndk_file_dir)