]> git.saurik.com Git - cycript.git/blame_incremental - android.sh
Struct field access must be mindful of alignments.
[cycript.git] / android.sh
... / ...
CommitLineData
1#!/bin/bash
2ndk=~/bin/android-ndk
3abi=armeabi
4ver=4.9
5bin=${ndk}/toolchains/arm-linux-androideabi-${ver}/prebuilt/darwin-x86_64/bin
6#export PATH=${bin}:$PATH
7flg=()
8flg+=(--sysroot=${ndk}/platforms/android-9/arch-arm)
9flg+=(-I${ndk}/sources/cxx-stl/gnu-libstdc++/${ver}/include)
10flg+=(-I${ndk}/sources/cxx-stl/gnu-libstdc++/${ver}/libs/${abi}/include)
11ldf=()
12ldf+=(-L${ndk}/sources/cxx-stl/gnu-libstdc++/${ver}/libs/${abi})
13ldf+=(-lgnustl_static)
14tgt=arm-linux-androideabi
15cc=${bin}/${tgt}-gcc
16cxx=${bin}/${tgt}-g++
17function cfg() {
18 cfg=$1
19 shift
20 CC="${cc} ${flg[*]}" CXX="${cxx} ${flg[*]}" OBJCXX="${cxx} ${flg[*]}" "${cfg}" --host="${tgt}" LDFLAGS="${ldf[*]}" "$@"
21}