#
#	profile.ksh
#
#	This file is executed by the very lowest level of ksh. It will only
#	be executed if ksh is executed by mint.prg ( ie. if it's parent's
#	process ID is 0 ), or if ksh is started as ksh -L ( for login )
#

export HOME=d:/ksh/ksh
export SHELL=$HOME/ksh.tos

#	tell ksh where it's environment file is. This will be included by every
#	execution of ksh

export ENV=~/kshrc.ksh

#	set up 50 line mode
d:/bin/fsw small
export TERM=atari50
d:/bin/cls

export TMPDIR=g:/temp
export TEMP=$TMPDIR
export LESS=-cMx4

#	environment variables for mgr
mgr_home=d:/mgr
export MGRFONT=$mgr_home/font
export MGRICON=$mgr_home/icon
export DEFAULT_FONT=$MGRFONT/gal7x11r.fnt

LOGOUT=~/logout.ksh

#	Uncomment the following bit to start up the printer spooler
#	switch prn to aux for a serial printer
#	$LPDPID is used by logout.ksh to tidy up
#	lpd v:/prn &
#	LPDPID=$!

#	Say hello :-)
echo $KSH_VERSION
echo MiNT Version is $MINT_VERSION

#	Now sort out which compiler we want to run with
#	( pity that we don't have a select statement )
#	Get rid of this whole section if it's not relevant

echo "\n Choose a compiler\n"
echo " 1.	Lattice C V5"
echo " 2.	Gnu GCC\n"

read comp_val?"Enter 1 or 2 [2]"

case $comp_val in
	1)
		echo "\n Setting up for Lattice C\n"
		compiler_bin=d:/compiler/lc/bin
		export LIB=d:\\compiler\\lc\\lib
		export INCLUDE=d:\\compiler\\lc\\include
		export QUAD=${TEMP}\\
		;;
	*)
		echo "\n Setting up for GCC\n"
		compiler_bin=d:/compiler/gnu/bin
		export GCCEXEC=d:/compiler/gnu/bin/gcc_
		export GNULIB=e:/mint/lib
		export GNUINC=e:/mint/include
		export CC=gcc
		export AR=gcc_ar
		export AS=gcc_as
		export CPP=gcc_cpp
	;;
esac

unset comp_val

#	the leading ';' means check CWD first. ksh doesn't do this by default
#	unlike init.prg ( this is intentional! )

export PATH=";d:/unix;d:/bin;d:/etc;d:/bin/cmd;${compiler_bin};d:/mgr/bin"
