1 | #!/bin/sh |
---|
2 | |
---|
3 | |
---|
4 | F="generic-configure-bb10" |
---|
5 | |
---|
6 | if 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 |
---|
16 | fi |
---|
17 | |
---|
18 | if 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" |
---|
24 | else |
---|
25 | TARGET_ARCH="armv7" |
---|
26 | TARGET_ARCHEND="${TARGET_ARCH}le" |
---|
27 | LIBDIR="armle-v7" |
---|
28 | TARGET_HOST="arm-unknown-nto-qnx8.0.0eabi" |
---|
29 | fi |
---|
30 | |
---|
31 | RANLIB="${QNX_HOST}/usr/bin/nto${TARGET_ARCH}-ranlib " |
---|
32 | CPP="${QNX_HOST}/usr/bin/qcc -V4.6.3,gcc_nto${TARGET_ARCHEND}_cpp -E " |
---|
33 | CC="${QNX_HOST}/usr/bin/qcc -V4.6.3,gcc_nto${TARGET_ARCHEND}_cpp " |
---|
34 | LD="${QNX_HOST}/usr/bin/nto${TARGET_ARCH}-ld " |
---|
35 | export 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" |
---|
36 | export CFLAGS=" -g -O2 -fPIC" |
---|
37 | |
---|
38 | # Invoke configure |
---|
39 | ./configure --host=${TARGET_HOST} $* |
---|
40 | |
---|
41 | |
---|