echo "* Compiling Linux Port (SDL)"
cd drivers/sdllinux
if [ -r all ]; then
  rm all
fi
if [ ! -r at ]; then
  ln -s ../native/at
  ln -s ../native/clip
  ln -s ../native/cr
  ln -s ../native/vgadata
fi
cd ../..
echo "  :: Creating Dictionary for Linux + SDL Drivers"
  (cd drivers/sdllinux ; find -name \* ! -name \*~ -printf '%%include "drivers/sdllinux/%P"\n') >drivers/all
  mv drivers/all drivers/sdllinux
echo "  :: Compiling kernel for Linux + SDL"
  nasm -felf retro.asm -Dplatform.sdllinux  -llistings/sdllinux.lst
  gcc retro.o -lSDL -lpthread -s -oimages/rf-sdl
  chmod u+s images/rf-sdl
