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
|
|
|
|
|
|
|
|
# GCC
|
2021-10-08 00:11:57 +02:00
|
|
|
mkdir _output/gcc
|
2024-07-08 20:04:44 +02:00
|
|
|
git clean -x -d -f -e test -e _output -e _downloads -e _watcom
|
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
|
2024-02-07 19:40:30 +01:00
|
|
|
(
|
|
|
|
cd share
|
|
|
|
git submodule update --init --recursive
|
|
|
|
git clean -x -d -f
|
|
|
|
env COMPILER=gcc ./build.sh
|
|
|
|
)
|
|
|
|
mv -n share/src/share.com _output/gcc/.
|
|
|
|
mv -n share/src/share.map _output/gcc/.
|
2020-02-23 12:38:00 +01:00
|
|
|
|
|
|
|
# Watcom
|
2024-07-08 20:04:44 +02:00
|
|
|
OWTAR=ow-snapshot.tar.xz
|
2020-02-23 12:38:00 +01:00
|
|
|
if [ ! -d _watcom ] ; then
|
2024-07-08 20:04:44 +02:00
|
|
|
mkdir -p _downloads
|
2020-02-23 12:38:00 +01:00
|
|
|
mkdir _watcom
|
2024-07-08 20:04:44 +02:00
|
|
|
if [ ! -f _downloads/$OWTAR ] ; then
|
|
|
|
(cd _downloads && wget --no-verbose https://github.com/open-watcom/open-watcom-v2/releases/download/Last-CI-build/$OWTAR)
|
|
|
|
fi
|
|
|
|
(cd _watcom && tar -xf ../_downloads/$OWTAR)
|
2020-02-23 12:38:00 +01:00
|
|
|
fi
|
|
|
|
|
2021-09-26 05:17:29 +02:00
|
|
|
export WATCOM=$BUILD_DIR/_watcom
|
2024-07-08 20:04:44 +02:00
|
|
|
export PATH=$BUILD_DIR/bin:$PATH:$WATCOM/binl64
|
2019-11-12 11:19:30 +01:00
|
|
|
|
2021-10-08 00:11:57 +02:00
|
|
|
mkdir _output/wc
|
2024-07-08 20:04:44 +02:00
|
|
|
git clean -x -d -f -e test -e _output -e _downloads -e _watcom
|
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
|
|
|
|
2024-02-07 19:40:30 +01:00
|
|
|
## DOS (GCC)
|
|
|
|
#mkdir _output/gcc_dos
|
2024-07-08 20:04:44 +02:00
|
|
|
#git clean -x -d -f -e test -e _output -e _downloads -e _watcom
|
2024-02-07 19:40:30 +01:00
|
|
|
#{
|
|
|
|
# echo set COMPILER=GCC
|
|
|
|
# echo set MAKE=make
|
|
|
|
# echo set XCPU=386
|
|
|
|
# echo set XFAT=32
|
|
|
|
# echo set XNASM='C:\\devel\\nasm\\nasm'
|
|
|
|
# echo set OLDPATH=%PATH%
|
|
|
|
# echo set PATH='C:\\devel\\i16gnu\\bin;C:\\bin;%OLDPATH%'
|
|
|
|
#} | unix2dos > config.bat
|
|
|
|
|
|
|
|
#dosemu -td -q -K . -E "build.bat"
|
|
|
|
|
|
|
|
# DOS (Watcom)
|
|
|
|
mkdir _output/wc_dos
|
2024-07-08 20:04:44 +02:00
|
|
|
git clean -x -d -f -e test -e _output -e _downloads -e _watcom
|
2024-02-07 19:40:30 +01:00
|
|
|
{
|
|
|
|
echo set COMPILER=WATCOM
|
|
|
|
echo set WATCOM='C:\\devel\\watcomc'
|
|
|
|
echo set MAKE=wmake /ms
|
|
|
|
echo set XCPU=386
|
|
|
|
echo set XFAT=32
|
|
|
|
echo set XNASM='C:\\devel\\nasm\\nasm'
|
2024-07-14 17:59:18 +02:00
|
|
|
echo set XUPX=upx --8086 --best
|
2024-02-07 19:40:30 +01:00
|
|
|
echo set OLDPATH=%PATH%
|
2024-07-08 20:04:44 +02:00
|
|
|
echo set PATH='%WATCOM%\\binw;C:\\bin;%OLDPATH%'
|
2024-07-15 11:50:54 +02:00
|
|
|
echo set DOS4G=QUIET
|
2024-02-07 19:40:30 +01:00
|
|
|
} | unix2dos > config.bat
|
|
|
|
|
|
|
|
dosemu -td -q -K . -E "build.bat"
|
|
|
|
mv -n bin/KWC*.map bin/KWC*.sys _output/wc_dos/.
|
|
|
|
mv -n bin/country.sys _output/wc_dos/.
|
|
|
|
|
|
|
|
|
|
|
|
# DOS (Turbo C 2.01)
|
|
|
|
if [ -d ${HOME}/.dosemu/drive_c/tc201 ] ; then
|
|
|
|
mkdir _output/tc_dos
|
2024-07-08 20:04:44 +02:00
|
|
|
git clean -x -d -f -e test -e _output -e _downloads -e _watcom
|
2024-02-07 19:40:30 +01:00
|
|
|
{
|
|
|
|
echo set COMPILER=TC2
|
|
|
|
echo set TC2_BASE='C:\\tc201'
|
|
|
|
echo set MAKE=make
|
|
|
|
echo set XCPU=386
|
|
|
|
echo set XFAT=32
|
|
|
|
echo set XNASM=nasm
|
|
|
|
echo set OLDPATH=%PATH%
|
|
|
|
echo set PATH='%TC2_BASE%;C:\\devel\\nasm;C:\\bin;%OLDPATH%'
|
|
|
|
} | unix2dos > config.bat
|
|
|
|
|
|
|
|
dosemu -td -q -K . -E "build.bat lfn"
|
|
|
|
mv -n bin/KTC*.map bin/KTC*.sys _output/tc_dos/.
|
|
|
|
mv -n bin/country.sys _output/tc_dos/.
|
|
|
|
# TC share
|
|
|
|
(
|
|
|
|
cd share
|
|
|
|
git submodule update --init --recursive
|
|
|
|
git clean -x -d -f
|
|
|
|
env COMPILER=tcc2-emu ./build.sh
|
|
|
|
)
|
|
|
|
mv -n share/src/share.com _output/tc_dos/.
|
|
|
|
mv -n share/src/share.map _output/tc_dos/.
|
|
|
|
fi
|
|
|
|
|
2021-01-09 01:00:25 +01:00
|
|
|
echo done
|