-
Notifications
You must be signed in to change notification settings - Fork 2
/
make.sh
executable file
·66 lines (52 loc) · 1.05 KB
/
make.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
60
61
62
63
64
65
66
#!/bin/sh
help() {
echo "Usage: $0 <targets> ..."
echo " all Build oberon-riscv"
echo " help This help"
exit 1
}
here=$(pwd)
oberonc_bin=${here}/tools/oberonc/bin
src_files="src/ORS.Mod src/ORB.Mod src/ORG.Mod+ src/ORP.Mod src/OberonRV.Mod"
all() {
java -cp $oberonc_bin:. oberonc build $src_files
}
if [ $# -eq 0 ]
then
help
fi
# Clone oberonc if not already done
if [ ! -d tools/oberonc ]
then
mkdir -p tools
cd tools
git clone https://github.com/lboasso/oberonc.git
# Building not necessary, because it already contains compiled Java classes
# cd oberonc
# make build
# cd ..
# copy symbol files to
mkdir -p ../build
cp Files.smb ../build
# cp In.smb ../build
cp Out.smb ../build
# cp Strings.smb ../build
cd ..
fi
while [ $# -ne 0 ]
do
case $1 in
help)
help
;;
all)
all
shift
;;
*)
echo "Unknown target $1. Stop."
exit 2
;;
esac
shift
done