Index: build/build.sh =================================================================== diff -u -r39812c445f0f3334b0f8dfd1466abb16a5a9a3e9 -r360aa24bac9258cba3d7328fc18bf6831effb43d --- build/build.sh (.../build.sh) (revision 39812c445f0f3334b0f8dfd1466abb16a5a9a3e9) +++ build/build.sh (.../build.sh) (revision 360aa24bac9258cba3d7328fc18bf6831effb43d) @@ -2,10 +2,19 @@ #setup environment # project pro file -pro_path=application/application.pro +pro_path=application +pro_name=denali.pro + +pro_type_debug="debug" +pro_type_release="release" +pro_type=$pro_type_release + pro_debug="CONFIG+=debug CONFIG+=qml_debug" pro_release="CONFIG+=qtquickcompiler" +pro_build=$pro_release +out_path="build" + # gcc env gcc_qmake="/opt/Qt/5.12.4/gcc_64/bin/qmake" gcc_make="/usr/bin/make" @@ -23,52 +32,59 @@ echo if [[ "$1" = "debug" ]]; then pro_build=$pro_debug - echo "----- DEBUG BUILD --------------------------" + pro_type=$pro_type_debug + echo "----- DEBUG BUILD ---------------------------" else - pro_build=$pro_release - echo "----- RELASE BUILD --------------------------" + echo "----- RELASE BUILD ---------------------------" fi echo } #check if the out folders already exists -if [[ -e $gcc_out ]]; then - rm -frd $gcc_out +if [[ -e $out_path ]]; then + rm -frd $out_path fi -if [[ -e $poky_out ]]; then - rm -frd $poky_out +if [[ -e $pro_path ]]; then + rm -frd $pro_path fi -# check if user prefers another folder for the application project -if [[ ! -z "$1" ]]; then - pro_path=$1 +if [[ "$1" = "clean" ]]; then + exit 0 fi -# check if the folder exist -if [[ ! -e "$pro_path" ]]; then - echo "folder $pro_path does not exists" - exit 1 -fi +#clone the application repository +git clone ssh://git@dvm-linux02:7999/sw/application.git #set the build type (debug/release) -buildType "$2" +buildType "$1" +#create the build folder +mkdir $out_path +cd $out_path + #build for gcc -echo "---------------------------------------------" -echo "Start building ---------- gcc_64 ------------" -echo "---------------------------------------------" -mkdir $gcc_out -cd $gcc_out -$gcc_qmake ../$pro_path $gcc_spec $pro_build +echo "-----------------------------------------------" +echo "- Start building ---------- gcc_64 ------------" +echo "-----------------------------------------------" +mkdir -p $gcc_out"_"$pro_type +cd $gcc_out"_"$pro_type +$gcc_qmake ../../$pro_path/$pro_name $gcc_spec $pro_build $gcc_make -j4 +#return back to out path cd .. #build for poky -echo "---------------------------------------------" -echo "Start building ---------- poky_64 -----------" -echo "---------------------------------------------" -mkdir $poky_out -cd $poky_out -$poky_qmake ../$pro_path $poky_spec $pro_build +echo "-----------------------------------------------" +echo "- Start building ---------- poky_64 -----------" +echo "-----------------------------------------------" +mkdir -p $poky_out"_"$pro_type +cd $poky_out"_"$pro_type +$poky_qmake ../../$pro_path/$pro_name $poky_spec $pro_build $poky_make -j4 +#return back to out path cd .. + + +#return back to main folder +cd .. +