2023-05-06 20:37:28 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2023-05-07 16:37:23 +00:00
|
|
|
MAKEVER=$(make --version | awk '{ print $1 }' | head -n 1)
|
|
|
|
|
|
|
|
# is this GNU?
|
|
|
|
if [ "$MAKEVER" = "GNU" ]
|
|
|
|
then
|
|
|
|
MAKETOOL="make"
|
|
|
|
else
|
|
|
|
# guess not, do we have gmake?
|
|
|
|
if [ -x "$(command -v gmake)" ]
|
|
|
|
then
|
|
|
|
MAKEVER=$(gmake --version | awk '{ print $1 }' | head -n 1)
|
|
|
|
if [ "$MAKEVER" = "GNU" ]
|
|
|
|
then
|
|
|
|
MAKETOOL="gmake"
|
|
|
|
else
|
|
|
|
echo "Please install GNU Make."
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2023-05-06 20:37:28 +00:00
|
|
|
DEPSDIR="$(pwd)/_deps"
|
|
|
|
BINDIR="$(pwd)/_bin"
|
|
|
|
INCTOOLDIR="$(pwd)/tools"
|
|
|
|
|
|
|
|
if [ -d "$DEPSDIR" ]
|
|
|
|
then
|
|
|
|
rm -rf "$DEPSDIR"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d "$BINDIR" ]
|
|
|
|
then
|
|
|
|
rm -rf "$BINDIR"
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir "$DEPSDIR"
|
|
|
|
mkdir "$BINDIR"
|
|
|
|
cd "$DEPSDIR"
|
|
|
|
|
2023-05-07 16:37:23 +00:00
|
|
|
git clone https://vcs.vera-visions.com/eukara/REWise
|
2023-05-06 20:37:28 +00:00
|
|
|
cd REWise
|
2023-05-07 16:37:23 +00:00
|
|
|
$MAKETOOL CC=cc
|
2023-05-06 20:37:28 +00:00
|
|
|
mv -v rewise "$BINDIR/rewise"
|
|
|
|
|
|
|
|
cd "$DEPSDIR"
|
2023-05-07 16:37:23 +00:00
|
|
|
git clone https://vcs.vera-visions.com/eukara/HLLib
|
|
|
|
cd HLLib/HLLib
|
|
|
|
$MAKETOOL CC=cc CXX=c++
|
2023-05-06 20:37:28 +00:00
|
|
|
cd ../HLExtract
|
2023-05-07 16:37:23 +00:00
|
|
|
$MAKETOOL CC=cc CXX=c++
|
2023-05-06 20:37:28 +00:00
|
|
|
mv -v hlextract "$BINDIR/hlextract"
|
|
|
|
|
|
|
|
cd "$DEPSDIR"
|
|
|
|
git clone https://github.com/yquake2/pakextract
|
|
|
|
cd pakextract
|
2023-05-07 16:37:23 +00:00
|
|
|
$MAKETOOL CC=cc
|
2023-05-06 20:37:28 +00:00
|
|
|
mv -v pakextract "$BINDIR/pakextract"
|
|
|
|
|
|
|
|
cd "$INCTOOLDIR/bmpfix"
|
|
|
|
cc -o bmpfix bmpfix.c
|
|
|
|
mv -v bmpfix "$BINDIR/bmpfix"
|
|
|
|
|
|
|
|
cd "$INCTOOLDIR/gpl-quake"
|
|
|
|
cc -o qfiles cmdlib.c qfiles.c
|
|
|
|
mv -v qfiles "$BINDIR/qfiles"
|
|
|
|
|