I have an Android NDK project. Windows 7, Cygwin, NDK r6b. The Android.mk references another mk file in another directory:
include ../../MyApp/jni/Src.mk
When I try to run ndk-gdb
in the jni directory, here's the error I get:
$ ndk-gdb
/cygdrive/d/dev/wksp/MyProject/jni/Android.mk:8: ../../MyApp/jni/Src.mk: No such file or directory
/cygdrive/d/dev/wksp/MyProject/jni/Android.mk:8: ../../MyApp/jni/Src.mk: No such file or directory
make: *** No rule to make target `../../MyApp/jni/Src.mk'. Stop.
The regular Android builds work fine. The file Src.mk at the specified path clearly exists. Any idea why won't make
find it?
Placing an absolute path into the include
line fixes the issue. So it's about the relative path. This specific issue can be solved by storing an absolute path to the project root in an environment variable, and referencing it in the include line:
include $(PROJECTROOT)/MyApp/jni/Src.mk