Last change
on this file since 353 was 324, checked in by Sanahuja Guillaume, 5 years ago |
removing opencv dependency
|
-
Property svn:executable
set to
*
|
File size:
1.4 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | NB_THREADS=$(nproc)
|
---|
3 | from_scratch=no
|
---|
4 | IDE_SCRIPT=cmake_codelite_outofsource.sh
|
---|
5 | toolchains=($OECORE_CMAKE_TOOLCHAINS)
|
---|
6 |
|
---|
7 | function green_echo () {
|
---|
8 | echo -e "\033[32m$1\033[0m"
|
---|
9 | }
|
---|
10 |
|
---|
11 | function red_echo () {
|
---|
12 | echo -e "\033[31m$1\033[0m"
|
---|
13 | }
|
---|
14 |
|
---|
15 | function check_error () {
|
---|
16 | if [ "$?" != "0" ]; then
|
---|
17 | red_echo "Error, exiting"
|
---|
18 | exit 1
|
---|
19 | fi
|
---|
20 | }
|
---|
21 |
|
---|
22 | function sanity_check () {
|
---|
23 | if [ -z $FLAIR_ROOT ]; then
|
---|
24 | red_echo "You must set the FLAIR_ROOT environement variable"
|
---|
25 | exit 1
|
---|
26 | fi
|
---|
27 |
|
---|
28 | if ! [ -d $FLAIR_ROOT/flair-build ]; then
|
---|
29 | green_echo "Creating $FLAIR_ROOT/flair-build directory"
|
---|
30 | mkdir -p $FLAIR_ROOT/flair-build
|
---|
31 | fi
|
---|
32 | }
|
---|
33 |
|
---|
34 |
|
---|
35 | sanity_check
|
---|
36 |
|
---|
37 | printf "Compile all from scratch (flair-build directory will be erased) [Y/n]?"
|
---|
38 | read answer
|
---|
39 |
|
---|
40 | if [ "$answer" = "" ] || [ "$answer" = "y" ] || [ "$answer" = "Y" ]; then
|
---|
41 | rm -rf $FLAIR_ROOT/flair-build/*
|
---|
42 | cd $FLAIR_ROOT/flair-build
|
---|
43 | $FLAIR_ROOT/flair-src/scripts/$IDE_SCRIPT $FLAIR_ROOT/flair-src/
|
---|
44 | fi
|
---|
45 |
|
---|
46 | #iterate over available toolchains
|
---|
47 | for arch in ${toolchains[@]}; do
|
---|
48 | green_echo "Compiling and installing for $arch"
|
---|
49 | cd $FLAIR_ROOT/flair-build/build_$arch
|
---|
50 | make -j$NB_THREADS
|
---|
51 | check_error
|
---|
52 | make install
|
---|
53 | done
|
---|
54 |
|
---|
55 |
|
---|
56 | printf "Compile Flair libs documentation [Y/n]?"
|
---|
57 | read answer
|
---|
58 |
|
---|
59 | if [ "$answer" = "" ] || [ "$answer" = "y" ] || [ "$answer" = "Y" ]; then
|
---|
60 | $OECORE_HOST_NATIVE_SYSROOT/usr/bin/doxygen $FLAIR_ROOT/flair-src/lib/Doxyfile.in
|
---|
61 | fi
|
---|
62 |
|
---|
63 |
|
---|
64 | exit 0
|
---|
Note:
See
TracBrowser
for help on using the repository browser.