1
0

build.sh 876 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. SCRIPT_DIR=$(cd `dirname $0`; pwd)
  3. ROOT_DIR=${SCRIPT_DIR}/..
  4. # install libevent libev libuv asio poco
  5. UNAME=$(uname -a)
  6. case ${UNAME} in
  7. *Ubuntu*|*Debian*)
  8. sudo apt install libevent-dev libev-dev libuv1-dev libboost-dev libboost-system-dev libasio-dev libpoco-dev
  9. ;;
  10. *CentOS*)
  11. sudo yum install libevent-devel libev-devel libuv-devel boost-devel asio-devel poco-devel
  12. ;;
  13. *Darwin*)
  14. brew install libevent libev libuv boost asio poco
  15. ;;
  16. *)
  17. echo 'please install libevent libev libuv boost asio poco'
  18. ;;
  19. esac
  20. # install muduo => https://github.com/chenshuo/muduo.git
  21. if false; then
  22. cd ${ROOT_DIR}/..
  23. git clone https://github.com/chenshuo/muduo.git
  24. cd muduo
  25. mkdir build && cd build
  26. cmake .. && make && sudo make install
  27. fi
  28. cd ${ROOT_DIR}
  29. make libhv && sudo make install
  30. make echo-servers