autogen.sh 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  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. controller_app_name=(
  159. controller_hapo
  160. )
  161. for x in ${controller_app_name[@]}
  162. do
  163. cd src/controller/${x}/
  164. $qtmake ${x}.pro
  165. make $MAKEOPT
  166. build_result=$?
  167. check_result $build_result
  168. store_result
  169. make clean
  170. cp ${x} ./../../../bin/
  171. rm Makefile
  172. rm .qmake.stash
  173. rm ${x}
  174. cd ../../../
  175. done
  176. decition_app_name=(
  177. # decition_brain_sf
  178. #decition_brain_ge3
  179. #decition_brain_qingyuan
  180. #decition_brain_vv7
  181. )
  182. for x in ${decition_app_name[@]}
  183. do
  184. cd src/decition/${x}/
  185. $qtmake ${x}.pro
  186. make $MAKEOPT
  187. build_result=$?
  188. check_result $build_result
  189. store_result
  190. make clean
  191. cp ${x} ./../../../bin/
  192. rm Makefile
  193. rm .qmake.stash
  194. rm ${x}
  195. cd ../../../
  196. done
  197. driver_app_name=(
  198. driver_lidar_rs16
  199. driver_gps_hcp2
  200. driver_can_nvidia_agx
  201. driver_map_trace
  202. driver_map_xodrload
  203. driver_rpc_server
  204. driver_cloud_grpc_client
  205. driver_grpc_server
  206. driver_rpc_server
  207. driver_group_grpc_client
  208. )
  209. for x in ${driver_app_name[@]}
  210. do
  211. cd src/driver/${x}/
  212. $qtmake ${x}.pro
  213. make $MAKEOPT
  214. build_result=$?
  215. check_result $build_result
  216. store_result
  217. make clean
  218. cp ${x} ./../../../bin/
  219. rm Makefile
  220. rm .qmake.stash
  221. rm ${x}
  222. cd ../../../
  223. done
  224. detect_app_name=(
  225. detection_lidar_PointPillars_MultiHead
  226. detection_radar_delphi_esr
  227. detection_chassis
  228. )
  229. for x in ${detect_app_name[@]}
  230. do
  231. cd src/detection/${x}/
  232. $qtmake ${x}.pro
  233. make $MAKEOPT
  234. build_result=$?
  235. check_result $build_result
  236. store_result
  237. make clean
  238. cp ${x} ./../../../bin/
  239. rm Makefile
  240. rm .qmake.stash
  241. rm ${x}
  242. cd ../../../
  243. done
  244. fution_app_name=(
  245. # lidar_radar_fusion_cnn
  246. )
  247. for x in ${fution_app_name[@]}
  248. do
  249. cd src/fusion/${x}/
  250. $qtmake ${x}.pro
  251. make $MAKEOPT
  252. build_result=$?
  253. check_result $build_result
  254. store_result
  255. make clean
  256. cp ${x} ./../../../bin/
  257. rm Makefile
  258. rm .qmake.stash
  259. rm ${x}
  260. cd ../../../
  261. done
  262. tool_app_name=(
  263. view_pointcloud
  264. view_gps
  265. view_rawcan
  266. view_radar
  267. IVSysMan
  268. ivmapmake
  269. view_ivlog
  270. tool_querymsg
  271. tool_xodrobj
  272. ivlog_record
  273. adciv_record
  274. )
  275. for x in ${tool_app_name[@]}
  276. do
  277. cd src/tool/${x}/
  278. $qtmake ${x}.pro
  279. make $MAKEOPT
  280. build_result=$?
  281. check_result $build_result
  282. store_result
  283. make clean
  284. cp ${x} ./../../../bin/
  285. rm Makefile
  286. rm .qmake.stash
  287. rm ${x}
  288. cd ../../../
  289. done
  290. ui_app_name=(
  291. ui_ads_hmi
  292. )
  293. for x in ${ui_app_name[@]}
  294. do
  295. cd src/ui/${x}/
  296. $qtmake ${x}.pro
  297. make $MAKEOPT
  298. build_result=$?
  299. check_result $build_result
  300. store_result
  301. make clean
  302. cp ${x} ./../../../bin/
  303. rm Makefile
  304. rm .qmake.stash
  305. rm ${x}
  306. cd ../../../
  307. done
  308. show_result