2018-11-05 01:47:17 +00:00
|
|
|
#!/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
|
2020-05-19 06:59:02 +00:00
|
|
|
ZIPDIR=buildbot/SDL
|
2018-11-05 01:47:17 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
|
|
|
cd `dirname "$0"`
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
rm -f $ZIPFILE
|
|
|
|
wmake -f Makefile.os2
|
|
|
|
rm -rf $ZIPDIR
|
2020-05-19 06:59:02 +00:00
|
|
|
mkdir -p $ZIPDIR
|
2022-01-08 19:35:02 +00:00
|
|
|
chmod 644 SDL2.dll SDL2.lib SDL2test.lib
|
|
|
|
mv SDL2.dll SDL2.lib SDL2test.lib $ZIPDIR/
|
2018-11-05 01:47:17 +00:00
|
|
|
cp -R include $ZIPDIR/
|
2020-05-19 06:59:02 +00:00
|
|
|
zip -9r "buildbot/$ZIPFILE" $ZIPDIR
|
2018-11-05 01:47:17 +00:00
|
|
|
|
2018-11-05 02:11:07 +00:00
|
|
|
wmake -f Makefile.os2 distclean
|
2018-11-05 01:47:17 +00:00
|
|
|
|
|
|
|
set +x
|
|
|
|
echo "All done. Final installable is in $ZIPFILE ...";
|