#!/bin/sh

#
#     Generate a list of object files that corresponds to the
#     list of Fortran ( .f ) files in the current directory
#
fc=`head -n1 ../../eta/src/configure/make.inc | awk '{print $3}'`
list=`ls *.f | grep '.f' `
for routine in $list
do
name=`echo $routine | cut -f1 -d.`
	if $fc -c -O -o $name.o $name.f
	then
	ar r ../bufrlib $name.o
	rm -f $name.o
	fi
done
