autogen_lib.sh 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. #qtmake="/usr/lib/qt5/bin/qmake"
  2. qtmake=" "
  3. if [ ${#qtmake} -lt 5 ]; then
  4. echo "now need find qmake "
  5. optfiles=`find /opt -name 'qmake'`
  6. for entry in $optfiles
  7. do
  8. x=${entry:0-17:17}
  9. if [ "$x" == "/gcc_64/bin/qmake" ]; then
  10. qtmake="$entry"
  11. echo " -----find qmake"
  12. echo "$qtmake"
  13. fi
  14. done
  15. fi
  16. if [ ${#qtmake} -lt 5 ]; then
  17. echo "maybe agx,find qmake in usr folder "
  18. optfiles=`find /usr -name 'qmake'`
  19. for entry in $optfiles
  20. do
  21. x=${entry:0-14:14}
  22. if [ "$x" == "/qt5/bin/qmake" ]; then
  23. qtmake="$entry"
  24. echo " -----find qmake"
  25. echo "$qtmake"
  26. fi
  27. done
  28. fi
  29. echo -e "\e[33m qtmake: $qtmake \e[0m"
  30. MAKEOPT=-j8
  31. mkdir bin
  32. cd src/include/proto
  33. ./protomake.sh
  34. cd ../../../
  35. cd src/common/modulecomm/
  36. $qtmake modulecomm.pro
  37. make $MAKEOPT
  38. make clean
  39. cp libmodulecomm.so ./../../../bin/
  40. rm Makefile
  41. rm .qmake.stash
  42. cd ../../../
  43. cp thirdpartylib/FastRTPS/lib/libamd64/* bin/
  44. cp thirdpartylib/FastRTPS/lib/libarm64/* bin/
  45. cd src/common/xmlparam/
  46. $qtmake xmlparam.pro
  47. make $MAKEOPT
  48. make clean
  49. cp libxmlparam.so ./../../../bin/
  50. rm Makefile
  51. rm .qmake.stash
  52. cd ../../../
  53. cd src/common/ivlog/
  54. $qtmake ivlog.pro
  55. make $MAKEOPT
  56. make clean
  57. cp libivlog.so ./../../../bin/
  58. rm Makefile
  59. rm .qmake.stash
  60. cd ../../../
  61. cd src/common/ivfault/
  62. $qtmake ivfault.pro
  63. make $MAKEOPT
  64. make clean
  65. cp libivfault.so ./../../../bin/
  66. rm Makefile
  67. rm .qmake.stash
  68. cd ../../../
  69. cd src/common/platformif/
  70. $qtmake platformif.pro
  71. make $MAKEOPT
  72. make clean
  73. cp libplatformif.so ./../../../bin/
  74. rm Makefile
  75. rm .qmake.stash
  76. cd ../../../
  77. cd src/common/ivexit/
  78. $qtmake ivexit.pro
  79. make $MAKEOPT
  80. make clean
  81. cp libivexit.so ./../../../bin/
  82. rm Makefile
  83. rm .qmake.stash
  84. cd ../../../
  85. cd src/common/ivbacktrace/
  86. $qtmake ivbacktrace.pro
  87. make $MAKEOPT
  88. make clean
  89. cp libivbacktrace.so ./../../../bin/
  90. rm Makefile
  91. rm .qmake.stash
  92. cd ../../../
  93. cd src/common/ivchart/
  94. $qtmake ivchart.pro
  95. make $MAKEOPT
  96. make clean
  97. cp libivchart.so ./../../../bin/
  98. rm Makefile
  99. rm .qmake.stash
  100. cd ../../../
  101. cd src/common/ivservice/
  102. $qtmake ivservice.pro
  103. make $MAKEOPT
  104. make clean
  105. cp libivservice.so ./../../../bin/
  106. rm Makefile
  107. rm .qmake.stash
  108. cd ../../../
  109. cd src/common/interpolation/
  110. $qtmake interpolation.pro
  111. make $MAKEOPT
  112. make clean
  113. cp libinterpolation.so ./../../../bin/
  114. rm Makefile
  115. rm .qmake.stash
  116. cd ../../../
  117. cd src/common/makeprotointerface/
  118. $qtmake makeprotointerface.pro
  119. make $MAKEOPT
  120. make clean
  121. cp makeprotointerface ./../../../bin/
  122. rm Makefile
  123. rm .qmake.stash
  124. cd ../../../
  125. PWD=`pwd`
  126. PROTOPATH=$PWD/src/include/proto
  127. MSGTYPEPATH=$PWD/src/include/msgtype
  128. PROFOLDERPATH=$PWD/src/common
  129. echo $PROTOPATH
  130. echo $MSGTYPEPATH
  131. echo $PROFOLDERPATH
  132. $PWD/bin/makeprotointerface $PROTOPATH $MSGTYPEPATH $PROFOLDERPATH
  133. cp $PWD/src/common/ivprotoif/ivprotoif.h $PWD/include
  134. cd src/common/ivprotoif/
  135. $qtmake ivprotoif.pro
  136. make $MAKEOPT
  137. make clean
  138. cp libivprotoif.so ./../../../bin/
  139. rm Makefile
  140. rm .qmake.stash
  141. cd ../../../