11#! /bin/bash
22set -ev
33OF_ROOT=$( cd " $( dirname " $0 " ) /../../.." ; pwd -P )
4- PROJECTS=$OF_ROOT /libs/openFrameworksCompiled/project
5- # source $OF_ROOT/scripts/ci/ccache.sh
64
7- # Add compiler flag to reduce memory usage to enable builds to complete
8- # see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56746#c7
9- # the "proper" way does not work currently:
10- export CXXFLAGS=" ${CXXFLAGS} -ftrack-macro-expansion=0"
11-
12- echo " **** Building OF core ****"
13- cd $OF_ROOT
14- # this carries over to subsequent compilations of examples
15- sed -i " s/PLATFORM_OPTIMIZATION_CFLAGS_DEBUG = .*/PLATFORM_OPTIMIZATION_CFLAGS_DEBUG = -g0/" $PROJECTS /makefileCommon/config.linux.common.mk
16- cd $PROJECTS
175export GCC_PREFIX=arm-linux-gnueabihf
186export GST_VERSION=1.0
7+ # NOTE: GCC_VERSION should match the version present in the downloaded toolchain
8+ export GCC_VERSION=9.4.0
199export RPI_ROOT=${OF_ROOT} /scripts/ci/$TARGET /raspbian
2010export TOOLCHAIN_ROOT=${OF_ROOT} /scripts/ci/$TARGET /rpi_toolchain
2111export PLATFORM_OS=Linux
@@ -25,10 +15,16 @@ export CXX="${TOOLCHAIN_ROOT}/bin/${GCC_PREFIX}-g++"
2515export CC=" ${TOOLCHAIN_ROOT} /bin/${GCC_PREFIX} -gcc"
2616export AR=${TOOLCHAIN_ROOT} /bin/${GCC_PREFIX} -ar
2717export LD=${TOOLCHAIN_ROOT} /bin/${GCC_PREFIX} -ld
28- make Debug -j2
18+ export CROSS_COMPILING=1
2919
20+ export PATH=/rpi_toolchain/bin/:$PATH
21+ export LD_LIBRARY_PATH=/rpi_toolchain/lib:$LD_LIBRARY_PATH
22+
3023echo " **** Building emptyExample ****"
31- cd $OF_ROOT /scripts/templates/linuxarmv6l
24+ cd $OF_ROOT
25+ cp scripts/templates/linuxarmv6l/Makefile examples/templates/emptyExample/
26+ cp scripts/templates/linuxarmv6l/config.make examples/templates/emptyExample/
27+ cd examples/templates/emptyExample/
3228make Debug -j2
3329
3430echo " **** Building allAddonsExample ****"
@@ -37,6 +33,3 @@ cp scripts/templates/linuxarmv6l/Makefile examples/templates/allAddonsExample/
3733cp scripts/templates/linuxarmv6l/config.make examples/templates/allAddonsExample/
3834cd examples/templates/allAddonsExample/
3935make Debug -j2
40-
41- git checkout $PROJECTS /makefileCommon/config.linux.common.mk
42- git checkout $PROJECTS /linuxarmv6l/config.linuxarmv6l.default.mk
0 commit comments