]> git.saurik.com Git - cycript.git/blame_incremental - android.sh
Instance's toPointer() should return as CFTypeRef.
[cycript.git] / android.sh
... / ...
CommitLineData
1#!/bin/bash
2ndk=~/bin/android-ndk
3abi=armeabi
4ver=4.9
5api=9
6bld=darwin-x86_64
7bin=${ndk}/toolchains/arm-linux-androideabi-${ver}/prebuilt/${bld}/bin
8#export PATH=${bin}:$PATH
9flg=()
10flg+=(--sysroot=${ndk}/platforms/android-${api}/arch-arm)
11flg+=(-I${ndk}/sources/cxx-stl/gnu-libstdc++/${ver}/include)
12flg+=(-I${ndk}/sources/cxx-stl/gnu-libstdc++/${ver}/libs/${abi}/include)
13ldf=()
14ldf+=(-L${ndk}/sources/cxx-stl/gnu-libstdc++/${ver}/libs/${abi})
15ldf+=(-lgnustl_static)
16tgt=arm-linux-androideabi
17cc=${bin}/${tgt}-gcc
18cxx=${bin}/${tgt}-g++
19cpp=()
20ccf=()
21ccf+=(-g0 -O3)
22function cfg() {
23 cfg=$1
24 shift
25 "${cfg}" \
26 CC="${cc} ${flg[*]}" CXX="${cxx} ${flg[*]}" OBJCXX="${cxx} ${flg[*]}" \
27 CFLAGS="${ccf[*]}" CXXFLAGS="${ccf[*]}" OBJCXXFLAGS="${ccf[*]}" \
28 --host="${tgt}" CPPFLAGS="${cpp[*]}" LDFLAGS="${ldf[*]}" "$@"
29}