2019-11-12 11:19:30 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-10-14 13:12:32 +02:00
|
|
|
set -e
|
|
|
|
|
2021-09-26 05:17:29 +02:00
|
|
|
if [ -z "${BUILD_DIR}" ] ; then
|
|
|
|
BUILD_DIR=$(pwd)
|
2020-02-23 12:38:00 +01:00
|
|
|
fi
|
2021-09-26 05:17:29 +02:00
|
|
|
echo BUILD_DIR is \"${BUILD_DIR}\"
|
2020-02-23 12:38:00 +01:00
|
|
|
|
|
|
|
# Output directory
|
|
|
|
rm -rf _output
|
|
|
|
mkdir _output
|
|
|
|
|
2022-05-21 21:09:45 +02:00
|
|
|
OWTAR=ow-snapshot.tar.xz
|
|
|
|
|
2020-02-23 12:38:00 +01:00
|
|
|
# GCC
|
2021-10-08 00:11:57 +02:00
|
|
|
mkdir _output/gcc
|
2022-05-26 20:55:35 +02:00
|
|
|
git clean -x -d -f -e test -e _output -e _watcom -e $OWTAR
|
2021-12-30 17:30:29 +01:00
|
|
|
make -C country clean
|
2019-11-12 11:19:30 +01:00
|
|
|
make all COMPILER=gcc
|
2021-10-08 00:11:57 +02:00
|
|
|
mv -n bin/KGC*.map bin/KGC*.sys _output/gcc/.
|
2021-12-30 17:30:29 +01:00
|
|
|
mv -n bin/country.sys _output/gcc/.
|
2021-09-24 11:47:48 +02:00
|
|
|
# GCC share
|
|
|
|
(cd share && make clobber && env COMPILER=gcc ./build.sh)
|
2021-10-08 00:11:57 +02:00
|
|
|
mv -n share/share.com _output/gcc/.
|
|
|
|
mv -n share/share.map _output/gcc/.
|
2020-02-23 12:38:00 +01:00
|
|
|
|
|
|
|
# Watcom
|
|
|
|
if [ ! -d _watcom ] ; then
|
2023-03-22 00:20:06 +01:00
|
|
|
[ -f $OWTAR ] || wget --no-verbose https://github.com/open-watcom/open-watcom-v2/releases/download/2023-02-01-Build/$OWTAR
|
2020-02-23 12:38:00 +01:00
|
|
|
|
|
|
|
mkdir _watcom
|
2022-05-21 21:09:45 +02:00
|
|
|
(cd _watcom && tar -xf ../$OWTAR)
|
2020-02-23 12:38:00 +01:00
|
|
|
fi
|
|
|
|
|
2021-09-26 05:17:29 +02:00
|
|
|
export PATH=$BUILD_DIR/bin:$PATH:$BUILD_DIR/_watcom/binl64
|
|
|
|
export WATCOM=$BUILD_DIR/_watcom
|
2019-11-12 11:19:30 +01:00
|
|
|
|
2021-10-08 00:11:57 +02:00
|
|
|
mkdir _output/wc
|
2022-05-26 20:55:35 +02:00
|
|
|
git clean -x -d -f -e test -e _output -e _watcom -e $OWTAR
|
2021-12-30 17:30:29 +01:00
|
|
|
make -C country clean
|
2020-02-23 12:38:00 +01:00
|
|
|
make all COMPILER=owlinux
|
2021-10-08 00:11:57 +02:00
|
|
|
mv -n bin/KWC*.map bin/KWC*.sys _output/wc/.
|
2021-12-30 17:30:29 +01:00
|
|
|
mv -n bin/country.sys _output/wc/.
|
2021-01-09 01:00:25 +01:00
|
|
|
|
|
|
|
echo done
|