简体   繁体   中英

how to generate two .so file in a single android.mk file

I'd like to create two .so file within a single .mk file. But the following codes fails because there should not be a space in LOCAL_MODULE. So is there a way out?

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)

I just got it works using the following codes.

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM