forked from hoglet67/ADFS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·50 lines (38 loc) · 1.07 KB
/
build.sh
File metadata and controls
executable file
·50 lines (38 loc) · 1.07 KB
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
#!/bin/bash
rm -rf build
mkdir -p build
# Set the BEEBASM executable for the platform
BEEBASM=../tools/beebasm/beebasm.exe
if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
BEEBASM=../tools/beebasm/beebasm
fi
ssd=adfs.ssd
# Create a blank SSD image
tools/mmb_utils/blank_ssd.pl build/${ssd}
echo
cd src
for top in `ls top_*.asm`
do
name=`echo ${top%.asm} | cut -c5-`
echo "Building $name..."
# Assember the ROM
$BEEBASM -i ${top} -o ../build/${name} -v >& ../build/${name}.log
# Check if ROM has been build, otherwise fail early
if [ ! -f ../build/${name} ]
then
cat ../build/${name}.log
echo "build failed to create ${name}"
exit
fi
# Create the .inf file
echo -e "\$."${name}"\t8000\t8000" > ../build/${name}.inf
# Add into the SSD
../tools/mmb_utils/putfile.pl ../build/${ssd} ../build/${name}
# Report end of code
grep "code ends at" ../build/${name}.log
# Report build checksum
echo " mdsum is "`md5sum <../build/${name}`
done
cd ..
echo
tools/mmb_utils/info.pl build/${ssd}