forked from o3de/o3de-azslc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprepare_solution_linux.sh
executable file
·59 lines (49 loc) · 1.43 KB
/
prepare_solution_linux.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
# Build
mkdir build
mkdir build/release
mkdir build/debug
mkdir build/release/external
mkdir build/release/external/antlr-runtime-cpp
mkdir build/debug/external
mkdir build/debug/external/antlr-runtime-cpp
echo "Pulling ANTLR from git..."
python3 pull_from_git.py --git-url https://github.com/o3de/antlr4.git --destination-dir src/external --git-tag o3de-4.7.1
CMAKE='cmake'
$CMAKE -DMAKE_BUILD_TYPE=Release -S "src/external/antlr4/runtime/Cpp/" -B "build/release/external/antlr4/runtime/Cpp/"
pushd build/release/external/antlr4/runtime/Cpp
make -j16
popd
$CMAKE -DMAKE_BUILD_TYPE=Release -S "src/" -B "build/release"
pushd build/release
echo "Building release..."
make -j16
ls
echo "Release version:"
./azslc --version
popd
$CMAKE -DMAKE_BUILD_TYPE=Debug -S "src/external/antlr4/runtime/Cpp/" -B "build/debug/external/antlr4/runtime/Cpp/"
pushd build/debug/external/antlr4/runtime/Cpp
make -j16
popd
$CMAKE -DMAKE_BUILD_TYPE=Debug -S "src/" -B "build/debug"
pushd build/debug
echo "Building debug..."
make -j16
ls
echo "Debug version:"
./azslc --version
popd
# Deploy
mkdir bin
mkdir bin/linux
mkdir bin/linux/release
mkdir bin/linux/debug
cp build/release/azslc bin/linux/release/azslc
cp build/debug/azslc bin/linux/debug/azslc