Added arm64-v8a, x86, x86_64 ABIs to build.gradle
This commit is contained in:
7
dist.sh
7
dist.sh
@@ -236,9 +236,8 @@ android()
|
|||||||
if [[ ! $OSNAME = *"darwin"* ]]; then
|
if [[ ! $OSNAME = *"darwin"* ]]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
ARCH="armeabi-v7a"
|
|
||||||
# CMake build files
|
# CMake build files
|
||||||
BUILD_DIR=$(pwd)/tmp/android-$ARCH-$1
|
BUILD_DIR=$(pwd)/tmp/android-$1
|
||||||
mkdir -p $BUILD_DIR
|
mkdir -p $BUILD_DIR
|
||||||
# If clean requested, remove temp build dir
|
# If clean requested, remove temp build dir
|
||||||
if [[ $1 = *"clean"* ]]; then
|
if [[ $1 = *"clean"* ]]; then
|
||||||
@@ -246,7 +245,7 @@ android()
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
# Where to place results
|
# Where to place results
|
||||||
LIB_OUTPUT_DIR=$(pwd)/lib/$1/android-$ARCH
|
LIB_OUTPUT_DIR=$(pwd)/lib/$1/android
|
||||||
mkdir -p $LIB_OUTPUT_DIR
|
mkdir -p $LIB_OUTPUT_DIR
|
||||||
# Build
|
# Build
|
||||||
UPPERCASE_CONFIG="$(tr '[:lower:]' '[:upper:]' <<< ${1:0:1})${1:1}"
|
UPPERCASE_CONFIG="$(tr '[:lower:]' '[:upper:]' <<< ${1:0:1})${1:1}"
|
||||||
@@ -293,7 +292,7 @@ prep_android_example()
|
|||||||
{
|
{
|
||||||
echo "Executing task: " ${FUNCNAME[ 0 ]} "(" $1 ")"
|
echo "Executing task: " ${FUNCNAME[ 0 ]} "(" $1 ")"
|
||||||
mkdir -p examples/android/ExampleAndroidApp/app/libs/
|
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
|
examples/android/ExampleAndroidApp/app/libs/libzt.aar
|
||||||
}
|
}
|
||||||
# Clean Android project
|
# Clean Android project
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ typedef int ssize_t;
|
|||||||
#if !defined(_WIN32) && !defined(__ANDROID__)
|
#if !defined(_WIN32) && !defined(__ANDROID__)
|
||||||
typedef unsigned int socklen_t;
|
typedef unsigned int socklen_t;
|
||||||
#else
|
#else
|
||||||
typedef int socklen_t;
|
//typedef int socklen_t;
|
||||||
//#include <sys/socket.h>
|
//#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ android {
|
|||||||
ndk {
|
ndk {
|
||||||
// Tells Gradle to build outputs for the following ABIs and package
|
// Tells Gradle to build outputs for the following ABIs and package
|
||||||
// them into your APK.
|
// them into your APK.
|
||||||
abiFilters 'armeabi-v7a'
|
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
#define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS 0
|
#define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS 0
|
||||||
#endif
|
#endif
|
||||||
#if __ANDROID__
|
#if __ANDROID__
|
||||||
#define LWIP_PROVIDE_ERRNO 1
|
//#define LWIP_PROVIDE_ERRNO 0
|
||||||
#define SOCKLEN_T_DEFINED
|
#define SOCKLEN_T_DEFINED
|
||||||
#elif !defined(_MSC_VER)
|
#elif !defined(_MSC_VER)
|
||||||
#define LWIP_PROVIDE_ERRNO 1
|
#define LWIP_PROVIDE_ERRNO 1
|
||||||
|
|||||||
Reference in New Issue
Block a user