-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-all
executable file
·62 lines (52 loc) · 1.43 KB
/
build-all
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
60
61
62
#!/bin/bash
#
# Copyright (c) 2017 Perov Maxim <coder@frtk.ru>
# Alexander Gerasimov <samik.mechanic@gmail.com>
checkSuccess() {
if [ $? -ne 0 ]; then
echo -e "\n[!] ERROR: $1 build failed!\n"
cd $CURDIR
exit $2
else
echo -e "\n[i] Build Successful: $1\n"
fi
}
CURDIR=`pwd`
IS_WIN32=0
case "$(uname -s)" in
CYGWIN*|MINGW32*|MSYS*)
IS_WIN32=1
;;
*)
;;
esac
if [ $IS_WIN32 -eq 0 ]; then
if [ ! -d "$CURDIR/ethereum" ]; then # || [ ! -d "$CURDIR/systemc" ]; then
echo You must run 'first-start' script first!
exit 1
fi
fi
if [ $IS_WIN32 -eq 0 ]; then
# build go-ethereum evm (unavailable on Windows)
echo -e "\n-----------------------\nBuilding Ethereum EVM\n-----------------------\n"
cd $CURDIR/ethereum
make clean && make all
checkSuccess go-ethereum 2
# build cemu evm (on Windows use Visual Studio)
echo -e "\n-----------------------\nBuilding CEMU EVM\n-----------------------\n"
cd $CURDIR/emulator
make clean && make
checkSuccess cemu 3
fi
# build qemu evm
echo -e "\n-----------------------\nBuilding QEMU EVM\n-----------------------\n"
cd $CURDIR/QEMU/qemu
./builder-evm
checkSuccess qemu 4
echo -e "\n-----------------------\nBuilding Test System....\n-----------------------\n"
# build tests
cd $CURDIR/tests/asm
make clean && make
checkSuccess tests 5
cd $CURDIR
echo -e "\n-----------------------\nBuild Done.\n"