# a makefile - redoes all compiles if any update is needed.

#ask: ask.f getmodel.f locate.f rfits.f
#	f77 ask.f getmodel.f locate.f rfits.f \
#        -o ask ../fitsio/libfitsio.a -lm

NULLO=
LOBJS=\
$(FLIB)(getmodel.o) \
$(FLIB)(locate.o) \
$(FLIB)(rfits.o) \
$(NULLO)
#############################################################################
#       flags for Sun Fortran compilers
FFLAGS=-O
#FFLAGS=-O -u
#       flags for Silicon Graphics Fortran compilers (IRIX > v3.2)
#FFLAGS=-O -u -static -old_rl
#       flags for the IBM AIX xlf "Fortran" compiler
#FFLAGS=-O -u -qcharlen=2880
#       flags for HP 700 series Fortran compilersk, HPUX8.05
#       thanks to elwin@gamma.phys.clemson.edu (Lawrence E. Brown)
#FFLAGS= -O -K -u
########
#       name of the object library
FLIB=libinterp.a
################################
#       This rule actually makes the object archive (library)
$(FLIB): $(LOBJS)
	ranlib $(FLIB)
	make install
# comment out the ranlib statement if compiling under Solaris, or,
# heck, just let it go and ignore the error message.
################################
install: $(FLIB) ask.f
	f77 $(FFLAGS) ask.f -o ask $(FLIB) /usr/a/www/export/fitsio/libfitsio.sol.a -lm
	/bin/rm -f ../ask
	mv ask ../ask
