2023-12-07 22:45:26 +01:00
|
|
|
#!/bin/sh
|
2023-11-20 13:22:50 +01:00
|
|
|
|
2023-11-16 12:02:51 +01:00
|
|
|
echo "Compiling for 65c02"
|
|
|
|
|
|
|
|
# Removing previous build
|
|
|
|
|
|
|
|
rm -rf build
|
|
|
|
mkdir build
|
|
|
|
|
|
|
|
bold=$(tput bold)
|
|
|
|
normal=$(tput sgr0)
|
|
|
|
|
|
|
|
build(){
|
|
|
|
output=$(vasm6502_oldstyle -Fbin -dotdir -wdc02 src/main.s -o build/a.out | grep :)
|
|
|
|
|
|
|
|
if `find build/a.out* > /dev/null`;
|
|
|
|
then
|
|
|
|
echo -e "\n\e[0;32m${bold}Compiled Succsessfully${normal}"
|
|
|
|
sh upload.sh
|
|
|
|
else
|
|
|
|
echo -e "\n\e[0;31m${bold}Error while Compiling${normal}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo $output | sed 's/bytes /bytes\n/g'
|
|
|
|
}
|
|
|
|
|
|
|
|
# Checking dependencies
|
|
|
|
|
|
|
|
if command -v vasm6502_oldstyle > /dev/null 2<&1;
|
|
|
|
then
|
|
|
|
build
|
|
|
|
else
|
|
|
|
echo -e "\n\e[0;31m${bold}vasm6502_oldstyle not found${normal}"
|
|
|
|
echo "Aborting build..."
|
|
|
|
fi
|