autogen.sh 5.6 KB

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