File: configure-android.sh

package info (click to toggle)
resiprocate 1%3A1.9.7-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 36,456 kB
  • ctags: 27,123
  • sloc: cpp: 195,346; xml: 12,515; sh: 11,986; ansic: 6,807; makefile: 2,182; php: 1,150; python: 300; objc: 91; sql: 85; perl: 21; csh: 5
file content (46 lines) | stat: -rwxr-xr-x 1,671 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh

# run this script with any normal configure options
# for reSIProcate

# Where the NDK is unpacked
export ANDROID_NDK=${HOME}/android/android-ndk-r7

# it may be necessary to have a full copy of the Android source tree
# or just take a copy of linker.h
# not currently needed at all for reSIProcate build
export ANDROID_SRC=${HOME}/android/full-source
 
export CROSS_COMPILE=arm-linux-androideabi
export CROSS_VERSION=4.4.3
export TOOLCHAIN_ROOT=${ANDROID_NDK}/toolchains/arm-linux-androideabi-${CROSS_VERSION}/prebuilt/linux-x86

export ANDROID_STL=${ANDROID_NDK}/sources/cxx-stl

export ANDROID_VERSION=8
export ANDROID_VERSION_S=android-${ANDROID_VERSION}
 
export SYSROOT=${ANDROID_NDK}/platforms/${ANDROID_VERSION_S}/arch-arm
 
export TOOLCHAIN_PREFIX=${TOOLCHAIN_ROOT}/bin/${CROSS_COMPILE}
 
# Declare any binutils we may need (there may be others)
export CPP=${TOOLCHAIN_PREFIX}-cpp
export AR=${TOOLCHAIN_PREFIX}-ar
export AS=${TOOLCHAIN_PREFIX}-as
export NM=${TOOLCHAIN_PREFIX}-nm
export CC=${TOOLCHAIN_PREFIX}-gcc
export CXX=${TOOLCHAIN_PREFIX}-g++
export LD=${TOOLCHAIN_PREFIX}-ld
export RANLIB=${TOOLCHAIN_PREFIX}-ranlib

# installation prefix
export PREFIX=/
export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
 
export CFLAGS="${CFLAGS} --sysroot=${SYSROOT} -I${SYSROOT}/usr/include -I${TOOLCHAIN_ROOT}/include -I${ANDROID_SRC}/bionic -I${ANDROID_STL}/gnu-libstdc++/include -I${ANDROID_STL}/gnu-libstdc++/libs/armeabi/include"
export CPPFLAGS="${CFLAGS}"
export LDFLAGS="${LDFLAGS} -L${SYSROOT}/usr/lib -L${TOOLCHAIN_ROOT}/lib -L${ANDROID_STL}/gnu-libstdc++/lib"
 
./configure --host=${CROSS_COMPILE} --with-sysroot=${SYSROOT} --prefix=${PREFIX} "$@"