Using-OpenCORE-AMR-NB-WB-Codec: generic-configure-bb10

File generic-configure-bb10, 1.2 KB (added by bennylp, 11 years ago)
Line 
1#!/bin/sh
2
3
4F="generic-configure-bb10"
5
6if test "$*" = "--help" -o "$*" = "-h"; then
7  echo "$F [--simulator] [OPTIONS]"
8  echo ""
9  echo "where:"
10  echo "  --simulator Optional parameter to specify that the compilation"
11  echo "              target is a simulator."
12  echo "  OPTIONS     Other options that will be passed directly to"
13  echo "              ./configure script. Run ./configure --help"
14  echo "              for more info."
15  exit 0
16fi
17
18if test "$1" = "--simulator"; then
19  shift
20  TARGET_ARCH="x86"
21  TARGET_ARCHEND=${TARGET_ARCH}
22  LIBDIR=${TARGET_ARCH}
23  TARGET_HOST="i486-pc-nto-qnx8.0.0"
24else
25  TARGET_ARCH="armv7"
26  TARGET_ARCHEND="${TARGET_ARCH}le"
27  LIBDIR="armle-v7"
28  TARGET_HOST="arm-unknown-nto-qnx8.0.0eabi"
29fi
30
31RANLIB="${QNX_HOST}/usr/bin/nto${TARGET_ARCH}-ranlib "
32CPP="${QNX_HOST}/usr/bin/qcc -V4.6.3,gcc_nto${TARGET_ARCHEND}_cpp -E "
33CC="${QNX_HOST}/usr/bin/qcc -V4.6.3,gcc_nto${TARGET_ARCHEND}_cpp "
34LD="${QNX_HOST}/usr/bin/nto${TARGET_ARCH}-ld " 
35export LDFLAGS=" -L${QNX_TARGET}/${LIBDIR}/usr/lib -L${QNX_TARGET}/${LIBDIR}/lib -L${QNX_HOST}/usr/lib/gcc/${TARGET_HOST}/4.6.3 -lgcc -lasound -laudio_manager"
36export CFLAGS=" -g -O2 -fPIC" 
37
38# Invoke configure
39./configure --host=${TARGET_HOST} $*
40
41