Android.mk No rule to make target '*.c', needed by '*.o'. Stop

Nathaniel Jobs picture Nathaniel Jobs · Sep 11, 2014 · Viewed 7.6k times · Source

I have some problem.

I use ndk-build but I can't make library *.so.

--------------------------------- Error ---------------------------------

nathaniel@Nathaniel-MSI /work/workspace/HealthCare $ ndk-build
 make: *** No rule to make target `jni/jni/src/filterData.c', needed by
 `obj/local/armeabi/objs/HealthCare/jni/src/filterData.o'.  Stop.

Under the my Android.mk source, help me please

--------------------------------- Android.mk ---------------------------------

LOCAL_PATH          := $(call my-dir)
SRCS                := $(wildcard $(LOCAL_PATH)/src/*.c)

include $(CLEAR_VARS)

LOCAL_MODULE        := HealthCare
LOCAL_SRC_FILES     := $(SRCS)

LOCAL_LDLIBS        := -llog

include $(BUILD_SHARED_LIBRARY)

Answer

Kazuki Sakamoto picture Kazuki Sakamoto · Sep 11, 2014
LOCAL_SRC_FILES := $(SRCS:$(LOCAL_PATH)/%=%)

EDITED

LOCAL_C_INCLUDES := $(LOCAL_PATH)/src