这就是我在 JNI 文件夹中做通配符的方式
include $(CLEAR_VARS)
LOCAL_MODULE := some_module_name
LOCAL_SRC_FILES := $(notdir $(wildcard $(LOCAL_PATH)/*.cpp))
include $(BUILD_SHARED_LIBRARY)
现在我想将新的源文件夹添加到 JNI - some_src 与 foo.cpp 和 bar.cpp
include $(CLEAR_VARS)
LOCAL_MODULE := some_module_name
FOLDER_PREFIX = some_scr
LOCAL_SRC_FILES := $(notdir $(wildcard $(LOCAL_PATH)/*.cpp)) $(FOLDER_PREFIX)/$(notdir $(wildcard $(LOCAL_PATH)/$(FOLDER_PREFIX)/*.cpp))
include $(BUILD_SHARED_LIBRARY)
但这只会将 $(FOLDER_PREFIX) 添加到 bar.cpp,foo.cpp 会被剥离路径 (jni/foo.cpp) 而不是构建。
如何解决?