prepare_solution_linux.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #!/bin/bash
  2. #
  3. # Copyright (c) Contributors to the Open 3D Engine Project.
  4. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  5. #
  6. # SPDX-License-Identifier: Apache-2.0 OR MIT
  7. #
  8. # Build
  9. mkdir build
  10. mkdir build/release
  11. mkdir build/debug
  12. mkdir build/release/external
  13. mkdir build/release/external/antlr-runtime-cpp
  14. mkdir build/debug/external
  15. mkdir build/debug/external/antlr-runtime-cpp
  16. echo "Pulling ANTLR from git..."
  17. python pull_from_git.py --git-url https://github.com/galibzon/antlr4.git --destination-dir src/external --git-tag o3de-4.7.1
  18. CMAKE='cmake'
  19. $CMAKE -DMAKE_BUILD_TYPE=Release -S "src/external/antlr4/runtime/Cpp/" -B "build/release/external/antlr4/runtime/Cpp/"
  20. pushd build/release/external/antlr4/runtime/Cpp
  21. make -j16
  22. popd
  23. $CMAKE -DMAKE_BUILD_TYPE=Release -S "src/" -B "build/release"
  24. pushd build/release
  25. echo "Building release..."
  26. make -j16
  27. ls
  28. echo "Release version:"
  29. ./azslc --version
  30. popd
  31. $CMAKE -DMAKE_BUILD_TYPE=Debug -S "src/external/antlr4/runtime/Cpp/" -B "build/debug/external/antlr4/runtime/Cpp/"
  32. pushd build/debug/external/antlr4/runtime/Cpp
  33. make -j16
  34. popd
  35. $CMAKE -DMAKE_BUILD_TYPE=Debug -S "src/" -B "build/debug"
  36. pushd build/debug
  37. echo "Building debug..."
  38. make -j16
  39. ls
  40. echo "Debug version:"
  41. ./azslc --version
  42. popd
  43. # Deploy
  44. mkdir bin
  45. mkdir bin/linux
  46. mkdir bin/linux/release
  47. mkdir bin/linux/debug
  48. cp build/release/azslc bin/linux/release/azslc
  49. cp build/debug/azslc bin/linux/debug/azslc