-#!/bin/bash
-
-# Download and cross-compile dependencies for Yoink. This script requires
-# bash, wget, md5sum, unzip, tar, patch, make and install. Have fun!
-
-HOST="i686-mingw32"
-PREFIX="/usr/$HOST/usr"
+#!/bin/sh
+
+#
+# Yoink
+# Run this script to download and cross-compile dependencies for win32.
+#
+# A directory named deps will be created and/or populated in the current
+# directory. Upon successful completion (be patient), the compiled
+# dependencies will be packaged into an archive named deps.tar.bz2 in the
+# current directory. To install the dependencies, execute this command:
+#
+# tar xf deps.tar.bz2 -C $PREFIX
+#
+# where $PREFIX is the path to your mingw32 toolchain. If problems occur,
+# check stdout and stderr for clues. You may be able to easily determine
+# the problem and make the necessary corrections. These packages will be
+# downloaded and built:
+#
+# SDL 1.2.14
+# boost 1.42.0 (headers only)
+# libogg 1.1.4
+# libpng 1.4.1
+# libvorbis 1.2.3
+# lua 5.1.4
+# openal-soft 1.11.753
+# zlib 1.2.3
+#
+# This script requires a working mingw32 toolchain and other basic tools.
+# Have fun!
+#
+# Example usage:
+# ./makedeps.sh -H i486-mingw32 -p /usr/i486-mingw32 -m "-j8"
+#
+# Bugs: Each time the script is run, all of the dependencies will be
+# rebuilt, even the ones which were already built successfully.
+#
+
+function showhelp()
+{
+ echo "Download and cross-compile dependencies for win32."
+ echo "Usage: $0 [-h] [-m makeopts] -H host -p prefix"
+ echo ""
+ echo " -H Specify the name of your toolchain, like i486-mingw32."
+ echo " -h Show this help an exit."
+ echo " -m Specify options to be passed to make."
+ echo " -p Specify the path to your toolchain installation."
+}