build-scripts/os2-buildbot.sh
author Ryan C. Gordon <icculus@icculus.org>
Sun, 04 Nov 2018 20:47:17 -0500
changeset 12395 c1443b4dea7f
child 12396 50b071ef40ab
permissions -rwxr-xr-x
os2: Added a script for the buildbot.
     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 
    10 if [ -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
    14 fi
    15 
    16 export PATH="$WATCOM/binl:$PATH"
    17 
    18 ZIPFILE="$1"
    19 if [ -z $1 ]; then
    20     ZIPFILE=sdl-os2.zip
    21 fi
    22 ZIPDIR=SDL2-os2
    23 
    24 set -e
    25 set -x
    26 
    27 cd `dirname "$0"`
    28 cd ..
    29 
    30 rm -f $ZIPFILE
    31 wmake -f Makefile.os2
    32 rm -rf $ZIPDIR
    33 mkdir $ZIPDIR
    34 chmod a+r SDL2.lib SDL2.dll
    35 mv SDL2.lib SDL2.dll $ZIPDIR/
    36 cp -R include $ZIPDIR/
    37 zip -9r "$ZIPFILE" $ZIPDIR
    38 
    39 rm -f *.obj SDL2.exp SDL2.map SDL2.lnk
    40 
    41 set +x
    42 echo "All done. Final installable is in $ZIPFILE ...";