autogen_ok.sh 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. #qt_com=$(arch)
  2. qt_com=`arch`
  3. if [ $qt_com = "aarch64" ];then
  4. qtmake="/usr/lib/aarch64-linux-gnu/qt5/bin/qmake"
  5. else
  6. qtmake="/opt/Qt5.10.1/5.10.1/gcc_64/bin/qmake"
  7. fi
  8. if [ $(uname -m) == "x86_64" ]; then
  9. qtmake="/usr/lib/x86_64-linux-gnu/qt5/bin/qmake"
  10. fi
  11. if [ ! $qtmake ];then
  12. echo -e "\e[33m qtmake not set, auto find it\e[0m"
  13. qtmake=`find /opt -name "qmake" 2>/dev/null | grep 'gcc_64'`
  14. fi
  15. if [ ! $qtmake ];then
  16. echo -e "\e[33m can't find qmake \e[0m"
  17. exit 1
  18. fi
  19. echo -e "\e[33m qtmake: $qtmake \e[0m"
  20. show_error=$1
  21. has_error=0
  22. check_result()
  23. {
  24. if [ "$build_result" != 0 -a "$show_error" == "s" ];then
  25. echo -e "\e[33m*************************************************\e[0m"
  26. echo -e "\e[31m Please modify build error first,Exit!\e[0m"
  27. echo -e "\e[33m*************************************************\e[0m"
  28. exit 1
  29. fi
  30. }
  31. store_result()
  32. {
  33. if [ "$build_result" != 0 ];then
  34. echo -e "\e[33m*************************************************\e[0m"
  35. echo -e "\e[31m Please modify build error first,Exit!\e[0m"
  36. echo -e "\e[33m*************************************************\e[0m"
  37. error_log="$error_log \n `pwd`"
  38. has_error=1
  39. fi
  40. }
  41. show_result()
  42. {
  43. if [ "$has_error" != 0 ];then
  44. echo -e "\e[33m*************************************************\e[0m"
  45. echo -e "\e[31mPlease modify build error first,Exit!\e[0m"
  46. echo -e "\e[31m$error_log\e[0m"
  47. echo -e "\e[33m*************************************************\e[0m"
  48. else
  49. echo -e "\e[33m*************************************************\e[0m"
  50. echo -e "\e[31m Build Success! \e[0m"
  51. echo -e "\e[33m*************************************************\e[0m"
  52. fi
  53. }
  54. MAKEOPT=-j8
  55. mkdir bin
  56. cd src/include/proto
  57. sh ./protomake.sh
  58. cd ../../../
  59. cd src/common/modulecomm/
  60. $qtmake modulecomm.pro
  61. make $MAKEOPT
  62. build_result=$?
  63. check_result $build_result
  64. store_result
  65. make clean
  66. cp libmodulecomm.so ./../../../bin/
  67. rm Makefile
  68. rm .qmake.stash
  69. cd ../../../
  70. cd src/common/xmlparam/
  71. $qtmake xmlparam.pro
  72. make $MAKEOPT
  73. build_result=$?
  74. check_result $build_result
  75. store_result
  76. make clean
  77. cp libxmlparam.so ./../../../bin/
  78. rm Makefile
  79. rm .qmake.stash
  80. cd ../../../
  81. cd src/common/ndt_cpu/
  82. $qtmake ndt_cpu.pro
  83. make $MAKEOPT
  84. build_result=$?
  85. check_result $build_result
  86. store_result
  87. make clean
  88. cp libndt_cpu.so ./../../../bin/
  89. rm Makefile
  90. rm .qmake.stash
  91. cd ../../../
  92. cd src/common/ivlog/
  93. $qtmake ivlog.pro
  94. make $MAKEOPT
  95. build_result=$?
  96. check_result $build_result
  97. store_result
  98. make clean
  99. cp libivlog.so ./../../../bin/
  100. rm Makefile
  101. rm .qmake.stash
  102. cd ../../../
  103. cd src/common/ivfault/
  104. $qtmake ivfault.pro
  105. make $MAKEOPT
  106. build_result=$?
  107. check_result $build_result
  108. store_result
  109. make clean
  110. cp libivfault.so ./../../../bin/
  111. rm Makefile
  112. rm .qmake.stash
  113. cd ../../../
  114. cd src/common/platformif/
  115. $qtmake platformif.pro
  116. make $MAKEOPT
  117. build_result=$?
  118. check_result $build_result
  119. store_result
  120. make clean
  121. cp libplatformif.so ./../../../bin/
  122. rm Makefile
  123. rm .qmake.stash
  124. cd ../../../
  125. cd src/common/ivexit/
  126. $qtmake ivexit.pro
  127. make $MAKEOPT
  128. build_result=$?
  129. check_result $build_result
  130. store_result
  131. make clean
  132. cp libivexit.so ./../../../bin/
  133. rm Makefile
  134. rm .qmake.stash
  135. cd ../../../
  136. cd src/common/ivbacktrace/
  137. $qtmake ivbacktrace.pro
  138. make $MAKEOPT
  139. build_result=$?
  140. check_result $build_result
  141. store_result
  142. make clean
  143. cp libivbacktrace.so ./../../../bin/
  144. rm Makefile
  145. rm .qmake.stash
  146. cd ../../../
  147. cd src/common/ivchart/
  148. $qtmake ivchart.pro
  149. make $MAKEOPT
  150. build_result=$?
  151. check_result $build_result
  152. store_result
  153. make clean
  154. cp libivchart.so ./../../../bin/
  155. rm Makefile
  156. rm .qmake.stash
  157. cd ../../../
  158. cd src/common/ivservice/
  159. $qtmake ivservice.pro
  160. make $MAKEOPT
  161. build_result=$?
  162. check_result $build_result
  163. store_result
  164. make clean
  165. cp libivservice.so ./../../../bin/
  166. rm Makefile
  167. rm .qmake.stash
  168. cd ../../../
  169. cd src/common/makeprotointerface/
  170. $qtmake makeprotointerface.pro
  171. make $MAKEOPT
  172. build_result=$?
  173. check_result $build_result
  174. store_result
  175. make clean
  176. cp makeprotointerface ./../../../bin/
  177. rm Makefile
  178. rm .qmake.stash
  179. cd ../../../
  180. controller_app_name=(
  181. controller_changan_shenlan
  182. )
  183. for x in ${controller_app_name[@]}
  184. do
  185. cd src/controller/${x}/
  186. $qtmake ${x}.pro
  187. make $MAKEOPT
  188. build_result=$?
  189. check_result $build_result
  190. store_result
  191. make clean
  192. cp ${x} ./../../../bin/
  193. rm Makefile
  194. rm .qmake.stash
  195. rm ${x}
  196. cd ../../../
  197. done
  198. decition_app_name=(
  199. decition_brain_sf_changan_shenlan
  200. #decition_brain_ge3
  201. #decition_brain_qingyuan
  202. #decition_brain_vv7
  203. )
  204. for x in ${decition_app_name[@]}
  205. do
  206. cd src/decition/${x}/
  207. $qtmake ${x}.pro
  208. make $MAKEOPT
  209. build_result=$?
  210. check_result $build_result
  211. store_result
  212. make clean
  213. cp ${x} ./../../../bin/
  214. rm Makefile
  215. rm .qmake.stash
  216. rm ${x}
  217. cd ../../../
  218. done
  219. driver_app_name=(
  220. driver_lidar_rs16
  221. driver_gps_hcp2
  222. driver_can_nvidia_agx
  223. driver_map_trace
  224. driver_map_xodrload
  225. # driver_rpc_server
  226. # driver_cloud_grpc_client
  227. # driver_grpc_server
  228. # driver_rpc_server
  229. # driver_group_grpc_client
  230. )
  231. for x in ${driver_app_name[@]}
  232. do
  233. cd src/driver/${x}/
  234. $qtmake ${x}.pro
  235. make $MAKEOPT
  236. build_result=$?
  237. check_result $build_result
  238. store_result
  239. make clean
  240. cp ${x} ./../../../bin/
  241. rm Makefile
  242. rm .qmake.stash
  243. rm ${x}
  244. cd ../../../
  245. done
  246. detect_app_name=(
  247. # detection_lidar_PointPillars_MultiHead
  248. detection_radar_delphi_esr
  249. detection_chassis
  250. )
  251. for x in ${detect_app_name[@]}
  252. do
  253. cd src/detection/${x}/
  254. $qtmake ${x}.pro
  255. make $MAKEOPT
  256. build_result=$?
  257. check_result $build_result
  258. store_result
  259. make clean
  260. cp ${x} ./../../../bin/
  261. rm Makefile
  262. rm .qmake.stash
  263. rm ${x}
  264. cd ../../../
  265. done
  266. fution_app_name=(
  267. # lidar_radar_fusion_cnn
  268. )
  269. for x in ${fution_app_name[@]}
  270. do
  271. cd src/fusion/${x}/
  272. $qtmake ${x}.pro
  273. make $MAKEOPT
  274. build_result=$?
  275. check_result $build_result
  276. store_result
  277. make clean
  278. cp ${x} ./../../../bin/
  279. rm Makefile
  280. rm .qmake.stash
  281. rm ${x}
  282. cd ../../../
  283. done
  284. tool_app_name=(
  285. view_pointcloud
  286. view_gps
  287. # view_rawcan
  288. view_radar
  289. IVSysMan
  290. ivmapmake
  291. view_ivlog
  292. # tool_querymsg
  293. tool_xodrobj
  294. ivlog_record
  295. adciv_record
  296. tool_configivsysman
  297. )
  298. for x in ${tool_app_name[@]}
  299. do
  300. cd src/tool/${x}/
  301. $qtmake ${x}.pro
  302. make $MAKEOPT
  303. build_result=$?
  304. check_result $build_result
  305. store_result
  306. make clean
  307. cp ${x} ./../../../bin/
  308. rm Makefile
  309. rm .qmake.stash
  310. rm ${x}
  311. cd ../../../
  312. done
  313. ui_app_name=(
  314. ui_ads_hmi
  315. )
  316. for x in ${ui_app_name[@]}
  317. do
  318. cd src/ui/${x}/
  319. $qtmake ${x}.pro
  320. make $MAKEOPT
  321. build_result=$?
  322. check_result $build_result
  323. store_result
  324. make clean
  325. cp ${x} ./../../../bin/
  326. rm Makefile
  327. rm .qmake.stash
  328. rm ${x}
  329. cd ../../../
  330. done
  331. show_result