I'm trying to build a simple Android application using NDK. Here are the contents of my Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_LDLIBS := -llog
LOCAL_MODULE := myNDK
LOCAL_SRC_FILES := native.c
include $(BUILD_SHARED_LIBRARY)
And when I'm running ndk-build I get:
make: * No rule to make target
'/native.c', needed by
'/Users/ivan/Documents/workspace/TestNDK/obj/local/armeabi/objs/myNDK/native.o'. Stop.
So the problem is obviously that make is searching the source files in the root directory and if I copy native.c to my root folder everything works perfectly.
The question is: what should I specify in my Android.mk to set the LOCAL_PATH to my working jni folder.