#!/bin/bash
 echo "Linux / x86 :: SVGALIB"
 echo "-----------------------------------------------------------"
 echo "Assembling retro.asm..."
 nasm retro.asm -felf -oretro.o -g
 echo "-----------------------------------------------------------"
if [ $2 ]; then
 echo "Compiling C modules..."
 gcc retro.o $2.c -lvga -orf
 echo "-----------------------------------------------------------"
 echo "Linking into runnable object file..."
else
 echo "Linking into runnable object file..."
 gcc retro.o -lvga -orf
fi
 echo "Setting permissions..."
 chmod u+s rf
 echo "Cleaning up..."
 rm -f retro.o
