mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-11-10 12:35:17 +00:00
Allow specifying APP_PLATFORM and APP_ABI on the command line
This commit is contained in:
@@ -25,30 +25,27 @@ cd $srcdir
|
|||||||
|
|
||||||
build=build
|
build=build
|
||||||
buildandroid=$build/android
|
buildandroid=$build/android
|
||||||
|
platform=android-16
|
||||||
|
abi="arm64-v8a" # "armeabi-v7a arm64-v8a x86 x86_64"
|
||||||
obj=
|
obj=
|
||||||
lib=
|
lib=
|
||||||
ndk_args=
|
ndk_args=
|
||||||
|
|
||||||
# Allow overriding the ABI from the environment
|
# Allow an external caller to specify locations and platform.
|
||||||
if [ "$APP_ABI" = "" ]; then
|
while [ $# -gt 0 ]; do
|
||||||
#APP_ABI="armeabi-v7a arm64-v8a x86 x86_64"
|
arg=$1
|
||||||
APP_ABI="arm64-v8a"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Allow overriding the platform from the environment
|
|
||||||
if [ "$APP_PLATFORM" = "" ]; then
|
|
||||||
APP_PLATFORM=android-16
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Allow an external caller to specify locations.
|
|
||||||
for arg in $*; do
|
|
||||||
if [ "${arg:0:8}" == "NDK_OUT=" ]; then
|
if [ "${arg:0:8}" == "NDK_OUT=" ]; then
|
||||||
obj=${arg#NDK_OUT=}
|
obj=${arg#NDK_OUT=}
|
||||||
elif [ "${arg:0:13}" == "NDK_LIBS_OUT=" ]; then
|
elif [ "${arg:0:13}" == "NDK_LIBS_OUT=" ]; then
|
||||||
lib=${arg#NDK_LIBS_OUT=}
|
lib=${arg#NDK_LIBS_OUT=}
|
||||||
|
elif [ "${arg:0:13}" == "APP_PLATFORM=" ]; then
|
||||||
|
platform=${arg#APP_PLATFORM=}
|
||||||
|
elif [ "${arg:0:8}" == "APP_ABI=" ]; then
|
||||||
|
abi=${arg#APP_ABI=}
|
||||||
else
|
else
|
||||||
ndk_args="$ndk_args $arg"
|
ndk_args="$ndk_args $arg"
|
||||||
fi
|
fi
|
||||||
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -z $obj ]; then
|
if [ -z $obj ]; then
|
||||||
@@ -75,7 +72,7 @@ ndk-build \
|
|||||||
NDK_OUT=$obj \
|
NDK_OUT=$obj \
|
||||||
NDK_LIBS_OUT=$lib \
|
NDK_LIBS_OUT=$lib \
|
||||||
APP_BUILD_SCRIPT=Android.mk \
|
APP_BUILD_SCRIPT=Android.mk \
|
||||||
APP_ABI="$APP_ABI" \
|
APP_ABI="$abi" \
|
||||||
APP_PLATFORM="$APP_PLATFORM" \
|
APP_PLATFORM="$platform" \
|
||||||
APP_MODULES="SDL3" \
|
APP_MODULES="SDL3" \
|
||||||
$ndk_args
|
$ndk_args
|
||||||
|
|||||||
Reference in New Issue
Block a user