From e45ed114c5c8128ce1184fa274f1a69445d5b59c Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 4 Nov 2018 20:47:17 -0500 Subject: [PATCH] os2: Added a script for the buildbot. --- build-scripts/os2-buildbot.sh | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 build-scripts/os2-buildbot.sh diff --git a/build-scripts/os2-buildbot.sh b/build-scripts/os2-buildbot.sh new file mode 100755 index 0000000000000..67c8ce623c08f --- /dev/null +++ b/build-scripts/os2-buildbot.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +# This is the script buildbot.libsdl.org uses to cross-compile SDL2 from +# x86 Linux to OS/2, using OpenWatcom. + +# The final zipfile can be unpacked on any machine that supports OpenWatcom +# (Windows, Linux, OS/2, etc). Point the compiler at the include directory +# and link against the SDL2.lib file. Ship the SDL2.dll with your app. + +if [ -z "$WATCOM" ]; then + echo "This script expects \$WATCOM to be set to the OpenWatcom install dir." 1>&2 + echo "This is often something like '/usr/local/share/watcom'" 1>&2 + exit 1 +fi + +export PATH="$WATCOM/binl:$PATH" + +ZIPFILE="$1" +if [ -z $1 ]; then + ZIPFILE=sdl-os2.zip +fi +ZIPDIR=SDL2-os2 + +set -e +set -x + +cd `dirname "$0"` +cd .. + +rm -f $ZIPFILE +wmake -f Makefile.os2 +rm -rf $ZIPDIR +mkdir $ZIPDIR +chmod a+r SDL2.lib SDL2.dll +mv SDL2.lib SDL2.dll $ZIPDIR/ +cp -R include $ZIPDIR/ +zip -9r "$ZIPFILE" $ZIPDIR + +rm -f *.obj SDL2.exp SDL2.map SDL2.lnk + +set +x +echo "All done. Final installable is in $ZIPFILE ...";