also match to pid 0x1002 in CUSBCECAdapterDetection
[deb_libcec.git] / project / RPi / build.sh
CommitLineData
29104708
LOK
1#!/bin/bash
2
3SCRIPT_PATH=`dirname $0`
4cd $SCRIPT_PATH
5SCRIPT_PATH=`pwd`
6cd -
7
8if [ -z "$1" ]; then
9 DEST_DIR="/opt/libcec-rpi"
10else
11 DEST_DIR="$1"
12fi
13
14source $SCRIPT_PATH/config
15
16$SCRIPT_PATH/get-toolchain.sh && \
17$SCRIPT_PATH/build-deps.sh && \
18$SCRIPT_PATH/bootstrap.sh $SCRIPT_PATH/toolchain .
19
20if [ $? -eq 0 ]; then
21 _set_toolchain_path "$SCRIPT_PATH/toolchain"
22 # configure with --enable-rpi-cec-api so we bug out if we can't find Pi support or can't build it
23 ./configure --host=$TARGET_HOST \
24 --build=`cc -dumpmachine` \
25 --prefix=$DEST_DIR \
26 --enable-debug \
27 --enable-rpi \
28 --with-rpi-include-path="${SCRIPT_PATH}/firmware/hardfp/opt/vc/include" \
29 --with-rpi-lib-path="${SCRIPT_PATH}/firmware/hardfp/opt/vc/lib" && \
30 make clean && \
31 make V=0
32
33 exit $?
34else
35 exit 1
36fi
37