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