autogen.sh 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  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/ivchart/
  85. $qtmake ivchart.pro
  86. make $MAKEOPT
  87. check_result $?
  88. make clean
  89. cp libivchart.so ./../../../bin/
  90. rm Makefile
  91. rm .qmake.stash
  92. cd ../../../
  93. cd src/common/ivlog/
  94. $qtmake ivlog.pro
  95. make $MAKEOPT
  96. build_result=$?
  97. check_result $build_result
  98. store_result
  99. make clean
  100. cp libivlog.so ./../../../bin/
  101. rm Makefile
  102. rm .qmake.stash
  103. cd ../../../
  104. cd src/common/ivfault/
  105. $qtmake ivfault.pro
  106. make $MAKEOPT
  107. build_result=$?
  108. check_result $build_result
  109. store_result
  110. make clean
  111. cp libivfault.so ./../../../bin/
  112. rm Makefile
  113. rm .qmake.stash
  114. cd ../../../
  115. cd src/common/platformif/
  116. $qtmake platformif.pro
  117. make $MAKEOPT
  118. build_result=$?
  119. check_result $build_result
  120. store_result
  121. make clean
  122. cp libplatformif.so ./../../../bin/
  123. rm Makefile
  124. rm .qmake.stash
  125. cd ../../../
  126. cd src/common/ivexit/
  127. $qtmake ivexit.pro
  128. make $MAKEOPT
  129. build_result=$?
  130. check_result $build_result
  131. store_result
  132. make clean
  133. cp libivexit.so ./../../../bin/
  134. rm Makefile
  135. rm .qmake.stash
  136. cd ../../../
  137. cd src/common/ivbacktrace/
  138. $qtmake ivbacktrace.pro
  139. make $MAKEOPT
  140. build_result=$?
  141. check_result $build_result
  142. store_result
  143. make clean
  144. cp libivbacktrace.so ./../../../bin/
  145. rm Makefile
  146. rm .qmake.stash
  147. cd ../../../
  148. cd src/common/ivchart/
  149. $qtmake ivchart.pro
  150. make $MAKEOPT
  151. build_result=$?
  152. check_result $build_result
  153. store_result
  154. make clean
  155. cp libivchart.so ./../../../bin/
  156. rm Makefile
  157. rm .qmake.stash
  158. cd ../../../
  159. controller_app_name=(
  160. controller_hunter
  161. )
  162. for x in ${controller_app_name[@]}
  163. do
  164. cd src/controller/${x}/
  165. $qtmake ${x}.pro
  166. make $MAKEOPT
  167. build_result=$?
  168. check_result $build_result
  169. store_result
  170. make clean
  171. cp ${x} ./../../../bin/
  172. rm Makefile
  173. rm .qmake.stash
  174. rm ${x}
  175. cd ../../../
  176. done
  177. decition_app_name=(
  178. decition_brain_sf_1x
  179. )
  180. for x in ${decition_app_name[@]}
  181. do
  182. cd src/decition/${x}/
  183. $qtmake ${x}.pro
  184. make $MAKEOPT
  185. build_result=$?
  186. check_result $build_result
  187. store_result
  188. make clean
  189. cp ${x} ./../../../bin/
  190. rm Makefile
  191. rm .qmake.stash
  192. rm ${x}
  193. cd ../../../
  194. done
  195. driver_app_name=(
  196. driver_lidar_leishen16
  197. driver_gps_ins550d
  198. driver_can_vci
  199. driver_map_xodrload
  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_chassis
  218. detection_lidar_grid
  219. )
  220. for x in ${detect_app_name[@]}
  221. do
  222. cd src/detection/${x}/
  223. $qtmake ${x}.pro
  224. make $MAKEOPT
  225. build_result=$?
  226. check_result $build_result
  227. store_result
  228. make clean
  229. cp ${x} ./../../../bin/
  230. rm Makefile
  231. rm .qmake.stash
  232. rm ${x}
  233. cd ../../../
  234. done
  235. fution_app_name=(
  236. # lidar_radar_fusion_cnn
  237. )
  238. for x in ${fution_app_name[@]}
  239. do
  240. cd src/fusion/${x}/
  241. $qtmake ${x}.pro
  242. make $MAKEOPT
  243. build_result=$?
  244. check_result $build_result
  245. store_result
  246. make clean
  247. cp ${x} ./../../../bin/
  248. rm Makefile
  249. rm .qmake.stash
  250. rm ${x}
  251. cd ../../../
  252. done
  253. tool_app_name=(
  254. view_pointcloud
  255. view_gps
  256. IVSysMan
  257. view_ivlog
  258. tool_xodrobj
  259. ivlog_record
  260. adciv_record
  261. )
  262. for x in ${tool_app_name[@]}
  263. do
  264. cd src/tool/${x}/
  265. $qtmake ${x}.pro
  266. make $MAKEOPT
  267. build_result=$?
  268. check_result $build_result
  269. store_result
  270. make clean
  271. cp ${x} ./../../../bin/
  272. rm Makefile
  273. rm .qmake.stash
  274. rm ${x}
  275. cd ../../../
  276. done
  277. ui_app_name=(
  278. ui_ads_hmi_1px
  279. )
  280. for x in ${ui_app_name[@]}
  281. do
  282. cd src/ui/${x}/
  283. $qtmake ${x}.pro
  284. make $MAKEOPT
  285. build_result=$?
  286. check_result $build_result
  287. store_result
  288. make clean
  289. cp ${x} ./../../../bin/
  290. rm Makefile
  291. rm .qmake.stash
  292. rm ${x}
  293. cd ../../../
  294. done
  295. show_result