echo "* Compiling Linux Port (SDL)"

cd drv/sdllinux
if [ ! -r at ]; then
  ln -s ../at
  ln -s ../clip
  ln -s ../cr
  ln -s ../vgadata
fi
cd ../..

echo "  :: Creating Dictionary for Linux + SDL Drivers"
  (cd drv/sdllinux ; find -name \* ! -name \*~ ! -name all -printf '%%include "drv/sdllinux/%P"\n' >all)

echo "  :: Compiling kernel for Linux + SDL (bin/rf-sdl)"
  nasm -felf sdllinux.asm -llst/sdllinux.lst
  gcc sdllinux.o -lSDL -lpthread -s -obin/rf-sdl
  chmod u+s bin/rf-sdl
