1#!/bin/bash 2 3# This is the script buildbot.libsdl.org uses to cross-compile SDL2 from 4# x86 Linux to OS/2, using OpenWatcom. 5 6# The final zipfile can be unpacked on any machine that supports OpenWatcom 7# (Windows, Linux, OS/2, etc). Point the compiler at the include directory 8# and link against the SDL2.lib file. Ship the SDL2.dll with your app. 9 10if [ -z "$WATCOM" ]; then 11 echo "This script expects \$WATCOM to be set to the OpenWatcom install dir." 1>&2 12 echo "This is often something like '/usr/local/share/watcom'" 1>&2 13 exit 1 14fi 15 16export PATH="$WATCOM/binl:$PATH" 17 18ZIPFILE="$1" 19if [ -z $1 ]; then 20 ZIPFILE=sdl-os2.zip 21fi 22ZIPDIR=buildbot/SDL 23 24set -e 25set -x 26 27cd `dirname "$0"` 28cd .. 29 30rm -f $ZIPFILE 31wmake -f Makefile.os2 32rm -rf $ZIPDIR 33mkdir -p $ZIPDIR 34chmod a+r SDL2.lib SDL2.dll 35mv SDL2.lib SDL2.dll $ZIPDIR/ 36cp -R include $ZIPDIR/ 37zip -9r "buildbot/$ZIPFILE" $ZIPDIR 38 39wmake -f Makefile.os2 distclean 40 41set +x 42echo "All done. Final installable is in $ZIPFILE ..."; 43