Cross-Platform build scripts for audio plugins
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.1KB

  1. #!/bin/bash
  2. CROSS_COMPILING=0
  3. LINUX=0
  4. MACOS=0
  5. MACOS_OLD=0
  6. MACOS_UNIVERSAL=0
  7. WIN32=0
  8. WIN64=0
  9. function check_target() {
  10. case "${target}" in
  11. "macos"|"Darwin")
  12. MACOS=1
  13. ;;
  14. "macos-old")
  15. MACOS=1
  16. MACOS_OLD=1
  17. CROSS_COMPILING=1
  18. ;;
  19. "macos-universal")
  20. MACOS=1
  21. MACOS_UNIVERSAL=1
  22. ;;
  23. "win32")
  24. WIN32=1
  25. CROSS_COMPILING=1
  26. ;;
  27. "win64")
  28. WIN32=1
  29. WIN64=1
  30. CROSS_COMPILING=1
  31. ;;
  32. "linux"|"Linux")
  33. LINUX=1
  34. ;;
  35. "native")
  36. target=$(uname -s)
  37. check_target
  38. if [ "$(uname -m)" = "arm64" ]; then
  39. MACOS_UNIVERSAL=1
  40. fi
  41. ;;
  42. default)
  43. echo "Invalid target '${target}', possible values are:"
  44. echo "\tmacos"
  45. echo "\tmacos-old"
  46. echo "\tmacos-universal"
  47. echo "\twin32"
  48. echo "\twin64"
  49. echo "\tnative"
  50. exit 2
  51. ;;
  52. esac
  53. }
  54. check_target