Merge pull request #3086 from natural-law/develop

Support more ABI types in plugin.
This commit is contained in:
James Chen 2013-07-05 19:57:07 -07:00
commit ad88bf5e54
3 changed files with 12 additions and 3 deletions

View File

@ -2,6 +2,6 @@
APP_STL := gnustl_static
APP_CPPFLAGS += -frtti
APP_MODULES := PluginProtocolStatic
APP_ABI :=armeabi
APP_ABI :=armeabi armeabi-v7a
#APP_ABI :=x86
#APP_ABI :=mips mips-r2 mips-r2-sf armeabi

View File

@ -23,7 +23,7 @@ LIB_FILENAME=${LIB_FILENAME}.a
echo "" >> ${TARGET_FILE_NAME}
echo "LOCAL_SRC_FILES := ./"${LIB_FILENAME} >> ${TARGET_FILE_NAME}
echo "LOCAL_SRC_FILES := ./lib/"\$\(TARGET_ARCH_ABI\)/${LIB_FILENAME} >> ${TARGET_FILE_NAME}
echo "LOCAL_EXPORT_C_INCLUDES := \$(LOCAL_PATH)/../include \$(LOCAL_PATH)" >> ${TARGET_FILE_NAME}
echo "LOCAL_EXPORT_LDLIBS := -llog" >> ${TARGET_FILE_NAME}

View File

@ -122,7 +122,16 @@ if [ -f $BUILD_NATIVE_SCRIPT ]; then
#invoke ndk build for plugin project
./build_native.sh
LIB_FILE="$(getLibraryFileName)"
cp -rf "${ANDROID_PROJ_DIR}/obj/local/armeabi/${LIB_FILE}" "${TARGET_DIR}/android"
for File in ${ANDROID_PROJ_DIR}/obj/local/*
do
if [ -d $File ]; then
if [ -f "${File}"/${LIB_FILE} ]; then
ABI_NAME=`basename "${File}"`
mkdir -p "${TARGET_DIR}/android/lib/${ABI_NAME}"
cp -rf "${File}/${LIB_FILE}" "${TARGET_DIR}/android/lib/${ABI_NAME}"
fi
fi
done
#generate mk file for prebuild
${PLUGIN_ROOT}/tools/toolsForPublish/genPrebuildMK.sh ${ANDROID_PROJ_DIR}/jni/Android.mk ${TARGET_DIR}/android/Android.mk