+# This software is licensed under the GPL v2 or any later version. Set the
+# file GPL.TXT for details. ;-)
+#
+
+# NOTE: zlib and OpenGL libs are a dependency, but are not checked for.
+# same goes for libcdio
+
+# Figure out which system we're compiling for, and set the appropriate variables
+
+ifeq "$(OSTYPE)" "msys" # Win32
+
+SYSTYPE = __GCCWIN32__
+EXESUFFIX = .exe
+GLLIB = -lopengl32
+ICON = obj/icon.o
+SDLLIBTYPE = --libs
+MSG = Win32 on MinGW
+
+else
+#ifeq "$(OSTYPE)" "darwin"
+ifeq "darwin" "$(findstring darwin,$(OSTYPE))" # Should catch both 'darwin' and 'darwin7.0'
+
+SYSTYPE = __GCCUNIX__ -D_OSX_
+EXESUFFIX =
+GLLIB =
+ICON =
+SDLLIBTYPE = --static-libs
+MSG = Mac OS X
+
+else # *nix
+
+SYSTYPE = __GCCUNIX__
+EXESUFFIX =
+GLLIB = -lGL
+ICON =
+SDLLIBTYPE = --libs
+MSG = generic Unix/Linux
+
+endif
+endif