#! /bin/sh
set -x

LIBNAME=libf
export LIBNAME

rm -f ${LIBNAME}.a

ls | grep '.f$' | xargs f77 -c

ls | grep '.o$' | lorder | tsort | xargs ar cq ${LIBNAME}.a

ranlib ${LIBNAME}.a

ls | grep '.o$' | xargs rm -f

