123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366 |
- #qt_com=$(arch)
- qt_com=`arch`
- if [ $qt_com = "aarch64" ];then
- qtmake="/usr/lib/aarch64-linux-gnu/qt5/bin/qmake"
- else
- qtmake="/opt/Qt5.10.1/5.10.1/gcc_64/bin/qmake"
- fi
- if [ $(uname -m) == "x86_64" ]; then
- qtmake="/usr/lib/x86_64-linux-gnu/qt5/bin/qmake"
- fi
- if [ ! $qtmake ];then
- echo -e "\e[33m qtmake not set, auto find it\e[0m"
- qtmake=`find /opt -name "qmake" 2>/dev/null | grep 'gcc_64'`
- fi
- if [ ! $qtmake ];then
- echo -e "\e[33m can't find qmake \e[0m"
- exit 1
- fi
- echo -e "\e[33m qtmake: $qtmake \e[0m"
- show_error=$1
- has_error=0
- check_result()
- {
- if [ "$build_result" != 0 -a "$show_error" == "s" ];then
- echo -e "\e[33m*************************************************\e[0m"
- echo -e "\e[31m Please modify build error first,Exit!\e[0m"
- echo -e "\e[33m*************************************************\e[0m"
- exit 1
- fi
- }
- store_result()
- {
- if [ "$build_result" != 0 ];then
- echo -e "\e[33m*************************************************\e[0m"
- echo -e "\e[31m Please modify build error first,Exit!\e[0m"
- echo -e "\e[33m*************************************************\e[0m"
- error_log="$error_log \n `pwd`"
- has_error=1
- fi
- }
- show_result()
- {
- if [ "$has_error" != 0 ];then
- echo -e "\e[33m*************************************************\e[0m"
- echo -e "\e[31mPlease modify build error first,Exit!\e[0m"
- echo -e "\e[31m$error_log\e[0m"
- echo -e "\e[33m*************************************************\e[0m"
- else
- echo -e "\e[33m*************************************************\e[0m"
- echo -e "\e[31m Build Success! \e[0m"
- echo -e "\e[33m*************************************************\e[0m"
- fi
- }
- MAKEOPT=-j8
- mkdir bin
- cd src/include/proto
- sh ./protomake.sh
- cd ../../../
- cd src/common/modulecomm/
- $qtmake modulecomm.pro
- make $MAKEOPT
- build_result=$?
- check_result $build_result
- store_result
- make clean
- cp libmodulecomm.so ./../../../bin/
- rm Makefile
- rm .qmake.stash
- cd ../../../
- cd src/common/xmlparam/
- $qtmake xmlparam.pro
- make $MAKEOPT
- build_result=$?
- check_result $build_result
- store_result
- make clean
- cp libxmlparam.so ./../../../bin/
- rm Makefile
- rm .qmake.stash
- cd ../../../
- cd src/common/ndt_cpu/
- $qtmake ndt_cpu.pro
- make $MAKEOPT
- build_result=$?
- check_result $build_result
- store_result
- make clean
- cp libndt_cpu.so ./../../../bin/
- rm Makefile
- rm .qmake.stash
- cd ../../../
- cd src/common/ivlog/
- $qtmake ivlog.pro
- make $MAKEOPT
- build_result=$?
- check_result $build_result
- store_result
- make clean
- cp libivlog.so ./../../../bin/
- rm Makefile
- rm .qmake.stash
- cd ../../../
- cd src/common/ivfault/
- $qtmake ivfault.pro
- make $MAKEOPT
- build_result=$?
- check_result $build_result
- store_result
- make clean
- cp libivfault.so ./../../../bin/
- rm Makefile
- rm .qmake.stash
- cd ../../../
- cd src/common/platformif/
- $qtmake platformif.pro
- make $MAKEOPT
- build_result=$?
- check_result $build_result
- store_result
- make clean
- cp libplatformif.so ./../../../bin/
- rm Makefile
- rm .qmake.stash
- cd ../../../
- cd src/common/ivexit/
- $qtmake ivexit.pro
- make $MAKEOPT
- build_result=$?
- check_result $build_result
- store_result
- make clean
- cp libivexit.so ./../../../bin/
- rm Makefile
- rm .qmake.stash
- cd ../../../
- cd src/common/ivbacktrace/
- $qtmake ivbacktrace.pro
- make $MAKEOPT
- build_result=$?
- check_result $build_result
- store_result
- make clean
- cp libivbacktrace.so ./../../../bin/
- rm Makefile
- rm .qmake.stash
- cd ../../../
- cd src/common/ivchart/
- $qtmake ivchart.pro
- make $MAKEOPT
- build_result=$?
- check_result $build_result
- store_result
- make clean
- cp libivchart.so ./../../../bin/
- rm Makefile
- rm .qmake.stash
- cd ../../../
- cd src/common/ivservice/
- $qtmake ivservice.pro
- make $MAKEOPT
- build_result=$?
- check_result $build_result
- store_result
- make clean
- cp libivservice.so ./../../../bin/
- rm Makefile
- rm .qmake.stash
- cd ../../../
- cd src/common/makeprotointerface/
- $qtmake makeprotointerface.pro
- make $MAKEOPT
- build_result=$?
- check_result $build_result
- store_result
- make clean
- cp makeprotointerface ./../../../bin/
- rm Makefile
- rm .qmake.stash
- cd ../../../
- controller_app_name=(
- controller_changan_shenlan
- )
- for x in ${controller_app_name[@]}
- do
- cd src/controller/${x}/
- $qtmake ${x}.pro
- make $MAKEOPT
- build_result=$?
- check_result $build_result
- store_result
- make clean
- cp ${x} ./../../../bin/
- rm Makefile
- rm .qmake.stash
- rm ${x}
- cd ../../../
- done
- decition_app_name=(
- decition_brain_sf_changan_shenlan
- #decition_brain_ge3
- #decition_brain_qingyuan
- #decition_brain_vv7
- )
- for x in ${decition_app_name[@]}
- do
- cd src/decition/${x}/
- $qtmake ${x}.pro
- make $MAKEOPT
- build_result=$?
- check_result $build_result
- store_result
- make clean
- cp ${x} ./../../../bin/
- rm Makefile
- rm .qmake.stash
- rm ${x}
- cd ../../../
- done
- driver_app_name=(
- driver_lidar_rs16
- driver_gps_hcp2
- driver_can_nvidia_agx
- driver_map_trace
- driver_map_xodrload
- # driver_rpc_server
- # driver_cloud_grpc_client
- # driver_grpc_server
- # driver_rpc_server
- # driver_group_grpc_client
- )
- for x in ${driver_app_name[@]}
- do
- cd src/driver/${x}/
- $qtmake ${x}.pro
- make $MAKEOPT
- build_result=$?
- check_result $build_result
- store_result
- make clean
- cp ${x} ./../../../bin/
- rm Makefile
- rm .qmake.stash
- rm ${x}
- cd ../../../
- done
- detect_app_name=(
- # detection_lidar_PointPillars_MultiHead
- detection_radar_delphi_esr
- detection_chassis
- )
- for x in ${detect_app_name[@]}
- do
- cd src/detection/${x}/
- $qtmake ${x}.pro
- make $MAKEOPT
- build_result=$?
- check_result $build_result
- store_result
- make clean
- cp ${x} ./../../../bin/
- rm Makefile
- rm .qmake.stash
- rm ${x}
- cd ../../../
- done
- fution_app_name=(
- # lidar_radar_fusion_cnn
- )
- for x in ${fution_app_name[@]}
- do
- cd src/fusion/${x}/
- $qtmake ${x}.pro
- make $MAKEOPT
- build_result=$?
- check_result $build_result
- store_result
- make clean
- cp ${x} ./../../../bin/
- rm Makefile
- rm .qmake.stash
- rm ${x}
- cd ../../../
- done
- tool_app_name=(
- view_pointcloud
- view_gps
- # view_rawcan
- view_radar
- IVSysMan
- ivmapmake
- view_ivlog
- # tool_querymsg
- tool_xodrobj
- ivlog_record
- adciv_record
- tool_configivsysman
- )
- for x in ${tool_app_name[@]}
- do
- cd src/tool/${x}/
- $qtmake ${x}.pro
- make $MAKEOPT
- build_result=$?
- check_result $build_result
- store_result
- make clean
- cp ${x} ./../../../bin/
- rm Makefile
- rm .qmake.stash
- rm ${x}
- cd ../../../
- done
- ui_app_name=(
- ui_ads_hmi
- )
- for x in ${ui_app_name[@]}
- do
- cd src/ui/${x}/
- $qtmake ${x}.pro
- make $MAKEOPT
- build_result=$?
- check_result $build_result
- store_result
- make clean
- cp ${x} ./../../../bin/
- rm Makefile
- rm .qmake.stash
- rm ${x}
- cd ../../../
- done
- show_result
|