89 lines
1.2 KiB
Bash
Executable file
89 lines
1.2 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
#
|
|
# Modification History
|
|
#
|
|
# 2007-November-12 Jason Rohrer
|
|
# Copied/modified from Cultivation (game2) project.
|
|
#
|
|
|
|
|
|
while [ -z "$platformSelection" ]
|
|
do
|
|
echo "select platform:"
|
|
|
|
echo " 1 -- GNU/Linux"
|
|
echo " 2 -- MacOSX"
|
|
echo " 3 -- Win32 using MinGW"
|
|
echo " q -- quit"
|
|
|
|
echo ""
|
|
echo -n "> "
|
|
|
|
read platformSelection
|
|
|
|
|
|
if [ "$platformSelection" = "q" ]
|
|
then
|
|
exit
|
|
fi
|
|
|
|
|
|
# use ASCII comparison.
|
|
|
|
if [[ "$platformSelection" > "3" ]]
|
|
then
|
|
platformSelection=""
|
|
fi
|
|
|
|
if [[ "$platformSelection" < "1" ]]
|
|
then
|
|
platformSelection=""
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
platformName="Generic"
|
|
platformMakefile="generic"
|
|
|
|
|
|
|
|
case "$platformSelection" in
|
|
|
|
|
|
"1" )
|
|
platformName="GNU/Linux"
|
|
platformMakefile="Makefile.GnuLinux"
|
|
;;
|
|
|
|
|
|
"2" )
|
|
platformName="MacOSX"
|
|
platformMakefile="Makefile.MacOSX"
|
|
;;
|
|
|
|
|
|
"3" )
|
|
platformName="Win32 MinGW"
|
|
platformMakefile="Makefile.MinGW"
|
|
;;
|
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
rm -f Makefile.temp
|
|
echo "# Auto-generated by gamma256/gameSource/configure for the $platformName platform. Do not edit manually." > Makefile.temp
|
|
|
|
rm -f Makefile
|
|
cat Makefile.temp $platformMakefile Makefile.all > Makefile
|
|
|
|
|
|
rm Makefile.temp
|
|
|
|
|
|
|
|
exit
|