#! /bin/csh -f

#   This C shell script may be used to compile modules for the VX/MVX using
#   ordinary makefiles.

#   Copyright (C) 1992,1993  Richard Gooch
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#   Richard Gooch may be reached by email at  karma-request@atnf.csiro.au
#   The postal address is:
#     Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia.

if ("$?VXHOME" == "0") then
    echo "VXHOME not defined"
endif

setenv KARMABASE $KARMAVXMVXBASE
setenv KARMABINPATH $KARMAVXMVXBINPATH
setenv KARMALIBPATH $KARMAVXMVXLIBPATH
setenv KARMAINCLUDEPATH $KARMABASE/include
setenv KDEPLIB_KARMA $KARMALIBPATH/libkarma.a
setenv KDEPLIB_KARMAX11 $KARMALIBPATH/libkarmaX11.a
setenv KDEPLIB_KARMAXT $KARMALIBPATH/libkarmaXt.a
setenv KDEPLIB_KARMAXVIEW $KARMALIBPATH/libkarmaxview.a
setenv KDEPLIB_KARMAGRAPHICS $KARMALIBPATH/libkarmagraphics.a
setenv KDEPLIB_KARMAVX $KARMALIBPATH/libkarmavx.a

setenv KARMA_CC "vxcc"
setenv CC "vxcc"

setenv OS_LIBS "-ltask"
setenv TARGET_ARCH vx
setenv OS VXMVX
setenv MACHINE i860

if (-r GNUmakefile.vxmvx) then
    gmake -f GNUmakefile.vxmvx $argv
else
    gmake $argv
endif

chmod a+r $KARMABINPATH/*
