我有一个 Android 项目,其中包含一些本机代码,它为一些 Poco 库函数使用静态库。我目前在下面的 make 文件中链接了静态库的 arm7 版本。现在,如果我想在 google play 上分发这个应用程序,为了可移植性,我需要在 apk 中包含其他架构。例如,我如何将 arm6 的静态 libPocofoundation.a 和 arm7 的静态 libPocoFoundation.a 包含到 apk 中的共享库中?
include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
LOCAL_MODULE := PocoFoundation
LOCAL_SRC_FILES := Poco/libPocoFoundation.a #<- How do i set this conditional-
# or add multiple architectures?
LOCAL_EXPORT_C_INCLUDES := /Users/poco-1.5.1-all/Foundation/include
LOCAL_EXPORT_CFLAGS := -DFOO=1 -fpermissive
LOCAL_EXPORT_LDLIBS := -llog
include $(PREBUILT_STATIC_LIBRARY)
安卓.mk
LOCAL_PATH := $(call my-dir)
ROOT_PATH := $(LOCAL_PATH)
include $(call all-subdir-makefiles)
include $(CLEAR_VARS)
LOCAL_PATH = $(ROOT_PATH)
include $(CLEAR_VARS)
#LOCAL_MODULE_TAGS := eng
LOCAL_ARM_MODE := arm
LOCAL_MODULE := JsonPoco # Your own library.
LOCAL_SRC_FILES := JsonPoco.cpp \
# Your own library source.
LOCAL_WHOLE_STATIC_LIBRARIES := PocoFoundation \
PocoJSON
LOCAL_LDLIBS := -llog
LOCAL_CFLAGS := -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY
LOCAL_CPPFLAGS := -frtti -fexceptions
include $(BUILD_SHARED_LIBRARY)