CCL Home Page
Up Directory CCL Makefile
########################################################################
#
# make description file for program "steric"
#
########################################################################

# uncomment this line if you wish to include
# the RYAN MULTIPLE OVERLAP SOLID ANGLE in addition to
# the CRAIG MULTIPLE OVERLAP SOLID ANGLE (included by default)
#RYAN=y

# uncomment this line if you wish to have a debugging version
#DEBUG=y

# uncomment this line if you wish to optimize for intel (-m486)
INTEL=y

# uncomment this if using the GNU gcc compiler
USE_GCC=y

# where to install steric.
STERICHOME=/usr/local/steric

# platform to compile on
PLATFORM=linux
#PLATFORM=sgi

########################################################################
# nothing more to comfigure
########################################################################

ifdef RYAN
CDEF:=-DRYAN
endif

CDEB=-O2
ifdef DEBUG
CDEB:=-g -DDEBUG
endif

ifdef INTEL
CINT:=-m486
endif

ifdef USE_GCC
CC:=gcc
GCFLAGS:=-ansi -Wall -Wstrict-prototypes
else
CC:=cc
GCFLAGS:=-ansi
endif

SHELL=/bin/sh
ECHO=/bin/echo
CP=/bin/cp
MV=/bin/mv
RM=/bin/rm -f
MKDIR=/bin/mkdir
CHMOD=/bin/chmod
LS=ls -l
RMDIR=/bin/rm -r
AWK=/bin/awk
GZIP=/usr/local/bin/gzip -v
COMPRESS=/usr/bin/compress -v
TAR=/bin/tar
BC=/bin/bc
CAT=/bin/cat
SED=/bin/sed

ifeq (${PLATFORM},linux)
RMDIR=/bin/rm -R
AWK=/usr/bin/awk
GZIP=/bin/gzip -v
COMPRESS=/bin/compress -v
BC=/usr/bin/bc
SED=/usr/bin/sed
endif
ifeq (${PLATFORM},sgi)
COMPRESS=/usr/bsd/compress -v
endif

PROGNAME=steric
VERSION=$(shell ${AWK} '/\#define VERSION/{print $$3}' sterdefn.h)
VERNUM=$(shell ${ECHO} "scale=2 ; ${VERSION}/100" | ${BC})

CFLAGS=${GCFLAGS} ${CDEF} ${CDEB} ${CINT}
LINK=${CC}
MAKE=/usr/bin/make
LIBES=-lm 
DEFINES=-DSTERICHOME='"${STERICHOME}"'

MFILES=Makefile Makefile.sgi makeit

XFILES=README.steric test.bgf test.inp

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

MAIN_O=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

RYAN_O=ryan.o ryan_quad.o ryan_perm.o

MAIN_S=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

RYAN_S=ryan.c ryan_quad.c ryan_perm.c

X_SRC=mapcont.c mapprof.c

HEADERS=sterdefn.h sterfile.h stergrp.h stertext.h stergrap.h steraid.h \
	stercomm.h stermem.h stercalc.h vectors.h crystal.h craig.h proja.h \
	integrat.h leach.h sterover.h stererr.h ryan.h ryan_perm.h ryan_quad.h 

OBJECTS=${MAIN_O}
ifdef RYAN
OBJECTS=${MAIN_O} ${RYAN_O}
endif

SOURCE=${MAIN_S} ${RYAN_S}

.SUFFIXES:
.SUFFIXES: .o .c .h

.c.o:
	${CC} ${CFLAGS} ${DEFINES} -c $<

all: steric cont

backup: all back backup_all backup_bin

back:
	@if [ -d ./back ] ; then ${RMDIR} ./back ; fi
	@${MKDIR} ./back

backup_all:
	@${ECHO} "Making backup of steric version ${VERNUM} in ./back"
	@if [ ! -d ./back/steric ] ; then ${MKDIR} ./back/steric ; fi
	@${CP} ${FILES} ${XFILES} ${MFILES} ${SOURCE} ${HEADERS} ${X_SRC} ./back/steric
	@cd ./back ; ${TAR} cvf steric_${VERNUM}.tar steric
	@${ECHO} "Compressing with ${COMPRESS}"
	@${CAT} ./back/steric_${VERNUM}.tar | ${COMPRESS} > ./back/steric_${VERNUM}.tar.Z
	@${ECHO} "Compressing with ${GZIP}"
	@${CAT} ./back/steric_${VERNUM}.tar | ${GZIP} > ./back/steric_${VERNUM}.tar.gz
	@${RMDIR} ./back/steric ./back/steric_${VERNUM}.tar
	@${LS} ./back

backup_bin:
	@${ECHO} "Making backup of steric ${PLATFORM} binaries version ${VERNUM} in ./back"
	@if [ ! -d ./back/steric ] ; then ${MKDIR} ./back/steric ; fi
	@${CP} ${FILES} ${XFILES} ./back/steric
	@cd ./back ; ${TAR} cvf steric_${VERNUM}_${PLATFORM}_bin.tar steric
	@${ECHO} "Compressing with ${COMPRESS}"
	@${CAT} ./back/steric_${VERNUM}_${PLATFORM}_bin.tar | ${COMPRESS} > ./back/steric_${VERNUM}_${PLATFORM}_bin.tar.Z
	@${ECHO} "Compressing with ${GZIP}"
	@${CAT} ./back/steric_${VERNUM}_${PLATFORM}_bin.tar | ${GZIP} > ./back/steric_${VERNUM}_${PLATFORM}_bin.tar.gz
	@${RMDIR} ./back/steric ./back/steric_${VERNUM}_${PLATFORM}_bin.tar
	@${LS} ./back

steric:	${OBJECTS}
	${LINK} ${CFLAGS} -o ${PROGNAME} ${OBJECTS} ${LIBES}

cont: mapcont mapprof

mapcont: mapcont.o
	${LINK} ${CFLAGS} -o mapcont mapcont.o -lm

mapprof: mapprof.o
	${LINK} ${CFLAGS} -o mapprof mapprof.o -lm

clean:
	${RM} ${PROGNAME} *~ *.o core mapprof mapcont

install: all
	@${ECHO}
	@if test ${STERICHOME} = "./" ; then \
	  ${ECHO} "Current directory specified for installation, nothing will be done" ; \
	elif test ${STERICHOME} = "." ; then \
	  ${ECHO} "Current directory specified for installation, nothing will be done" ; \
	else \
	  ${ECHO} "Installing steric to directory ${STERICHOME}" ; \
	  if [ ! -d ${STERICHOME} ] ; then ${MKDIR} ${STERICHOME} ; fi ; \
	  ${CP} ${FILES} ${STERICHOME} ; \
	  ${ECHO} "Remember to put ${STERICHOME} in you path before running steric" ; \
	fi


# Dependancies

crystal.o : crystal.c sterdefn.h stercomm.h crystal.h stermem.h stertext.h \
	stergrp.h steraid.h stercalc.h craig.h
craig.o : craig.c sterdefn.h integrat.h stermem.h steraid.h stercalc.h \
	stertext.h craig.h
proja.o : proja.c sterdefn.h integrat.h stermem.h steraid.h stercalc.h \
	stertext.h proja.h craig.h
integrat.o : integrat.c integrat.h
leach.o : leach.c sterdefn.h integrat.h stermem.h steraid.h stercalc.h \
	stertext.h craig.h
steraid.o : steraid.c sterdefn.h steraid.h stertext.h
stercalc.o : stercalc.c sterdefn.h stercomm.h sterfile.h stercalc.h \
	stermem.h stertext.h steraid.h craig.h proja.h leach.h \
	sterover.h ryan.h
stercomm.o : stercomm.c stercomm.h steraid.h stertext.h stererr.h
sterfile.o : sterfile.c sterdefn.h crystal.h stercomm.h sterfile.h \
	stermem.h stertext.h stergrp.h steraid.h stercalc.h craig.h
stergrap.o : stergrap.c sterdefn.h stergrap.h stermem.h steraid.h \
	stertext.h stercomm.h stercalc.h
stergrp.o : stergrp.c sterdefn.h stercomm.h stermem.h stertext.h \
	steraid.h stergrp.h
stermain.o : stermain.c sterdefn.h stercomm.h stercalc.h stermem.h \
	sterfile.h stertext.h steraid.h stergrap.h stergrp.h
stermem.o : stermem.c sterdefn.h stermem.h steraid.h stercomm.h stertext.h
sterover.o : sterover.c sterdefn.h stercomm.h stercalc.h craig.h \
	sterover.h stermem.h stertext.h steraid.h
stertext.o : stertext.c sterdefn.h stertext.h
vectors.o : vectors.c vectors.h

ryan.o : ryan.c sterdefn.h stermem.h stertext.h ryan.h ryan_nsa.c
ryan_quad.o : ryan_quad.c
ryan_perm.o : ryan_perm.c

# end of makefile for program "steric"
Modified: Fri Dec 8 17:00:00 1995 GMT
Page accessed 5358 times since Sat Apr 17 21:59:42 1999 GMT