autogen.sh 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. #qtmake="/opt/Qt5.10.1/5.10.1/gcc_64/bin/qmake"
  2. #qtmake=/usr/bin/qmake
  3. qtmake="/usr/lib/aarch64-linux-gnu/qt5/bin/qmake"
  4. if [ ! $qtmake ];then
  5. echo -e "\e[33m qtmake not set, auto find it\e[0m"
  6. qtmake=`find /opt -name "qmake" 2>/dev/null | grep 'gcc_64'`
  7. fi
  8. if [ ! $qtmake ];then
  9. echo -e "\e[33m can't find qmake \e[0m"
  10. exit 1
  11. fi
  12. echo -e "\e[33m qtmake: $qtmake \e[0m"
  13. show_error=$1
  14. check_result()
  15. {
  16. if [ "$1" != 0 -a "$show_error" == "s" ];then
  17. echo -e "\e[33m*************************************************\e[0m"
  18. echo -e "\e[31m Please modify build error first,Exit!\e[0m"
  19. echo -e "\e[33m*************************************************\e[0m"
  20. exit 1
  21. fi
  22. }
  23. function checkOS_TYPE(){
  24. if [[ ! -z "`uname | grep Darwin`" ]];then
  25. OS_TYPE=osx
  26. install_path=/Applications
  27. elif [[ ! -z "`uname | grep Linux`" ]];then
  28. OS_TYPE=linux
  29. install_path=/usr/lib
  30. else
  31. echo "Unsupported operating systems!"
  32. exit 1
  33. fi
  34. echo "The current operating system is"
  35. echo $OS_TYPE
  36. }
  37. function checkos(){
  38. if [[ -f /etc/redhat-release ]];then
  39. OS=Centos
  40. elif [[ ! -z "`cat /etc/issue | grep bian`" ]];then
  41. OS=Debian
  42. elif [[ ! -z "`cat /etc/issue | grep Ubuntu`" ]];then
  43. OS=Ubuntu
  44. else
  45. echo "Unknow!!!"
  46. fi
  47. echo $OS
  48. }
  49. checkOS_TYPE
  50. checkos
  51. MAKEOPT=-j8
  52. mkdir bin
  53. cd src/include/proto
  54. sh ./protomake.sh
  55. cd ../../../
  56. cd src/common/modulecomm/
  57. $qtmake modulecomm.pro
  58. check_result $?
  59. make $MAKEOPT
  60. check_result $?
  61. make clean
  62. cp libmodulecomm.so ./../../../bin/
  63. rm Makefile
  64. rm .qmake.stash
  65. cd ../../../
  66. cd src/common/xmlparam/
  67. $qtmake xmlparam.pro
  68. make $MAKEOPT
  69. check_result $?
  70. make clean
  71. cp libxmlparam.so ./../../../bin/
  72. rm Makefile
  73. rm .qmake.stash
  74. cd ../../../
  75. cd src/common/ndt_cpu/
  76. $qtmake ndt_cpu.pro
  77. make $MAKEOPT
  78. check_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. check_result $?
  88. make clean
  89. cp libivlog.so ./../../../bin/
  90. rm Makefile
  91. rm .qmake.stash
  92. cd ../../../
  93. cd src/common/ivfault/
  94. $qtmake ivfault.pro
  95. make $MAKEOPT
  96. check_result $?
  97. make clean
  98. cp libivfault.so ./../../../bin/
  99. rm Makefile
  100. rm .qmake.stash
  101. cd ../../../
  102. cd src/common/platformif/
  103. $qtmake platformif.pro
  104. make $MAKEOPT
  105. check_result $?
  106. make clean
  107. cp libplatformif.so ./../../../bin/
  108. rm Makefile
  109. rm .qmake.stash
  110. cd ../../../
  111. cd src/common/ivexit/
  112. $qtmake ivexit.pro
  113. make $MAKEOPT
  114. check_result $?
  115. make clean
  116. cp libivexit.so ./../../../bin/
  117. rm Makefile
  118. rm .qmake.stash
  119. cd ../../../
  120. cd src/common/ivbacktrace/
  121. $qtmake ivbacktrace.pro
  122. make $MAKEOPT
  123. check_result $?
  124. make clean
  125. cp libivbacktrace.so ./../../../bin/
  126. rm Makefile
  127. rm .qmake.stash
  128. cd ../../../
  129. controller_app_name=(
  130. controller_ge3
  131. controller_vv7
  132. controller_midcar
  133. )
  134. for x in ${controller_app_name[@]}
  135. do
  136. cd src/controller/${x}/
  137. $qtmake ${x}.pro
  138. make $MAKEOPT
  139. check_result $?
  140. make clean
  141. cp ${x} ./../../../bin/
  142. rm Makefile
  143. rm .qmake.stash
  144. rm ${x}
  145. cd ../../../
  146. done
  147. decition_app_name=(
  148. decition_brain
  149. #decition_brain_ge3
  150. #decition_brain_qingyuan
  151. #decition_brain_vv7
  152. )
  153. for x in ${decition_app_name[@]}
  154. do
  155. cd src/decition/${x}/
  156. $qtmake ${x}.pro
  157. make $MAKEOPT
  158. check_result $?
  159. make clean
  160. cp ${x} ./../../../bin/
  161. rm Makefile
  162. rm .qmake.stash
  163. rm ${x}
  164. cd ../../../
  165. done
  166. driver_app_name=(
  167. driver_lidar_rs16
  168. # driver_lidar_vlp16
  169. driver_gps_hcp2
  170. #driver_gps_ins550d
  171. driver_can_nvidia_agx
  172. # driver_can_kvaser
  173. # driver_can_vci
  174. driver_map_trace
  175. driver_map_xodrload
  176. driver_radio_p900
  177. )
  178. for x in ${driver_app_name[@]}
  179. do
  180. cd src/driver/${x}/
  181. $qtmake ${x}.pro
  182. make $MAKEOPT
  183. check_result $?
  184. make clean
  185. cp ${x} ./../../../bin/
  186. rm Makefile
  187. rm .qmake.stash
  188. rm ${x}
  189. cd ../../../
  190. done
  191. detect_app_name=(
  192. #detection_radar_conti_sr308
  193. detection_radar_delphi_esr
  194. detection_chassis
  195. detection_lidar_grid
  196. )
  197. for x in ${detect_app_name[@]}
  198. do
  199. cd src/detection/${x}/
  200. $qtmake ${x}.pro
  201. make $MAKEOPT
  202. check_result $?
  203. make clean
  204. cp ${x} ./../../../bin/
  205. rm Makefile
  206. rm .qmake.stash
  207. rm ${x}
  208. cd ../../../
  209. done
  210. tool_app_name=(
  211. view_pointcloud
  212. view_gps
  213. view_rawcan
  214. view_radar
  215. IVSysMan
  216. ivmapmake
  217. view_ivlog
  218. tool_querymsg
  219. tool_xodrobj
  220. ivlog_record
  221. adciv_record
  222. )
  223. for x in ${tool_app_name[@]}
  224. do
  225. cd src/tool/${x}/
  226. $qtmake ${x}.pro
  227. make $MAKEOPT
  228. check_result $?
  229. make clean
  230. cp ${x} ./../../../bin/
  231. rm Makefile
  232. rm .qmake.stash
  233. rm ${x}
  234. cd ../../../
  235. done
  236. ui_app_name=(
  237. ui_ads_hmi
  238. )
  239. for x in ${ui_app_name[@]}
  240. do
  241. cd src/ui/${x}/
  242. $qtmake ${x}.pro
  243. make $MAKEOPT
  244. check_result $?
  245. make clean
  246. cp ${x} ./../../../bin/
  247. rm Makefile
  248. rm .qmake.stash
  249. rm ${x}
  250. cd ../../../
  251. done