autogen_lib.sh 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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. if [ ${#qtmake} -lt 5 ]; then
  30. echo "maybe qt6,find qmake in usr folder "
  31. optfiles=`find /usr -name 'qmake'`
  32. for entry in $optfiles
  33. do
  34. x=${entry:0-14:14}
  35. if [ "$x" == "/qt6/bin/qmake" ]; then
  36. qtmake="$entry"
  37. echo " -----find qmake"
  38. echo "$qtmake"
  39. fi
  40. done
  41. fi
  42. echo -e "\e[33m qtmake: $qtmake \e[0m"
  43. MAKEOPT=-j8
  44. mkdir bin
  45. cd src/include/proto
  46. ./protomake.sh
  47. cd ../../../
  48. cd src/common/modulecomm/
  49. $qtmake modulecomm.pro
  50. make $MAKEOPT
  51. make clean
  52. cp libmodulecomm.so ./../../../bin/
  53. rm Makefile
  54. rm .qmake.stash
  55. cd ../../../
  56. cp thirdpartylib/FastRTPS/lib/libamd64/* bin/
  57. cp thirdpartylib/FastRTPS/lib/libarm64/* bin/
  58. cd src/common/xmlparam/
  59. $qtmake xmlparam.pro
  60. make $MAKEOPT
  61. make clean
  62. cp libxmlparam.so ./../../../bin/
  63. rm Makefile
  64. rm .qmake.stash
  65. cd ../../../
  66. cd src/common/ivlog/
  67. $qtmake ivlog.pro
  68. make $MAKEOPT
  69. make clean
  70. cp libivlog.so ./../../../bin/
  71. rm Makefile
  72. rm .qmake.stash
  73. cd ../../../
  74. cd src/common/ivfault/
  75. $qtmake ivfault.pro
  76. make $MAKEOPT
  77. make clean
  78. cp libivfault.so ./../../../bin/
  79. rm Makefile
  80. rm .qmake.stash
  81. cd ../../../
  82. cd src/common/platformif/
  83. $qtmake platformif.pro
  84. make $MAKEOPT
  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. make clean
  94. cp libivexit.so ./../../../bin/
  95. rm Makefile
  96. rm .qmake.stash
  97. cd ../../../
  98. cd src/common/ivbacktrace/
  99. $qtmake ivbacktrace.pro
  100. make $MAKEOPT
  101. make clean
  102. cp libivbacktrace.so ./../../../bin/
  103. rm Makefile
  104. rm .qmake.stash
  105. cd ../../../
  106. cd src/common/ivchart/
  107. $qtmake ivchart.pro
  108. make $MAKEOPT
  109. make clean
  110. cp libivchart.so ./../../../bin/
  111. rm Makefile
  112. rm .qmake.stash
  113. cd ../../../
  114. cd src/common/ivservice/
  115. $qtmake ivservice.pro
  116. make $MAKEOPT
  117. make clean
  118. cp libivservice.so ./../../../bin/
  119. rm Makefile
  120. rm .qmake.stash
  121. cd ../../../
  122. cd src/common/interpolation/
  123. $qtmake interpolation.pro
  124. make $MAKEOPT
  125. make clean
  126. cp libinterpolation.so ./../../../bin/
  127. rm Makefile
  128. rm .qmake.stash
  129. cd ../../../
  130. cd src/common/makeprotointerface/
  131. $qtmake makeprotointerface.pro
  132. make $MAKEOPT
  133. make clean
  134. cp makeprotointerface ./../../../bin/
  135. rm Makefile
  136. rm .qmake.stash
  137. cd ../../../
  138. PWD=`pwd`
  139. PROTOPATH=$PWD/src/include/proto
  140. MSGTYPEPATH=$PWD/src/include/msgtype
  141. PROFOLDERPATH=$PWD/src/common
  142. echo $PROTOPATH
  143. echo $MSGTYPEPATH
  144. echo $PROFOLDERPATH
  145. $PWD/bin/makeprotointerface $PROTOPATH $MSGTYPEPATH $PROFOLDERPATH
  146. cp $PWD/src/common/ivprotoif/ivprotoif.h $PWD/include
  147. cd src/common/ivprotoif/
  148. $qtmake ivprotoif.pro
  149. make $MAKEOPT
  150. make clean
  151. cp libivprotoif.so ./../../../bin/
  152. rm Makefile
  153. rm .qmake.stash
  154. cd ../../../
  155. cd src/tool/checklicence/
  156. $qtmake checklicence.pro
  157. make $MAKEOPT
  158. make clean
  159. cp libchecklicence.so ./../../../bin/
  160. rm Makefile
  161. rm .qmake.stash
  162. cd ../../../
  163. cd src/tool/view_showxodrinvtk/
  164. $qtmake showxodrinvtk.pro
  165. make $MAKEOPT
  166. make clean
  167. cp libshowxodrinvtk.so ./../../../bin/
  168. rm Makefile
  169. rm .qmake.stash
  170. cd ../../../