Changeset 68 in flair-dev for trunk/scripts/flair_compile_all.sh


Ignore:
Timestamp:
Mar 6, 2018, 12:14:17 PM (3 years ago)
Author:
Sanahuja Guillaume
Message:

maj for armv5te

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/flair_compile_all.sh

    r48 r68  
    44from_scratch=no
    55IDE_SCRIPT=cmake_codelite.sh
     6toolchains=($OECORE_CMAKE_TOOLCHAINS)
    67
    78function green_echo () {
     
    3233                cd $1/$2
    3334
    34                 rm -f build_arm/CMakeCache.txt
    3535                $FLAIR_ROOT/flair-dev/scripts/$IDE_SCRIPT > /dev/null
    3636       
     
    4141}
    4242
    43 function cross_compile () {
    44         green_echo "Cross compiling and installing $2"
    45         cd $1/$2/build_arm
    46         if [ "$from_scratch" = "yes" ]; then make clean > /dev/null; fi
    47         make -j$NB_THREADS > /dev/null
    48         check_error
    49         make install
    50 }
    51 
    5243function compile () {
    53         green_echo "Compiling and installing $2"
    54         cd $1/$2/$ARCH_DIR
    55         if [ "$from_scratch" = "yes" ]; then make clean > /dev/null; fi
    56         make -j$NB_THREADS > /dev/null
    57         check_error     
    58         make install
     44    #iterate over available toolchains
     45    for arch in ${toolchains[@]}; do
     46        green_echo "Compiling and installing $2 for $arch"
     47        cd $1/$2/build_$arch
     48            if [ "$from_scratch" = "yes" ]; then make clean > /dev/null; fi
     49            make -j$NB_THREADS > /dev/null
     50            check_error
     51            make install
     52    done
    5953}
    6054
     
    6357                configure $FLAIR_ROOT/flair-src/lib $projects
    6458                compile $FLAIR_ROOT/flair-src/lib $projects
    65                 cross_compile $FLAIR_ROOT/flair-src/lib $projects
    6659        done
    6760
    6861        if [ -d $FLAIR_ROOT/flair-hds ]; then
    69                 for projects in FlairBebop FlairArdrone2 VisionFilter; do
     62                for projects in FlairBebop FlairArdrone2 FlairMinidrones VisionFilter; do
    7063                        configure $FLAIR_ROOT/flair-hds/src/lib $projects
    7164                        compile $FLAIR_ROOT/flair-hds/src/lib $projects
    72                         cross_compile $FLAIR_ROOT/flair-hds/src/lib $projects
    7365                done
    7466        fi
     
    7971                configure $FLAIR_ROOT/flair-src/tools $projects
    8072                compile $FLAIR_ROOT/flair-src/tools $projects
    81                 cross_compile $FLAIR_ROOT/flair-src/tools $projects
    8273        done
    8374}
     
    8778                configure $1/$2 $projects
    8879                compile $1/$2 $projects
    89                 cross_compile $1/$2 $projects
    9080        done
    9181}
     
    9585                configure $FLAIR_ROOT/flair-src/demos $projects
    9686                compile $FLAIR_ROOT/flair-src/demos $projects
    97                 cross_compile $FLAIR_ROOT/flair-src/demos $projects
    9887        done
    9988
     
    10594                configure $FLAIR_ROOT/flair-src/demos/Skeletons $projects
    10695                compile $FLAIR_ROOT/flair-src/demos/Skeletons $projects
    107                 cross_compile $FLAIR_ROOT/flair-src/demos/Skeletons $projects
    10896        done
    10997
Note: See TracChangeset for help on using the changeset viewer.