Browse Source

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

pull/1/head
Joseph Henry 7 years ago
parent
commit
fe30716143
  1. 7
      dist.sh
  2. 2
      include/ZeroTier.h
  3. 2
      ports/android/app/build.gradle
  4. 2
      src/lwipopts.h

7
dist.sh

@ -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

2
include/ZeroTier.h

@ -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

2
ports/android/app/build.gradle

@ -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 {

2
src/lwipopts.h

@ -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

Loading…
Cancel
Save