autogen.sh 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  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_hapo
  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
  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_radar_continental_ARS408_SRR308
  227. # driver_cloud_grpc_client
  228. # driver_grpc_server
  229. # driver_rpc_server
  230. # driver_group_grpc_client
  231. )
  232. for x in ${driver_app_name[@]}
  233. do
  234. cd src/driver/${x}/
  235. $qtmake ${x}.pro
  236. make $MAKEOPT
  237. build_result=$?
  238. check_result $build_result
  239. store_result
  240. make clean
  241. cp ${x} ./../../../bin/
  242. rm Makefile
  243. rm .qmake.stash
  244. rm ${x}
  245. cd ../../../
  246. done
  247. detect_app_name=(
  248. # detection_lidar_PointPillars_MultiHead
  249. # detection_radar_delphi_esr
  250. # detection_chassis
  251. )
  252. for x in ${detect_app_name[@]}
  253. do
  254. cd src/detection/${x}/
  255. $qtmake ${x}.pro
  256. make $MAKEOPT
  257. build_result=$?
  258. check_result $build_result
  259. store_result
  260. make clean
  261. cp ${x} ./../../../bin/
  262. rm Makefile
  263. rm .qmake.stash
  264. rm ${x}
  265. cd ../../../
  266. done
  267. fution_app_name=(
  268. lidar_radar_fusion_cnn
  269. fusion_pointcloud_bus
  270. )
  271. for x in ${fution_app_name[@]}
  272. do
  273. cd src/fusion/${x}/
  274. $qtmake ${x}.pro
  275. make $MAKEOPT
  276. build_result=$?
  277. check_result $build_result
  278. store_result
  279. make clean
  280. cp ${x} ./../../../bin/
  281. rm Makefile
  282. rm .qmake.stash
  283. rm ${x}
  284. cd ../../../
  285. done
  286. tool_app_name=(
  287. pointcloudviewer
  288. view_gps
  289. # view_rawcan
  290. view_radar
  291. IVSysMan
  292. ivmapmake
  293. view_ivlog
  294. # tool_querymsg
  295. tool_xodrobj
  296. ivlog_record
  297. adciv_record
  298. tool_configivsysman
  299. )
  300. for x in ${tool_app_name[@]}
  301. do
  302. cd src/tool/${x}/
  303. $qtmake ${x}.pro
  304. make $MAKEOPT
  305. build_result=$?
  306. check_result $build_result
  307. store_result
  308. make clean
  309. cp ${x} ./../../../bin/
  310. rm Makefile
  311. rm .qmake.stash
  312. rm ${x}
  313. cd ../../../
  314. done
  315. ui_app_name=(
  316. ui_ads_hmi
  317. )
  318. for x in ${ui_app_name[@]}
  319. do
  320. cd src/ui/${x}/
  321. $qtmake ${x}.pro
  322. make $MAKEOPT
  323. build_result=$?
  324. check_result $build_result
  325. store_result
  326. make clean
  327. cp ${x} ./../../../bin/
  328. rm Makefile
  329. rm .qmake.stash
  330. rm ${x}
  331. cd ../../../
  332. done
  333. show_result