createmaketool.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. qtmake=" "
  2. if [ ${#qtmake} -lt 5 ]; then
  3. optfiles=`find /usr/lib/x86_64-linux-gnu -name 'qmake'`
  4. for entry in $optfiles
  5. do
  6. x=${entry:0-14:14}
  7. if [ "$x" == "/qt5/bin/qmake" ]; then
  8. qtmake="$entry"
  9. echo " -----find qmake"
  10. echo "$qtmake"
  11. fi
  12. done
  13. fi
  14. if [ ${#qtmake} -lt 5 ]; then
  15. echo "maybe agx,find qmake in usr folder "
  16. optfiles=`find /usr/lib/aarch64-linux-gnu -name 'qmake'`
  17. for entry in $optfiles
  18. do
  19. x=${entry:0-14:14}
  20. if [ "$x" == "/qt5/bin/qmake" ]; then
  21. qtmake="$entry"
  22. echo " -----find qmake"
  23. echo "$qtmake"
  24. fi
  25. done
  26. fi
  27. if [ ${#qtmake} -lt 5 ]; then
  28. echo "find in /usr folder "
  29. optfiles=`find /usr -name 'qmake'`
  30. for entry in $optfiles
  31. do
  32. x=${entry:0-14:14}
  33. if [ "$x" == "/qt5/bin/qmake" ]; then
  34. qtmake="$entry"
  35. echo " -----find qmake"
  36. echo "$qtmake"
  37. fi
  38. done
  39. fi
  40. if [ ${#qtmake} -lt 5 ]; then
  41. echo "find in /opt folder "
  42. optfiles=`find /opt -name 'qmake'`
  43. for entry in $optfiles
  44. do
  45. x=${entry:0-17:17}
  46. if [ "$x" == "/gcc_64/bin/qmake" ]; then
  47. qtmake="$entry"
  48. echo " -----find qmake"
  49. echo "$qtmake"
  50. fi
  51. done
  52. fi
  53. if [ ${#qtmake} -lt 5 ]; then
  54. echo "fail to find qmake.No qmake in /usr or /opt directory. You can munual set qmake."
  55. else
  56. echo "---qmake---:""$qtmake"
  57. fi
  58. cpu_num=`cat /proc/stat | grep cpu[0-9] -c`
  59. cd src/tool/adciv_maketool
  60. $qtmake adciv_maketool.pro
  61. make -j${cpu_num}
  62. make clean
  63. cp adciv_maketool ./../../../
  64. rm Makefile
  65. rm .qmake.stash
  66. cd ../../../