首页 新闻 会员 周边 捐助

使用mm编译模块时报 No rule to make target错误,求大神指点

0
悬赏园豆:20 [已关闭问题] 关闭于 2015-07-24 09:53

本人想移植一个IIC设备到Android上,但是在添加HAL层接口模块访问设备时,编译iic.c模块时报错,错误信息如下:

root@ubuntu:/home/pngcui/Android/iTop4412_ICS# mmm -B hardware/libhardware/modules/iic
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.3
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IML74K
============================================
make: Entering directory `/home/pngcui/Android/iTop4412_ICS'
build/core/dynamic_binary.mk:112: warning: overriding commands for target `.so'
build/core/dynamic_binary.mk:95: warning: ignoring old commands for target `.so'
build/core/shared_library.mk:54: warning: overriding commands for target `.so'
build/core/dynamic_binary.mk:112: warning: ignoring old commands for target `.so'
make: *** No rule to make target `/iic.c', needed by `out/target/product/generic/obj/SHARED_LIBRARIES/iic.default_intermediates/iic.o'.  Stop.
make: Leaving directory `/home/pngcui/Android/iTop4412_ICS'
root@ubuntu:/home/pngcui/Android/iTop4412_ICS# 

Android.mk:

LOCAL_PATH := $(call my-dir)  
      include $(CLEAR_VARS)  
      LOCAL_MODULE_TAGS := optional  
      LOCAL_PRELINK_MODULE := false  
      LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw  
      LOCAL_SRC_FILES := iic.c  
      LOCAL_MODULE := iic.default  
      include $(BUILD_SHARED_LIBRARY)

这是什么原因引起的呢?

某某璀的主页 某某璀 | 菜鸟二级 | 园豆:206
提问于:2015-07-23 14:49
< >
分享
所有回答(1)
0

在Android.mk中添加一句LOCAL_SHARED_LIBRARIES := liblog libcutils就OK了,随后又报i2c-dev.h找不到,把这个头文件复制到相应路径下就可以了。。

某某璀 | 园豆:206 (菜鸟二级) | 2015-07-24 09:53
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册