build: update build script
This commit is contained in:
parent
3977d63b61
commit
c11b437a15
1 changed files with 14 additions and 2 deletions
|
@ -1,5 +1,17 @@
|
||||||
mode="release"
|
#!/bin/bash
|
||||||
export CPPFLAGS="-DMDB_USE_ROBUST=0" && export CFLAGS="-DMDB_USE_ROBUST=0" && cargo ndk -t arm64-v8a build --${mode}
|
|
||||||
|
case $1 in
|
||||||
|
debug|release)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: build_and_run.sh [type] where is type is 'debug' or 'release'" >&2
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
type=$1
|
||||||
|
[[ ${type} == "release" ]] && release_param+=(--release)
|
||||||
|
export CPPFLAGS="-DMDB_USE_ROBUST=0" && export CFLAGS="-DMDB_USE_ROBUST=0" && cargo ndk -t arm64-v8a build ${release_param[@]}
|
||||||
|
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
yes | cp -f target/aarch64-linux-android/${mode}/libgrim_android.so app/src/main/jniLibs/arm64-v8a
|
yes | cp -f target/aarch64-linux-android/${mode}/libgrim_android.so app/src/main/jniLibs/arm64-v8a
|
||||||
|
|
Loading…
Reference in a new issue