autogen.sh 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  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. MAKEOPT=-j8
  24. mkdir bin
  25. cd src/include/proto
  26. sh ./protomake.sh
  27. cd ../../../
  28. cd src/common/modulecomm/
  29. $qtmake modulecomm.pro
  30. check_result $?
  31. make $MAKEOPT
  32. check_result $?
  33. make clean
  34. cp libmodulecomm.so ./../../../bin/
  35. rm Makefile
  36. rm .qmake.stash
  37. cd ../../../
  38. cd src/common/xmlparam/
  39. $qtmake xmlparam.pro
  40. make $MAKEOPT
  41. check_result $?
  42. make clean
  43. cp libxmlparam.so ./../../../bin/
  44. rm Makefile
  45. rm .qmake.stash
  46. cd ../../../
  47. cd src/common/ndt_cpu/
  48. $qtmake ndt_cpu.pro
  49. make $MAKEOPT
  50. check_result $?
  51. make clean
  52. cp libndt_cpu.so ./../../../bin/
  53. rm Makefile
  54. rm .qmake.stash
  55. cd ../../../
  56. cd src/common/ivlog/
  57. $qtmake ivlog.pro
  58. make $MAKEOPT
  59. check_result $?
  60. make clean
  61. cp libivlog.so ./../../../bin/
  62. rm Makefile
  63. rm .qmake.stash
  64. cd ../../../
  65. cd src/common/ivfault/
  66. $qtmake ivfault.pro
  67. make $MAKEOPT
  68. check_result $?
  69. make clean
  70. cp libivfault.so ./../../../bin/
  71. rm Makefile
  72. rm .qmake.stash
  73. cd ../../../
  74. cd src/common/platformif/
  75. $qtmake platformif.pro
  76. make $MAKEOPT
  77. check_result $?
  78. make clean
  79. cp libplatformif.so ./../../../bin/
  80. rm Makefile
  81. rm .qmake.stash
  82. cd ../../../
  83. cd src/common/ivexit/
  84. $qtmake ivexit.pro
  85. make $MAKEOPT
  86. check_result $?
  87. make clean
  88. cp libivexit.so ./../../../bin/
  89. rm Makefile
  90. rm .qmake.stash
  91. cd ../../../
  92. cd src/common/ivbacktrace/
  93. $qtmake ivbacktrace.pro
  94. make $MAKEOPT
  95. check_result $?
  96. make clean
  97. cp libivbacktrace.so ./../../../bin/
  98. rm Makefile
  99. rm .qmake.stash
  100. cd ../../../
  101. controller_app_name=(
  102. controller_ge3
  103. controller_vv7
  104. controller_midcar
  105. )
  106. for x in ${controller_app_name[@]}
  107. do
  108. cd src/controller/${x}/
  109. $qtmake ${x}.pro
  110. make $MAKEOPT
  111. check_result $?
  112. make clean
  113. cp ${x} ./../../../bin/
  114. rm Makefile
  115. rm .qmake.stash
  116. rm ${x}
  117. cd ../../../
  118. done
  119. decition_app_name=(
  120. decition_brain
  121. #decition_brain_ge3
  122. #decition_brain_qingyuan
  123. #decition_brain_vv7
  124. )
  125. for x in ${decition_app_name[@]}
  126. do
  127. cd src/decition/${x}/
  128. $qtmake ${x}.pro
  129. make $MAKEOPT
  130. check_result $?
  131. make clean
  132. cp ${x} ./../../../bin/
  133. rm Makefile
  134. rm .qmake.stash
  135. rm ${x}
  136. cd ../../../
  137. done
  138. driver_app_name=(
  139. driver_lidar_rs16
  140. # driver_lidar_vlp16
  141. driver_gps_hcp2
  142. #driver_gps_ins550d
  143. driver_can_nvidia_agx
  144. # driver_can_kvaser
  145. # driver_can_vci
  146. driver_map_trace
  147. driver_map_xodrload
  148. driver_radio_p900
  149. )
  150. for x in ${driver_app_name[@]}
  151. do
  152. cd src/driver/${x}/
  153. $qtmake ${x}.pro
  154. make $MAKEOPT
  155. check_result $?
  156. make clean
  157. cp ${x} ./../../../bin/
  158. rm Makefile
  159. rm .qmake.stash
  160. rm ${x}
  161. cd ../../../
  162. done
  163. detect_app_name=(
  164. #detection_radar_conti_sr308
  165. detection_radar_delphi_esr
  166. detection_chassis
  167. detection_lidar_grid
  168. )
  169. for x in ${detect_app_name[@]}
  170. do
  171. cd src/detection/${x}/
  172. $qtmake ${x}.pro
  173. make $MAKEOPT
  174. check_result $?
  175. make clean
  176. cp ${x} ./../../../bin/
  177. rm Makefile
  178. rm .qmake.stash
  179. rm ${x}
  180. cd ../../../
  181. done
  182. tool_app_name=(
  183. #view_pointcloud
  184. view_gps
  185. view_rawcan
  186. view_radar
  187. IVSysMan
  188. ivmapmake
  189. view_ivlog
  190. tool_querymsg
  191. tool_xodrobj
  192. ivlog_record
  193. adciv_record
  194. )
  195. for x in ${tool_app_name[@]}
  196. do
  197. cd src/tool/${x}/
  198. $qtmake ${x}.pro
  199. make $MAKEOPT
  200. check_result $?
  201. make clean
  202. cp ${x} ./../../../bin/
  203. rm Makefile
  204. rm .qmake.stash
  205. rm ${x}
  206. cd ../../../
  207. done
  208. ui_app_name=(
  209. ui_ads_hmi
  210. )
  211. for x in ${ui_app_name[@]}
  212. do
  213. cd src/ui/${x}/
  214. $qtmake ${x}.pro
  215. make $MAKEOPT
  216. check_result $?
  217. make clean
  218. cp ${x} ./../../../bin/
  219. rm Makefile
  220. rm .qmake.stash
  221. rm ${x}
  222. cd ../../../
  223. done