Added arm64-v8a, x86, x86_64 ABIs to build.gradle

This commit is contained in:
Joseph Henry
2019-06-24 13:59:58 -07:00
parent 196e548f35
commit fe30716143
4 changed files with 6 additions and 7 deletions

View File

@@ -236,9 +236,8 @@ android()
if [[ ! $OSNAME = *"darwin"* ]]; then
exit 0
fi
ARCH="armeabi-v7a"
# CMake build files
BUILD_DIR=$(pwd)/tmp/android-$ARCH-$1
BUILD_DIR=$(pwd)/tmp/android-$1
mkdir -p $BUILD_DIR
# If clean requested, remove temp build dir
if [[ $1 = *"clean"* ]]; then
@@ -246,7 +245,7 @@ android()
exit 0
fi
# Where to place results
LIB_OUTPUT_DIR=$(pwd)/lib/$1/android-$ARCH
LIB_OUTPUT_DIR=$(pwd)/lib/$1/android
mkdir -p $LIB_OUTPUT_DIR
# Build
UPPERCASE_CONFIG="$(tr '[:lower:]' '[:upper:]' <<< ${1:0:1})${1:1}"
@@ -293,7 +292,7 @@ prep_android_example()
{
echo "Executing task: " ${FUNCNAME[ 0 ]} "(" $1 ")"
mkdir -p examples/android/ExampleAndroidApp/app/libs/
cp -f lib/$1/android-armeabi-v7a/libzt-$1.aar \
cp -f lib/$1/android/libzt-$1.aar \
examples/android/ExampleAndroidApp/app/libs/libzt.aar
}
# Clean Android project

View File

@@ -55,7 +55,7 @@ typedef int ssize_t;
#if !defined(_WIN32) && !defined(__ANDROID__)
typedef unsigned int socklen_t;
#else
typedef int socklen_t;
//typedef int socklen_t;
//#include <sys/socket.h>
#endif

View File

@@ -16,7 +16,7 @@ android {
ndk {
// Tells Gradle to build outputs for the following ABIs and package
// them into your APK.
abiFilters 'armeabi-v7a'
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}
}
buildTypes {

View File

@@ -55,7 +55,7 @@
#define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS 0
#endif
#if __ANDROID__
#define LWIP_PROVIDE_ERRNO 1
//#define LWIP_PROVIDE_ERRNO 0
#define SOCKLEN_T_DEFINED
#elif !defined(_MSC_VER)
#define LWIP_PROVIDE_ERRNO 1