我正在尝试使用预构建的静态库构建共享库,相应的 Android.mk 文件如下。
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
#Include kerne headers in a proper way later on
#LOCAL_C_INCLUDES:= $(LOCAL_PATH)/../../../../kernel/include
LOCAL_MODULE := sensors.$(TARGET_BOARD_PLATFORM)
LOCAL_MODULE_TAGS := optional
LOCAL_PRELINK_MODULE := false
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
LOCAL_STATIC_LIBRARIES := LibFusion_ARM_cpp
#LOCAL_LDFLAGS := $(LOCAL_PATH)/LibFusion_ARM_cpp.a
LOCAL_SHARED_LIBRARIES := liblog libcutils
#include any shared library dependencies
LOCAL_LDFLAGS := $(LOCAL_PATH)/libimu.a
LOCAL_PRELINK_MODULE := false
LOCAL_SRC_FILES := sensors_u8500.cpp
include $(BUILD_SHARED_LIBRARY)
文件夹中的文件是 Android.mk 、 LibFusion_ARM_cpp.a 、 libimu.a 、 MEMSAlgLib_eCompass.h 、 sensors_u8500.cpp
我在构建时遇到的错误如下,
**make: *** No rule to make target `out/target/product/u8500/obj/STATIC_LIBRARIES/LibFusion_ARM_cpp_intermediates/LibFusion_ARM_cpp.a', needed by `out/target/product/u8500/obj/SHARED_LIBRARIES/sensors.montblanc_intermediates/LINKED/sensors.montblanc.so'. Stop.**
这里有什么问题?
无法构建共享库。我的意思是无法生成 libsensor.so 文件。面对上述错误。** make: *没有制定目标的规则