1

我想在一个 .mk 文件中创建两个 .so 文件。但以下代码失败,因为 LOCAL_MODULE 中不应有空格。那么有出路吗?

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    := gpio hello-jni
LOCAL_CFLAGS    := -Werror    
LOCAL_SRC_FILES := gpio.c hello-jni.c
LOCAL_LDLIBS    := -llog 

include $(BUILD_SHARED_LIBRARY)
4

1 回答 1

2

我刚刚使用以下代码使其工作。

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    := gpio 
LOCAL_CFLAGS    := -Werror    
LOCAL_SRC_FILES := gpio.c
LOCAL_LDLIBS    := -llog 

include $(BUILD_SHARED_LIBRARY)

include $(CLEAR_VARS)

LOCAL_MODULE    := h ello-jni
LOCAL_CFLAGS    := -Werror 
LOCAL_SRC_FILES := hello-jni.c
LOCAL_LDLIBS    := -llog 

include $(BUILD_SHARED_LIBRARY)
于 2013-04-11T15:15:00.253 回答