CCL Home Page
Up Directory CCL makeit
#!/bin/sh
#
#
# script to make program "steric"
#
#

STERICHOME=/usr/local/steric
#STERICHOME=.

PROGNAME=steric
CC=cc
#CC=gcc
LINK=${CC}
DEFINES=-DSTERICHOME='"${STERICHOME}"'

CFLAGS='-O2 -ansi'

LIBES=-lm 

FILES=steric steric.err steric.hlp steric.par steric.ini steric.grp steric.TeX \
	steric mapcont mapprof contplot profplot sterplot long_steric


OBJECTS='stermain.o sterfile.o stergrp.o stertext.o stergrap.o steraid.o
 stercomm.o stermem.o stercalc.o vectors.o crystal.o craig.o proja.o 
 integrat.o leach.o sterover.o'

SOURCE='stermain.c sterfile.c stergrp.c stertext.c stergrap.c steraid.c
 stercomm.c stermem.c stercalc.c vectors.c crystal.c craig.c proja.c
 integrat.c leach.c sterover.c'

SUCCESS=yes

for file in ${SOURCE}
do
  if test -f ${file} ; then
    ofile=`echo ${file} | awk -F. '{printf "%s.o",$1}'`
    echo "${CC} ${CFLAGS} -c ${file} -o ${ofile}"
    ${CC} ${CFLAGS} -c ${file} -o ${ofile}
  else
    echo "Unable to find file ${file}, is source listing correct?"
  fi
  if ! test -f ${ofile} ; then
    echo "Unable to find file ${ofile}, error in compile?"
    SUCCESS=no
  fi
done

if test "${SUCCESS}"="yes" ; then
   echo "${LINK} ${CFLAGS} -o ${PROGNAME} ${OBJECTS} ${LIBES}"
  ${LINK} ${CFLAGS} -o ${PROGNAME} ${OBJECTS} ${LIBES}
fi

echo "${LINK} ${CFLAGS} -o mapcont mapcont.c -lm"
${LINK} ${CFLAGS} -o mapcont mapcont.c -lm
echo "${LINK} ${CFLAGS} -o mapprof mapprof.c -lm"
${LINK} ${CFLAGS} -o mapprof mapprof.c -lm

echo "Installing files in ${STERICHOME}
if [ ! -d ${STERICHOME} ] ; then mkdir ${STERICHOME} ; fi
cp ${FILES} ${STERICHOME}

echo "Done."
Modified: Fri Dec 8 17:00:00 1995 GMT
Page accessed 4904 times since Sat Apr 17 21:59:45 1999 GMT