@@ -31,30 +31,9 @@ if [ ! -f .patches-applied ]; then
3131 patch -Np1 < ../pixman-cpufeatures.patch
3232 )
3333
34- # use android config
35- (cd $SDL2_DIR
36- mv include/SDL_config_android.h include/SDL_config.h
37- mkdir -p jni
38- )
39-
4034 touch .patches-applied
4135fi
4236
43- # Install SDL2
44- # FIXME: Remove this when SDL3 migration is done
45- function install_lib_sdl {
46- # $1: platform (armeabi-v7a aarch64 x86 x86_x64)
47-
48- pushd $SDL2_DIR
49- echo " APP_ABI := $1 " >> " jni/Application.mk"
50- ndk-build NDK_PROJECT_PATH=. NDK_DEBUG=0 APP_BUILD_SCRIPT=./Android.mk APP_PLATFORM=android-$TARGET_API
51- mkdir -p $PLATFORM_PREFIX /lib
52- mkdir -p $PLATFORM_PREFIX /include/SDL2
53- cp libs/$1 /* $PLATFORM_PREFIX /lib/
54- cp include/* $PLATFORM_PREFIX /include/SDL2/
55- cd ..
56- }
57-
5837function build() {
5938 # $1: Toolchain Name
6039 # $2: Toolchain architecture
@@ -66,15 +45,7 @@ function build() {
6645
6746 echo " Preparing $1 toolchain"
6847
69- export TARGET_API=16
70- if [ " $3 " = " arm64" ]; then
71- # Minimum API 21 on ARM64
72- export TARGET_API=21
73- fi
74- if [ " $3 " = " x86_64" ]; then
75- # Minimum API 21 on x86_64
76- export TARGET_API=21
77- fi
48+ export TARGET_API=21
7849
7950 export PATH=$OLD_PATH
8051 export PLATFORM_PREFIX=$WORKSPACE /$2 -toolchain
@@ -85,7 +56,7 @@ function build() {
8556 export NM=$NDK_PATH /llvm-nm
8657 export RANLIB=$NDK_PATH /llvm-ranlib
8758
88- export CFLAGS=" -no-integrated-as - g0 -O2 -fPIC $5 "
59+ export CFLAGS=" -g0 -O2 -fPIC $5 "
8960 export CXXFLAGS=" $CFLAGS "
9061 export CPPFLAGS=" -I$PLATFORM_PREFIX /include -I$ANDROID_NDK /sources/android/cpufeatures"
9162 export LDFLAGS=" -L$PLATFORM_PREFIX /lib"
@@ -122,12 +93,11 @@ function build() {
12293 install_lib $LHASA_DIR $LHASA_ARGS
12394 install_lib_cmake $FMT_DIR $FMT_ARGS
12495 install_lib_icu_cross
125- install_lib_sdl " $2 "
12696 install_lib_liblcf
12797}
12898
12999export SDK_ROOT=$WORKSPACE /android-sdk
130- export ANDROID_NDK=$SDK_ROOT /ndk/21.4.7075529
100+ export ANDROID_NDK=$SDK_ROOT /ndk/28.2.13676358
131101
132102export MAKEFLAGS=" -j${nproc:- 2} "
133103
0 commit comments