From 669f2b55e842e0eb00eea48cde8f504e21a0ff9f Mon Sep 17 00:00:00 2001 From: Dave Date: Wed, 14 Dec 2016 11:31:00 +0100 Subject: [PATCH] Unified android-{arch} into android-target --- sys/android-aarch64.sh | 4 ---- sys/android-arm.sh | 4 ---- sys/android-mips.sh | 5 ----- sys/android-mips64.sh | 4 ---- sys/android-target.sh | 38 ++++++++++++++++++++++++++++++++++++++ sys/android-x86.sh | 4 ---- sys/menu.sh | 6 +++--- sys/shellcheck.sh | 6 +----- 8 files changed, 42 insertions(+), 29 deletions(-) delete mode 100755 sys/android-aarch64.sh delete mode 100755 sys/android-arm.sh delete mode 100755 sys/android-mips.sh delete mode 100755 sys/android-mips64.sh create mode 100755 sys/android-target.sh delete mode 100755 sys/android-x86.sh diff --git a/sys/android-aarch64.sh b/sys/android-aarch64.sh deleted file mode 100755 index 9047d3b93c..0000000000 --- a/sys/android-aarch64.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -cd `dirname $PWD/$0` -export CFLAGS="-O3" -./android-shell.sh aarch64 ./android-build.sh aarch64-static diff --git a/sys/android-arm.sh b/sys/android-arm.sh deleted file mode 100755 index 93ed3ee9bc..0000000000 --- a/sys/android-arm.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -cd `dirname $PWD/$0` -export CFLAGS="-O3" -./android-shell.sh arm ./android-build.sh arm-static diff --git a/sys/android-mips.sh b/sys/android-mips.sh deleted file mode 100755 index f04905471c..0000000000 --- a/sys/android-mips.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -cd `dirname $PWD/$0` -# PIC required for mips -export CFLAGS="-O3 -fPIC" -./android-shell.sh mips ./android-build.sh mips-static diff --git a/sys/android-mips64.sh b/sys/android-mips64.sh deleted file mode 100755 index 45b304cb91..0000000000 --- a/sys/android-mips64.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -cd `dirname $PWD/$0` -export CFLAGS="-O3 -fPIC -pie -fpic" -./android-shell.sh mips64 ./android-build.sh mips64-static diff --git a/sys/android-target.sh b/sys/android-target.sh new file mode 100755 index 0000000000..922727393d --- /dev/null +++ b/sys/android-target.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +if [ "$#" -ne 1 ]; then + echo "Please enter an android architecture..." + echo "Usage $0: {aarch64|arm|mips|mips64|x86}" + exit 1 +fi + +case "$1" in +aarch64|arm|mips|mips64|x86) + cd `dirname "$PWD/$0"` + + case "$1" in + aarch64|arm|x86) + export CFLAGS="-O3" + ;; + mips) + export CFLAGS="-O3 -fPIC" + ;; + mips64) + export CFLAGS="-O3 -fPIC -pie -fpic" + ;; + esac + + case "$1" in + aarch64|arm|mips|mips64) + ./android-shell.sh $1 ./android-build.sh $1-static + ;; + x86) + ./android-shell.sh x86 ./android-build.sh x86 + ;; + esac + ;; +*) + echo "Wrong param: $1" + echo "Usage $0: {aarch64|arm|mips|mips64|x86}" + exit 1 +esac diff --git a/sys/android-x86.sh b/sys/android-x86.sh deleted file mode 100755 index 970781e147..0000000000 --- a/sys/android-x86.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -cd `dirname $PWD/$0` -export CFLAGS="-O3" -./android-shell.sh x86 ./android-build.sh x86 diff --git a/sys/menu.sh b/sys/menu.sh index 2b6e5440cc..4155e15f13 100755 --- a/sys/menu.sh +++ b/sys/menu.sh @@ -211,13 +211,13 @@ BuildAndInstall() { sys/mingw32.sh ;; "Android ARM") - sys/android-arm.sh + sys/android-target.sh arm ;; "Android MIPS") - sys/android-mips.sh + sys/android-target.sh mips ;; "Android X86") - sys/android-x86.sh + sys/android-target.sh x86 ;; esac done diff --git a/sys/shellcheck.sh b/sys/shellcheck.sh index e7f644725d..05ac7dec79 100755 --- a/sys/shellcheck.sh +++ b/sys/shellcheck.sh @@ -40,13 +40,9 @@ fileslist=( ./mk/rapi-list ./sys/afl.sh ./sys/all.sh -./sys/android-aarch64.sh -./sys/android-arm.sh +./sys/android-target.sh ./sys/android-build.sh -./sys/android-mips64.sh -./sys/android-mips.sh ./sys/android-shell.sh -./sys/android-x86.sh ./sys/asan.sh ./sys/bokken.sh ./sys/build-harden.sh