autogen.sh 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. #qtmake="/opt/Qt5.10.1/5.10.1/gcc_64/bin/qmake"
  2. #qtmake=/usr/bin/qmake
  3. qtmake="/usr/lib/aarch64-linux-gnu/qt5/bin/qmake"
  4. if [ ! $qtmake ];then
  5. echo -e "\e[33m qtmake not set, auto find it\e[0m"
  6. qtmake=`find /opt -name "qmake" 2>/dev/null | grep 'gcc_64'`
  7. fi
  8. if [ ! $qtmake ];then
  9. echo -e "\e[33m can't find qmake \e[0m"
  10. exit 1
  11. fi
  12. echo -e "\e[33m qtmake: $qtmake \e[0m"
  13. show_error=$1
  14. check_result()
  15. {
  16. if [ "$1" != 0 -a "$show_error" == "s" ];then
  17. echo -e "\e[33m*************************************************\e[0m"
  18. echo -e "\e[31m Please modify build error first,Exit!\e[0m"
  19. echo -e "\e[33m*************************************************\e[0m"
  20. exit 1
  21. fi
  22. }
  23. MAKEOPT=-j8
  24. mkdir bin
  25. cd src/include/proto
  26. sh ./protomake.sh
  27. cd ../../../
  28. cd src/common/modulecomm/
  29. $qtmake modulecomm.pro
  30. check_result $?
  31. make $MAKEOPT
  32. check_result $?
  33. make clean
  34. cp libmodulecomm.so ./../../../bin/
  35. rm Makefile
  36. rm .qmake.stash
  37. cd ../../../
  38. cd src/common/xmlparam/
  39. $qtmake xmlparam.pro
  40. make $MAKEOPT
  41. check_result $?
  42. make clean
  43. cp libxmlparam.so ./../../../bin/
  44. rm Makefile
  45. rm .qmake.stash
  46. cd ../../../
  47. cd src/common/ndt_cpu/
  48. $qtmake ndt_cpu.pro
  49. make $MAKEOPT
  50. check_result $?
  51. make clean
  52. cp libndt_cpu.so ./../../../bin/
  53. rm Makefile
  54. rm .qmake.stash
  55. cd ../../../
  56. cd src/common/ivlog/
  57. $qtmake ivlog.pro
  58. make $MAKEOPT
  59. check_result $?
  60. make clean
  61. cp libivlog.so ./../../../bin/
  62. rm Makefile
  63. rm .qmake.stash
  64. cd ../../../
  65. cd src/common/ivfault/
  66. $qtmake ivfault.pro
  67. make $MAKEOPT
  68. check_result $?
  69. make clean
  70. cp libivfault.so ./../../../bin/
  71. rm Makefile
  72. rm .qmake.stash
  73. cd ../../../
  74. cd src/common/platformif/
  75. $qtmake platformif.pro
  76. make $MAKEOPT
  77. check_result $?
  78. make clean
  79. cp libplatformif.so ./../../../bin/
  80. rm Makefile
  81. rm .qmake.stash
  82. cd ../../../
  83. cd src/common/ivexit/
  84. $qtmake ivexit.pro
  85. make $MAKEOPT
  86. check_result $?
  87. make clean
  88. cp libivexit.so ./../../../bin/
  89. rm Makefile
  90. rm .qmake.stash
  91. cd ../../../
  92. controller_app_name=(
  93. controller_ge3
  94. controller_vv7
  95. controller_midcar
  96. )
  97. for x in ${controller_app_name[@]}
  98. do
  99. cd src/controller/${x}/
  100. $qtmake ${x}.pro
  101. make $MAKEOPT
  102. check_result $?
  103. make clean
  104. cp ${x} ./../../../bin/
  105. rm Makefile
  106. rm .qmake.stash
  107. rm ${x}
  108. cd ../../../
  109. done
  110. decition_app_name=(
  111. decition_brain
  112. #decition_brain_ge3
  113. #decition_brain_qingyuan
  114. #decition_brain_vv7
  115. )
  116. for x in ${decition_app_name[@]}
  117. do
  118. cd src/decition/${x}/
  119. $qtmake ${x}.pro
  120. make $MAKEOPT
  121. check_result $?
  122. make clean
  123. cp ${x} ./../../../bin/
  124. rm Makefile
  125. rm .qmake.stash
  126. rm ${x}
  127. cd ../../../
  128. done
  129. driver_app_name=(
  130. driver_lidar_rs16
  131. # driver_lidar_vlp16
  132. driver_gps_hcp2
  133. #driver_gps_ins550d
  134. driver_can_nvidia_agx
  135. # driver_can_kvaser
  136. # driver_can_vci
  137. driver_map_trace
  138. driver_map_xodrload
  139. driver_radio_p900
  140. )
  141. for x in ${driver_app_name[@]}
  142. do
  143. cd src/driver/${x}/
  144. $qtmake ${x}.pro
  145. make $MAKEOPT
  146. check_result $?
  147. make clean
  148. cp ${x} ./../../../bin/
  149. rm Makefile
  150. rm .qmake.stash
  151. rm ${x}
  152. cd ../../../
  153. done
  154. detect_app_name=(
  155. #detection_radar_conti_sr308
  156. detection_radar_delphi_esr
  157. detection_chassis
  158. detection_lidar_grid
  159. )
  160. for x in ${detect_app_name[@]}
  161. do
  162. cd src/detection/${x}/
  163. $qtmake ${x}.pro
  164. make $MAKEOPT
  165. check_result $?
  166. make clean
  167. cp ${x} ./../../../bin/
  168. rm Makefile
  169. rm .qmake.stash
  170. rm ${x}
  171. cd ../../../
  172. done
  173. tool_app_name=(
  174. #view_pointcloud
  175. view_gps
  176. view_rawcan
  177. view_radar
  178. IVSysMan
  179. ivmapmake
  180. view_ivlog
  181. tool_querymsg
  182. tool_xodrobj
  183. ivlog_record
  184. adciv_record
  185. )
  186. for x in ${tool_app_name[@]}
  187. do
  188. cd src/tool/${x}/
  189. $qtmake ${x}.pro
  190. make $MAKEOPT
  191. check_result $?
  192. make clean
  193. cp ${x} ./../../../bin/
  194. rm Makefile
  195. rm .qmake.stash
  196. rm ${x}
  197. cd ../../../
  198. done
  199. ui_app_name=(
  200. ui_ads_hmi
  201. )
  202. for x in ${ui_app_name[@]}
  203. do
  204. cd src/ui/${x}/
  205. $qtmake ${x}.pro
  206. make $MAKEOPT
  207. check_result $?
  208. make clean
  209. cp ${x} ./../../../bin/
  210. rm Makefile
  211. rm .qmake.stash
  212. rm ${x}
  213. cd ../../../
  214. done