autogen.sh 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  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/ivchart/
  64. $qtmakei ivchart.pro
  65. make $MAKEOPT
  66. check_result $?
  67. make clean
  68. cp libivchart.so ./../../../bin/
  69. rm Makefile
  70. rm .qmake.stash
  71. cd ../../../
  72. cd src/common/ivlog/
  73. $qtmake ivlog.pro
  74. make $MAKEOPT
  75. check_result $?
  76. make clean
  77. cp libivlog.so ./../../../bin/
  78. rm Makefile
  79. rm .qmake.stash
  80. cd ../../../
  81. cd src/common/ivfault/
  82. $qtmake ivfault.pro
  83. make $MAKEOPT
  84. check_result $?
  85. make clean
  86. cp libivfault.so ./../../../bin/
  87. rm Makefile
  88. rm .qmake.stash
  89. cd ../../../
  90. cd src/common/platformif/
  91. $qtmake platformif.pro
  92. make $MAKEOPT
  93. check_result $?
  94. make clean
  95. cp libplatformif.so ./../../../bin/
  96. rm Makefile
  97. rm .qmake.stash
  98. cd ../../../
  99. cd src/common/ivexit/
  100. $qtmake ivexit.pro
  101. make $MAKEOPT
  102. check_result $?
  103. make clean
  104. cp libivexit.so ./../../../bin/
  105. rm Makefile
  106. rm .qmake.stash
  107. cd ../../../
  108. cd src/common/ivbacktrace/
  109. $qtmake ivbacktrace.pro
  110. make $MAKEOPT
  111. check_result $?
  112. make clean
  113. cp libivbacktrace.so ./../../../bin/
  114. rm Makefile
  115. rm .qmake.stash
  116. cd ../../../
  117. controller_app_name=(
  118. controller_hunter
  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_sf_1x
  135. )
  136. for x in ${decition_app_name[@]}
  137. do
  138. cd src/decition/${x}/
  139. $qtmake ${x}.pro
  140. make $MAKEOPT
  141. check_result $?
  142. make clean
  143. cp ${x} ./../../../bin/
  144. rm Makefile
  145. rm .qmake.stash
  146. rm ${x}
  147. cd ../../../
  148. done
  149. driver_app_name=(
  150. driver_lidar_leishen16
  151. driver_gps_ins550d
  152. driver_can_vci
  153. driver_map_xodrload
  154. )
  155. for x in ${driver_app_name[@]}
  156. do
  157. cd src/driver/${x}/
  158. $qtmake ${x}.pro
  159. make $MAKEOPT
  160. check_result $?
  161. make clean
  162. cp ${x} ./../../../bin/
  163. rm Makefile
  164. rm .qmake.stash
  165. rm ${x}
  166. cd ../../../
  167. done
  168. detect_app_name=(
  169. detection_chassis
  170. detection_lidar_grid
  171. )
  172. for x in ${detect_app_name[@]}
  173. do
  174. cd src/detection/${x}/
  175. $qtmake ${x}.pro
  176. make $MAKEOPT
  177. check_result $?
  178. make clean
  179. cp ${x} ./../../../bin/
  180. rm Makefile
  181. rm .qmake.stash
  182. rm ${x}
  183. cd ../../../
  184. done
  185. tool_app_name=(
  186. view_pointcloud
  187. view_gps
  188. IVSysMan
  189. view_ivlog
  190. tool_xodrobj
  191. ivlog_record
  192. adciv_record
  193. )
  194. for x in ${tool_app_name[@]}
  195. do
  196. cd src/tool/${x}/
  197. $qtmake ${x}.pro
  198. make $MAKEOPT
  199. check_result $?
  200. make clean
  201. cp ${x} ./../../../bin/
  202. rm Makefile
  203. rm .qmake.stash
  204. rm ${x}
  205. cd ../../../
  206. done
  207. ui_app_name=(
  208. ui_ads_hmi_1px
  209. )
  210. for x in ${ui_app_name[@]}
  211. do
  212. cd src/ui/${x}/
  213. $qtmake ${x}.pro
  214. make $MAKEOPT
  215. check_result $?
  216. make clean
  217. cp ${x} ./../../../bin/
  218. rm Makefile
  219. rm .qmake.stash
  220. rm ${x}
  221. cd ../../../
  222. done