- Timestamp:
- Jan 31, 2019, 11:06:22 AM (6 years ago)
- Location:
- trunk/scripts
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/cmake_codelite.sh
r68 r99 32 32 fi 33 33 if ! readlink build | grep -w build_core2_64 >/dev/null; then 34 warn "Warnin k, build was pointing to another directory."34 warn "Warning, build was pointing to another directory." 35 35 fi 36 36 rm build -
trunk/scripts/flair_compile_all.sh
r96 r99 2 2 NB_THREADS=$(nproc) 3 3 from_scratch=no 4 IDE_SCRIPT=cmake_codelite .sh4 IDE_SCRIPT=cmake_codelite_outofsource.sh 5 5 toolchains=($OECORE_CMAKE_TOOLCHAINS) 6 6 … … 25 25 exit 1 26 26 fi 27 }28 27 29 function configure () { 30 if [ "$from_scratch" = "yes" ]; then 31 green_echo "Configuring $1/$2" 32 cd $1/$2 33 34 $FLAIR_ROOT/flair-dev/scripts/$IDE_SCRIPT > /dev/null 35 36 check_error 37 else 38 green_echo "Not configuring $1/$2" 28 if ! [ -d $FLAIR_ROOT/flair-buil ]; then 29 green_echo "Creating $FLAIR_ROOT/flair-build directory" 30 mkdir -p $FLAIR_ROOT/flair-buil 39 31 fi 40 32 } 41 33 42 function compile () {43 #iterate over available toolchains44 for arch in ${toolchains[@]}; do45 green_echo "Compiling and installing $2 for $arch"46 cd $1/$2/build_$arch47 if [ "$from_scratch" = "yes" ]; then make clean > /dev/null; fi48 make -j$NB_THREADS > /dev/null49 check_error50 make install51 done52 }53 54 function compile_libs() {55 for projects in FlairCore FlairSensorActuator FlairFilter FlairVisionFilter FlairMeta FlairSimulator ; do56 configure $FLAIR_ROOT/flair-src/lib $projects57 compile $FLAIR_ROOT/flair-src/lib $projects58 done59 60 if [ -d $FLAIR_ROOT/flair-hds ]; then61 for projects in FlairBebop FlairArdrone2 FlairMinidrones FlairMamboEdu VisionFilter; do62 configure $FLAIR_ROOT/flair-hds/src/lib $projects63 compile $FLAIR_ROOT/flair-hds/src/lib $projects64 done65 fi66 }67 68 function compile_tools() {69 for projects in FlairGCS Controller/DualShock3 Controller/Mavlink Dbt2csv VrpnBridge; do70 configure $FLAIR_ROOT/flair-src/tools $projects71 compile $FLAIR_ROOT/flair-src/tools $projects72 done73 }74 75 function compile_uav_and_simulator_demo() {76 for projects in simulator uav; do77 configure $1/$2 $projects78 compile $1/$2 $projects79 done80 }81 82 function compile_demos() {83 for projects in Sinus; do84 configure $FLAIR_ROOT/flair-src/demos $projects85 compile $FLAIR_ROOT/flair-src/demos $projects86 done87 88 for projects in OpticalFlow CircleFollower SimpleFleet Gps PidStandalone MixedReality/real MixedReality/virtual; do89 compile_uav_and_simulator_demo $FLAIR_ROOT/flair-src/demos $projects90 done91 92 for projects in CustomReferenceAngles CustomTorques; do93 configure $FLAIR_ROOT/flair-src/demos/Skeletons $projects94 compile $FLAIR_ROOT/flair-src/demos/Skeletons $projects95 done96 97 if [ -d $FLAIR_ROOT/flair-hds ]; then98 for projects in ApriltagFollower LineFollower; do99 compile_uav_and_simulator_demo $FLAIR_ROOT/flair-hds/src/demos $projects100 done101 fi102 103 }104 34 105 35 sanity_check 106 36 107 if [ -d $FLAIR_ROOT/flair-hds ]; then 108 printf "Found flair-hds repository\n" 109 fi 110 111 printf "Compile all from scratch [Y/n]?" 37 printf "Compile all from scratch (flair-build directory will be erased) [Y/n]?" 112 38 read answer 113 39 114 40 if [ "$answer" = "" ] || [ "$answer" = "y" ] || [ "$answer" = "Y" ]; then 115 from_scratch=yes 41 rm -rf $FLAIR_ROOT/flair-build/* 42 cd $FLAIR_ROOT/flair-build 43 $FLAIR_ROOT/flair-dev/scripts/$IDE_SCRIPT $FLAIR_ROOT/flair-src/ 116 44 fi 117 45 118 printf "Compile Flair libs [Y/n]?" 119 read answer 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 120 54 121 if [ "$answer" = "" ] || [ "$answer" = "y" ] || [ "$answer" = "Y" ]; then122 compile_libs123 fi124 55 125 56 printf "Compile Flair libs documentation [Y/n]?" … … 130 61 fi 131 62 132 printf "Compile Flair tools [Y/n]?"133 read answer134 135 if [ "$answer" = "" ] || [ "$answer" = "y" ] || [ "$answer" = "Y" ]; then136 compile_tools137 fi138 139 printf "Compile demos [Y/n]?"140 read answer141 142 if [ "$answer" = "" ] || [ "$answer" = "y" ] || [ "$answer" = "Y" ]; then143 compile_demos144 fi145 63 146 64 exit 0 147 148 149 150 exit 0
Note:
See TracChangeset
for help on using the changeset viewer.