#! /bin/sh
###############################################################################
#                                                                             #
#                          Network Job Control (NJC)                          #
#                                                                             #
#                             G E T M A C H I N E                             #
#                                 getmachine                                  #
#                                                                             #
#                    Copyright (c) Joerg-R. Hill, April 1992                  #
#                                                                             #
###############################################################################
#
# This shell script adapts the Makefile in dependence
# of the machine and the operating system you use.
# It is called from 'make queuec/queued/submit' before
# the compiler is invoked.
#

case `uname -s` in
#
# This is an IBM RS/6000
#
  AIX)   echo 'OPT=-O' > makefile
         echo 'INST=.ibm' >> makefile
         echo 'DEFS=-DAIX' >> makefile
         echo 'CURSES=-lcurses' >> makefile
         ;;
#
# This is a SGI
#
  IRIX*) echo 'OPT=-O2' > makefile
         echo 'INST=.iris' >> makefile
         echo 'DEFS=-DIRIX' >> makefile
         echo 'CURSES=-lcurses' >> makefile
	   ;;
#
# This is Linux
#
  Linux) echo 'OPT=-O2 -Wall -m486 -fomit-frame-pointer' > makefile
	   echo 'INST=.linux' >> makefile
	   echo 'DEFS=-DLINUX' >> makefile
	   echo 'CURSES=-lncurses' >> makefile
	   ;;
#
# This is an unknown operating system
#
  *)     echo "Sorry, I don't know the operating system '$os'."
         echo "You have to set the options by hand."
         exit 1
         ;;
esac
cat Makefile >> makefile
