-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·45 lines (35 loc) · 884 Bytes
/
build.sh
File metadata and controls
executable file
·45 lines (35 loc) · 884 Bytes
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
#!/bin/bash
export PATH="$HOME/Atari/MadPascal:$PATH"
MPBase="$HOME/Atari/MadPascal/base"
ProjectBin="./bin/SFXMM"
logfile="outmsg.log"
function break_build() {
echo "!! Project not compiled"
cat $logfile
exit 0
}
# clear log file
[ -f $logfile ] && rm $logfile
echo "> Compiling project loader..."
cd loader
mp loader.pas >> $logfile
# mp loader.pas -o >> $logfile
[ $? -ne 0 ] && break_build
mads loader.a65 -x -i:$MPBase -o:../$ProjectBin/LOADER.XEX >> $logfile
[ $? -ne 0 ] && break_build
cd ..
echo "> Build resources..."
cd resources
./build.sh
cd ..
echo "> Compiling main project..."
mp $1.pas -define:INCLUDE_RESOURCES >> $logfile
[ $? -ne 0 ] && break_build
mads $1.a65 -x -i:$MPBase -o:$ProjectBin/$1.XEX >> $logfile
[ $? -ne 0 ] && break_build
echo "> Building ATR image..."
cd bin
# clear log file
[ -f $logfile ] && rm $logfile
./build.sh >> $logfile
cd ..