build_lib.sh 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. qtmake="/opt/Qt5.10.1/5.10.1/gcc_64/bin/qmake"
  2. MAKEOPT=-j8
  3. mkdir bin
  4. cd src/include/proto
  5. sh ./protomake.sh
  6. cd ../../../
  7. cd src/common/modulecomm/
  8. $qtmake modulecomm.pro
  9. make $MAKEOPT
  10. check_result $?
  11. make clean
  12. cp libmodulecomm.so ./../../../bin/
  13. rm Makefile
  14. rm .qmake.stash
  15. cd ../../../
  16. cd src/common/xmlparam/
  17. $qtmake xmlparam.pro
  18. make $MAKEOPT
  19. check_result $?
  20. make clean
  21. cp libxmlparam.so ./../../../bin/
  22. rm Makefile
  23. rm .qmake.stash
  24. cd ../../../
  25. cd src/common/ivexit/
  26. $qtmake ivexit.pro
  27. make $MAKEOPT
  28. check_result $?
  29. make clean
  30. cp libivexit.so ./../../../bin/
  31. rm Makefile
  32. rm .qmake.stash
  33. cd ../../../
  34. cd src/common/ndt_cpu/
  35. $qtmake ndt_cpu.pro
  36. make $MAKEOPT
  37. check_result $?
  38. make clean
  39. cp libndt_cpu.so ./../../../bin/
  40. rm Makefile
  41. rm .qmake.stash
  42. cd ../../../
  43. cd src/common/ivlog/
  44. $qtmake ivlog.pro
  45. make $MAKEOPT
  46. check_result $?
  47. make clean
  48. cp libivlog.so ./../../../bin/
  49. rm Makefile
  50. rm .qmake.stash
  51. cd ../../../
  52. cd src/common/ivfault/
  53. $qtmake ivfault.pro
  54. make $MAKEOPT
  55. check_result $?
  56. make clean
  57. cp libivfault.so ./../../../bin/
  58. rm Makefile
  59. rm .qmake.stash
  60. cd ../../../
  61. cd src/common/platformif/
  62. $qtmake platformif.pro
  63. make $MAKEOPT
  64. check_result $?
  65. make clean
  66. cp libplatformif.so ./../../../bin/
  67. rm Makefile
  68. rm .qmake.stash
  69. cd ../../../
  70. lib_name=(
  71. libmodulecomm.so
  72. libivbacktrace.so
  73. libndt_cpu.so
  74. libxmlparam.so
  75. libivfault.so
  76. libivlog.so
  77. libivexit.so
  78. libplatformif.so
  79. )
  80. for x in ${lib_name[@]}
  81. do
  82. echo "link lib $x"
  83. patchelf --set-rpath '$ORIGIN' ./bin/$x
  84. if [ "$?" != 0 ];then
  85. echo -e "\e[31m autodeploy.sh: patchelf $EXE faile, Ensure patchelf tool installed\e[0m"
  86. exit 1
  87. fi
  88. done
  89. cp ./bin/*.so ./deploy/app/lib/