autogen.sh 3.9 KB

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