change: Bump minSdkVersion to 24
Openttd dropped support to not having getifaddrs, and Android only started shipping ifaddrs.h with SDK 24
This commit is contained in:
1
build.sh
1
build.sh
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
# Handle any error or die
|
# Handle any error or die
|
||||||
set -e
|
set -e
|
||||||
set -x
|
|
||||||
|
|
||||||
THIS_BUILD_DIR=$(dirname "$0")
|
THIS_BUILD_DIR=$(dirname "$0")
|
||||||
install_apk=false
|
install_apk=false
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
set -x
|
|
||||||
AUTO=a
|
AUTO=a
|
||||||
CHANGED=
|
CHANGED=
|
||||||
JAVA_SRC_PATH=project/java
|
JAVA_SRC_PATH=project/java
|
||||||
@@ -433,7 +433,8 @@ NDK_TOOLCHAIN_VERSION=$NDK_TOOLCHAIN_VERSION
|
|||||||
# Android platform version.
|
# Android platform version.
|
||||||
# android-16 = Android 4.1, the earliest supported version in NDK r18.
|
# android-16 = Android 4.1, the earliest supported version in NDK r18.
|
||||||
# android-18 = Android 4.3, the first version supporting GLES3.
|
# android-18 = Android 4.3, the first version supporting GLES3.
|
||||||
# android-21 = Android 5.1, the first version with SO_REUSEPORT defined.
|
# android-21 = Android 5.1, the first version with SO_REUSEPORT defined, also minimum version for Google Play Services since Aug. 2023 https://android-developers.googleblog.com/2023/07/google-play-services-discontinuing-updates-for-kitkat.html
|
||||||
|
# android-24 = Android 7.0, the first version with ifaddrs.h (needed for getifaddrs)
|
||||||
APP_PLATFORM=$APP_PLATFORM
|
APP_PLATFORM=$APP_PLATFORM
|
||||||
|
|
||||||
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
|
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "net.olofson.ballfield"
|
applicationId "net.olofson.ballfield"
|
||||||
minSdk 19
|
minSdk 24
|
||||||
targetSdk 33
|
targetSdk 33
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ APP_AVAILABLE_STATIC_LIBS := jpeg png webp freetype fontconfig xerces ogg vorbis
|
|||||||
glu icudata icutest icui18n icuio icule iculx icutu icuuc icu-le-hb harfbuzz sdl_savepng android_support \
|
glu icudata icutest icui18n icuio icule iculx icutu icuuc icu-le-hb harfbuzz sdl_savepng android_support \
|
||||||
gl4es nanogl gd guichan glm
|
gl4es nanogl gd guichan glm
|
||||||
|
|
||||||
# Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip bzip2 yaml-cpp python boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread glu avcodec avdevice avfilter avformat avresample avutil swscale swresample bzip2
|
# Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip bzip2 yaml-cpp python boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread glu avcodec avdevice avfilter avformat avresample avutil swscale swresample bzip2
|
||||||
APP_MODULES := application sdl-1.2 sdl_native_helpers jpeg png ogg flac vorbis freetype tremor ogg
|
APP_MODULES := application sdl-1.2 sdl_native_helpers jpeg png ogg flac vorbis freetype tremor ogg
|
||||||
|
|
||||||
ifeq ($(CUSTOM_BUILD_SCRIPT_FIRST_PASS),)
|
ifeq ($(CUSTOM_BUILD_SCRIPT_FIRST_PASS),)
|
||||||
@@ -26,12 +26,12 @@ SDL_JAVA_PACKAGE_PATH := net_sourceforge_clonekeenplus
|
|||||||
|
|
||||||
# Path to files with application data - they should be downloaded from Internet on first app run inside
|
# Path to files with application data - they should be downloaded from Internet on first app run inside
|
||||||
# Java sources, or unpacked from resources (TODO)
|
# Java sources, or unpacked from resources (TODO)
|
||||||
# Typically /sdcard/alienblaster
|
# Typically /sdcard/alienblaster
|
||||||
# Or /data/data/de.schwardtnet.alienblaster/files if you're planning to unpack data in application private folder
|
# Or /data/data/de.schwardtnet.alienblaster/files if you're planning to unpack data in application private folder
|
||||||
# Your application will just set current directory there
|
# Your application will just set current directory there
|
||||||
SDL_CURDIR_PATH := net.sourceforge.clonekeenplus
|
SDL_CURDIR_PATH := net.sourceforge.clonekeenplus
|
||||||
|
|
||||||
# Android Dev Phone G1 has trackball instead of cursor keys, and
|
# Android Dev Phone G1 has trackball instead of cursor keys, and
|
||||||
# sends trackball movement events as rapid KeyDown/KeyUp events,
|
# sends trackball movement events as rapid KeyDown/KeyUp events,
|
||||||
# this will make Up/Down/Left/Right key up events with X frames delay,
|
# this will make Up/Down/Left/Right key up events with X frames delay,
|
||||||
# so if application expects you to press and hold button it will process the event correctly.
|
# so if application expects you to press and hold button it will process the event correctly.
|
||||||
@@ -56,9 +56,9 @@ APPLICATION_OVERLAPS_SYSTEM_HEADERS := n
|
|||||||
|
|
||||||
APPLICATION_SUBDIRS_BUILD := src/*
|
APPLICATION_SUBDIRS_BUILD := src/*
|
||||||
|
|
||||||
APPLICATION_BUILD_EXCLUDE :=
|
APPLICATION_BUILD_EXCLUDE :=
|
||||||
|
|
||||||
APPLICATION_CUSTOM_BUILD_SCRIPT :=
|
APPLICATION_CUSTOM_BUILD_SCRIPT :=
|
||||||
|
|
||||||
USE_GL4ES :=
|
USE_GL4ES :=
|
||||||
|
|
||||||
@@ -66,4 +66,4 @@ SDL_ADDITIONAL_CFLAGS := -DSDL_ANDROID_KEYCODE_MOUSE=UNKNOWN -DSDL_ANDROID_KEYCO
|
|||||||
|
|
||||||
NDK_TOOLCHAIN_VERSION := clang
|
NDK_TOOLCHAIN_VERSION := clang
|
||||||
|
|
||||||
APP_PLATFORM := android-16
|
APP_PLATFORM := android-24
|
||||||
|
|||||||
@@ -273,8 +273,9 @@ NDK_TOOLCHAIN_VERSION=clang
|
|||||||
# Android platform version.
|
# Android platform version.
|
||||||
# android-16 = Android 4.1, the earliest supported version in NDK r18.
|
# android-16 = Android 4.1, the earliest supported version in NDK r18.
|
||||||
# android-18 = Android 4.3, the first version supporting GLES3.
|
# android-18 = Android 4.3, the first version supporting GLES3.
|
||||||
# android-21 = Android 5.1, the first version with SO_REUSEPORT defined.
|
# android-21 = Android 5.1, the first version with SO_REUSEPORT defined, also minimum version for Google Play Services since Aug. 2023 https://android-developers.googleblog.com/2023/07/google-play-services-discontinuing-updates-for-kitkat.html
|
||||||
APP_PLATFORM=19
|
# android-24 = Android 7.0, the first version with ifaddrs.h (needed for getifaddrs)
|
||||||
|
APP_PLATFORM=android-24
|
||||||
|
|
||||||
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
|
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
|
||||||
# Available architectures: armeabi-v7a arm64-v8a x86 x86_64
|
# Available architectures: armeabi-v7a arm64-v8a x86 x86_64
|
||||||
|
|||||||
Submodule project/jni/application/openttd/src updated: f312cf0f91...5aa02ac98f
@@ -24,7 +24,7 @@ else
|
|||||||
fi
|
fi
|
||||||
ARCH=arm64-v8a
|
ARCH=arm64-v8a
|
||||||
GCCPREFIX=aarch64-linux-android
|
GCCPREFIX=aarch64-linux-android
|
||||||
APILEVEL=21
|
APILEVEL=24
|
||||||
|
|
||||||
APP_MODULES=`grep 'APP_MODULES [:][=]' $LOCAL_PATH/../Settings.mk | sed 's@.*[=]\(.*\)@\1@' | sed 's@\b\(application\|sdl_main\|sdl_native_helpers\|c++_shared\)\b@@g'`
|
APP_MODULES=`grep 'APP_MODULES [:][=]' $LOCAL_PATH/../Settings.mk | sed 's@.*[=]\(.*\)@\1@' | sed 's@\b\(application\|sdl_main\|sdl_native_helpers\|c++_shared\)\b@@g'`
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ fi
|
|||||||
ARCH=armeabi-v7a
|
ARCH=armeabi-v7a
|
||||||
GCCPREFIX=armv7a-linux-androideabi
|
GCCPREFIX=armv7a-linux-androideabi
|
||||||
BINUTILSPREFIX=arm-linux-androideabi
|
BINUTILSPREFIX=arm-linux-androideabi
|
||||||
APILEVEL=19
|
APILEVEL=24
|
||||||
|
|
||||||
APP_MODULES=`grep 'APP_MODULES [:][=]' $LOCAL_PATH/../Settings.mk | sed 's@.*[=]\(.*\)@\1@' | sed 's@\b\(application\|sdl_main\|sdl_native_helpers\|c++_shared\)\b@@g'`
|
APP_MODULES=`grep 'APP_MODULES [:][=]' $LOCAL_PATH/../Settings.mk | sed 's@.*[=]\(.*\)@\1@' | sed 's@\b\(application\|sdl_main\|sdl_native_helpers\|c++_shared\)\b@@g'`
|
||||||
|
|
||||||
|
|||||||
143
project/jni/application/setEnvironment-armeabi-v7a.sh.orig
Executable file
143
project/jni/application/setEnvironment-armeabi-v7a.sh.orig
Executable file
@@ -0,0 +1,143 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
IFS='
|
||||||
|
'
|
||||||
|
|
||||||
|
NDK=${ANDROID_NDK_HOME:-$(dirname $(which ndk-build))}
|
||||||
|
|
||||||
|
if uname -s | grep -i "linux" > /dev/null ; then
|
||||||
|
MYARCH=linux-$(uname -m)
|
||||||
|
NDK=`readlink -f $NDK`
|
||||||
|
elif uname -s | grep -i "darwin" > /dev/null ; then
|
||||||
|
MYARCH=darwin-x86_64
|
||||||
|
elif uname -s | grep -i "windows" > /dev/null ; then
|
||||||
|
MYARCH=windows-x86_64
|
||||||
|
fi
|
||||||
|
|
||||||
|
#echo NDK $NDK
|
||||||
|
[ -z "$NDK_TOOLCHAIN_VERSION" ] && NDK_TOOLCHAIN_VERSION=4.9
|
||||||
|
LOCAL_PATH=`dirname $0`
|
||||||
|
if which realpath > /dev/null ; then
|
||||||
|
LOCAL_PATH=`realpath $LOCAL_PATH`
|
||||||
|
else
|
||||||
|
LOCAL_PATH=`cd $LOCAL_PATH && pwd`
|
||||||
|
fi
|
||||||
|
ARCH=armeabi-v7a
|
||||||
|
GCCPREFIX=armv7a-linux-androideabi
|
||||||
|
BINUTILSPREFIX=arm-linux-androideabi
|
||||||
|
<<<<<<< HEAD
|
||||||
|
APILEVEL=21
|
||||||
|
||||||| 798fd0f5e
|
||||||
|
APILEVEL=16
|
||||||
|
=======
|
||||||
|
APILEVEL=19
|
||||||
|
>>>>>>> upstream/sdl_android
|
||||||
|
|
||||||
|
APP_MODULES=`grep 'APP_MODULES [:][=]' $LOCAL_PATH/../Settings.mk | sed 's@.*[=]\(.*\)@\1@' | sed 's@\b\(application\|sdl_main\|sdl_native_helpers\|c++_shared\)\b@@g'`
|
||||||
|
|
||||||
|
APP_AVAILABLE_STATIC_LIBS="`echo '
|
||||||
|
include $(LOCAL_PATH)/../Settings.mk
|
||||||
|
all:
|
||||||
|
@echo $(APP_AVAILABLE_STATIC_LIBS)
|
||||||
|
.PHONY: all' | make LOCAL_PATH=$LOCAL_PATH -s -f -`"
|
||||||
|
|
||||||
|
APP_SHARED_LIBS=$(
|
||||||
|
echo $APP_MODULES | xargs -n 1 echo | while read LIB ; do
|
||||||
|
STATIC=`echo $APP_AVAILABLE_STATIC_LIBS | grep "\\\\b$LIB\\\\b"`
|
||||||
|
if [ -n "$STATIC" ] ; then true
|
||||||
|
else
|
||||||
|
case $LIB in
|
||||||
|
crypto) echo crypto.so.sdl.1;;
|
||||||
|
ssl) echo ssl.so.sdl.1;;
|
||||||
|
curl) echo curl-sdl;;
|
||||||
|
expat) echo expat-sdl;;
|
||||||
|
*) echo $LIB;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
)
|
||||||
|
|
||||||
|
if [ -z "$SHARED_LIBRARY_NAME" ]; then
|
||||||
|
SHARED_LIBRARY_NAME=libapplication.so
|
||||||
|
fi
|
||||||
|
SHARED="-shared -Wl,-soname,$SHARED_LIBRARY_NAME"
|
||||||
|
if [ -n "$BUILD_EXECUTABLE" ]; then
|
||||||
|
SHARED="-Wl,--gc-sections -Wl,-z,nocopyreloc -pie -fpie"
|
||||||
|
fi
|
||||||
|
if [ -n "$NO_SHARED_LIBS" ]; then
|
||||||
|
APP_SHARED_LIBS=
|
||||||
|
fi
|
||||||
|
|
||||||
|
APP_SHARED_LIBS="`echo $APP_SHARED_LIBS | sed \"s@\([-a-zA-Z0-9_.]\+\)@$LOCAL_PATH/../../obj/local/$ARCH/lib\1.so@g\"`"
|
||||||
|
APP_MODULES_INCLUDE="`echo $APP_MODULES | sed \"s@\([-a-zA-Z0-9_.]\+\)@-isystem$LOCAL_PATH/../\1/include@g\"`"
|
||||||
|
|
||||||
|
CFLAGS="
|
||||||
|
-g
|
||||||
|
-ffunction-sections
|
||||||
|
-fdata-sections
|
||||||
|
-funwind-tables
|
||||||
|
-fstack-protector-strong
|
||||||
|
-no-canonical-prefixes
|
||||||
|
-mthumb
|
||||||
|
-Wformat
|
||||||
|
-Werror=format-security
|
||||||
|
-Oz
|
||||||
|
-DNDEBUG
|
||||||
|
-fPIC
|
||||||
|
$APP_MODULES_INCLUDE
|
||||||
|
$CFLAGS"
|
||||||
|
|
||||||
|
CFLAGS="`echo $CFLAGS | tr '\n' ' '`"
|
||||||
|
|
||||||
|
LDFLAGS="
|
||||||
|
-fPIC
|
||||||
|
-g
|
||||||
|
-ffunction-sections
|
||||||
|
-fdata-sections
|
||||||
|
-Wl,--gc-sections
|
||||||
|
-funwind-tables
|
||||||
|
-fstack-protector-strong
|
||||||
|
-no-canonical-prefixes
|
||||||
|
-mthumb
|
||||||
|
-Wformat
|
||||||
|
-Werror=format-security
|
||||||
|
-Oz
|
||||||
|
-DNDEBUG
|
||||||
|
-Wl,--build-id
|
||||||
|
-Wl,--warn-shared-textrel
|
||||||
|
-Wl,--fatal-warnings
|
||||||
|
-Wl,--no-undefined
|
||||||
|
-Wl,-z,noexecstack
|
||||||
|
-Qunused-arguments
|
||||||
|
-Wl,-z,relro
|
||||||
|
-Wl,-z,now
|
||||||
|
-Wl,--no-rosegment
|
||||||
|
$SHARED
|
||||||
|
$APP_SHARED_LIBS
|
||||||
|
-landroid
|
||||||
|
-llog
|
||||||
|
-latomic
|
||||||
|
-lm
|
||||||
|
-ldl
|
||||||
|
$LDFLAGS"
|
||||||
|
|
||||||
|
LDFLAGS="`echo $LDFLAGS | tr '\n' ' '`"
|
||||||
|
|
||||||
|
CC="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/$GCCPREFIX$APILEVEL-clang"
|
||||||
|
CXX="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/$GCCPREFIX$APILEVEL-clang++"
|
||||||
|
CPP="$CC -E $CFLAGS"
|
||||||
|
|
||||||
|
env \
|
||||||
|
CFLAGS="$CFLAGS" \
|
||||||
|
CXXFLAGS="$CXXFLAGS $CFLAGS -frtti -fexceptions" \
|
||||||
|
LDFLAGS="$LDFLAGS" \
|
||||||
|
CC="$CC" \
|
||||||
|
CXX="$CXX" \
|
||||||
|
RANLIB="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/llvm-ranlib" \
|
||||||
|
LD="$CXX" \
|
||||||
|
AR="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/llvm-ar" \
|
||||||
|
CPP="$CPP" \
|
||||||
|
NM="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/llvm-nm" \
|
||||||
|
AS="$CC" \
|
||||||
|
STRIP="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/llvm-strip" \
|
||||||
|
"$@"
|
||||||
@@ -24,7 +24,7 @@ else
|
|||||||
fi
|
fi
|
||||||
ARCH=x86
|
ARCH=x86
|
||||||
GCCPREFIX=i686-linux-android
|
GCCPREFIX=i686-linux-android
|
||||||
APILEVEL=19
|
APILEVEL=24
|
||||||
|
|
||||||
APP_MODULES=`grep 'APP_MODULES [:][=]' $LOCAL_PATH/../Settings.mk | sed 's@.*[=]\(.*\)@\1@' | sed 's@\b\(application\|sdl_main\|sdl_native_helpers\|c++_shared\)\b@@g'`
|
APP_MODULES=`grep 'APP_MODULES [:][=]' $LOCAL_PATH/../Settings.mk | sed 's@.*[=]\(.*\)@\1@' | sed 's@\b\(application\|sdl_main\|sdl_native_helpers\|c++_shared\)\b@@g'`
|
||||||
|
|
||||||
|
|||||||
139
project/jni/application/setEnvironment-x86.sh.orig
Executable file
139
project/jni/application/setEnvironment-x86.sh.orig
Executable file
@@ -0,0 +1,139 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
IFS='
|
||||||
|
'
|
||||||
|
|
||||||
|
NDK=${ANDROID_NDK_HOME:-$(dirname $(which ndk-build))}
|
||||||
|
|
||||||
|
if uname -s | grep -i "linux" > /dev/null ; then
|
||||||
|
MYARCH=linux-$(uname -m)
|
||||||
|
NDK=`readlink -f $NDK`
|
||||||
|
elif uname -s | grep -i "darwin" > /dev/null ; then
|
||||||
|
MYARCH=darwin-x86_64
|
||||||
|
elif uname -s | grep -i "windows" > /dev/null ; then
|
||||||
|
MYARCH=windows-x86_64
|
||||||
|
fi
|
||||||
|
|
||||||
|
#echo NDK $NDK
|
||||||
|
[ -z "$NDK_TOOLCHAIN_VERSION" ] && NDK_TOOLCHAIN_VERSION=4.9
|
||||||
|
LOCAL_PATH=`dirname $0`
|
||||||
|
if which realpath > /dev/null ; then
|
||||||
|
LOCAL_PATH=`realpath $LOCAL_PATH`
|
||||||
|
else
|
||||||
|
LOCAL_PATH=`cd $LOCAL_PATH && pwd`
|
||||||
|
fi
|
||||||
|
ARCH=x86
|
||||||
|
GCCPREFIX=i686-linux-android
|
||||||
|
<<<<<<< HEAD
|
||||||
|
APILEVEL=21
|
||||||
|
||||||| 798fd0f5e
|
||||||
|
APILEVEL=16
|
||||||
|
=======
|
||||||
|
APILEVEL=19
|
||||||
|
>>>>>>> upstream/sdl_android
|
||||||
|
|
||||||
|
APP_MODULES=`grep 'APP_MODULES [:][=]' $LOCAL_PATH/../Settings.mk | sed 's@.*[=]\(.*\)@\1@' | sed 's@\b\(application\|sdl_main\|sdl_native_helpers\|c++_shared\)\b@@g'`
|
||||||
|
|
||||||
|
APP_AVAILABLE_STATIC_LIBS="`echo '
|
||||||
|
include $(LOCAL_PATH)/../Settings.mk
|
||||||
|
all:
|
||||||
|
@echo $(APP_AVAILABLE_STATIC_LIBS)
|
||||||
|
.PHONY: all' | make LOCAL_PATH=$LOCAL_PATH -s -f -`"
|
||||||
|
|
||||||
|
APP_SHARED_LIBS=$(
|
||||||
|
echo $APP_MODULES | xargs -n 1 echo | while read LIB ; do
|
||||||
|
STATIC=`echo $APP_AVAILABLE_STATIC_LIBS | grep "\\\\b$LIB\\\\b"`
|
||||||
|
if [ -n "$STATIC" ] ; then true
|
||||||
|
else
|
||||||
|
case $LIB in
|
||||||
|
crypto) echo crypto.so.sdl.1;;
|
||||||
|
ssl) echo ssl.so.sdl.1;;
|
||||||
|
curl) echo curl-sdl;;
|
||||||
|
expat) echo expat-sdl;;
|
||||||
|
*) echo $LIB;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
)
|
||||||
|
|
||||||
|
if [ -z "$SHARED_LIBRARY_NAME" ]; then
|
||||||
|
SHARED_LIBRARY_NAME=libapplication.so
|
||||||
|
fi
|
||||||
|
SHARED="-shared -Wl,-soname,$SHARED_LIBRARY_NAME"
|
||||||
|
if [ -n "$BUILD_EXECUTABLE" ]; then
|
||||||
|
SHARED="-Wl,--gc-sections -Wl,-z,nocopyreloc -pie -fpie"
|
||||||
|
fi
|
||||||
|
if [ -n "$NO_SHARED_LIBS" ]; then
|
||||||
|
APP_SHARED_LIBS=
|
||||||
|
fi
|
||||||
|
|
||||||
|
APP_SHARED_LIBS="`echo $APP_SHARED_LIBS | sed \"s@\([-a-zA-Z0-9_.]\+\)@$LOCAL_PATH/../../obj/local/$ARCH/lib\1.so@g\"`"
|
||||||
|
APP_MODULES_INCLUDE="`echo $APP_MODULES | sed \"s@\([-a-zA-Z0-9_.]\+\)@-isystem$LOCAL_PATH/../\1/include@g\"`"
|
||||||
|
|
||||||
|
CFLAGS="
|
||||||
|
-g
|
||||||
|
-ffunction-sections
|
||||||
|
-funwind-tables
|
||||||
|
-fdata-sections
|
||||||
|
-fstack-protector-strong
|
||||||
|
-no-canonical-prefixes
|
||||||
|
-Wformat
|
||||||
|
-Werror=format-security
|
||||||
|
-Oz
|
||||||
|
-DNDEBUG
|
||||||
|
-fPIC
|
||||||
|
$APP_MODULES_INCLUDE
|
||||||
|
$CFLAGS"
|
||||||
|
|
||||||
|
CFLAGS="`echo $CFLAGS | tr '\n' ' '`"
|
||||||
|
|
||||||
|
LDFLAGS="
|
||||||
|
-fPIC
|
||||||
|
-g
|
||||||
|
-ffunction-sections
|
||||||
|
-fdata-sections
|
||||||
|
-Wl,--gc-sections
|
||||||
|
-funwind-tables
|
||||||
|
-fstack-protector-strong
|
||||||
|
-no-canonical-prefixes
|
||||||
|
-Wformat
|
||||||
|
-Werror=format-security
|
||||||
|
-Oz
|
||||||
|
-DNDEBUG
|
||||||
|
-Wl,--build-id
|
||||||
|
-Wl,--warn-shared-textrel
|
||||||
|
-Wl,--fatal-warnings
|
||||||
|
-Wl,--no-undefined
|
||||||
|
-Wl,-z,noexecstack
|
||||||
|
-Qunused-arguments
|
||||||
|
-Wl,-z,relro
|
||||||
|
-Wl,-z,now
|
||||||
|
-Wl,--no-rosegment
|
||||||
|
$SHARED
|
||||||
|
$APP_SHARED_LIBS
|
||||||
|
-landroid
|
||||||
|
-llog
|
||||||
|
-latomic
|
||||||
|
-lm
|
||||||
|
$LDFLAGS"
|
||||||
|
|
||||||
|
LDFLAGS="`echo $LDFLAGS | tr '\n' ' '`"
|
||||||
|
|
||||||
|
CC="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/$GCCPREFIX$APILEVEL-clang"
|
||||||
|
CXX="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/$GCCPREFIX$APILEVEL-clang++"
|
||||||
|
CPP="$CC -E $CFLAGS"
|
||||||
|
|
||||||
|
env \
|
||||||
|
CFLAGS="$CFLAGS" \
|
||||||
|
CXXFLAGS="$CXXFLAGS $CFLAGS -frtti -fexceptions" \
|
||||||
|
LDFLAGS="$LDFLAGS" \
|
||||||
|
CC="$CC" \
|
||||||
|
CXX="$CXX" \
|
||||||
|
RANLIB="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/llvm-ranlib" \
|
||||||
|
LD="$CXX" \
|
||||||
|
AR="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/llvm-ar" \
|
||||||
|
CPP="$CPP" \
|
||||||
|
NM="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/llvm-nm" \
|
||||||
|
AS="$CC" \
|
||||||
|
STRIP="$NDK/toolchains/llvm/prebuilt/$MYARCH/bin/llvm-strip" \
|
||||||
|
"$@"
|
||||||
@@ -24,7 +24,7 @@ else
|
|||||||
fi
|
fi
|
||||||
ARCH=x86_64
|
ARCH=x86_64
|
||||||
GCCPREFIX=x86_64-linux-android
|
GCCPREFIX=x86_64-linux-android
|
||||||
APILEVEL=21
|
APILEVEL=24
|
||||||
|
|
||||||
APP_MODULES=`grep 'APP_MODULES [:][=]' $LOCAL_PATH/../Settings.mk | sed 's@.*[=]\(.*\)@\1@' | sed 's@\b\(application\|sdl_main\|sdl_native_helpers\|c++_shared\)\b@@g'`
|
APP_MODULES=`grep 'APP_MODULES [:][=]' $LOCAL_PATH/../Settings.mk | sed 's@.*[=]\(.*\)@\1@' | sed 's@\b\(application\|sdl_main\|sdl_native_helpers\|c++_shared\)\b@@g'`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user