您可以使用 prebuit FFTW 库(无论您如何构建它)。
Android.mk
或者您可以在整个项目的 makefile 中构建 FFTW 。
Android.mk
内容将是:
# Prebuilt FFTW library
include $(CLEAR_VARS)
LOCAL_MODULE := fftw
include $(PREBUILT_STATIC_LIBRARY)
# or
# Build FFTW library
include $(CLEAR_VARS)
LOCAL_MODULE := fftw
# TODO put your static libs build flags
include path_to_fftw_sources/$(LOCAL_MODULE).mk
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := YourProject
# TODO put your shared lib build flags
include path_to_your_project/$(LOCAL_MODULE).mk
LOCAL_STATIC_LIBRARIES += fftw
include $(BUILD_SHARED_LIBRARY)
我path_to_fftw_sources/$(LOCAL_MODULE).mk
为构建 fftw 静态库和path_to_your_project/$(LOCAL_MODULE).mk
构建共享库而编写。通常最好将LOCAL_SRC_FILES
和LOCAL_C_INCLUDES
放到单独的.mk
文件中。
您可以在 NDK 发行版中阅读有关Android.mk
文件中文件的更多信息。docs/ANDROID-MK.html