From 046eda7708638d2dbef381b729e36f85c2e7c3da Mon Sep 17 00:00:00 2001 From: John Denker Date: Wed, 20 Nov 2024 12:27:10 -0700 Subject: choose compiler f95 f90 f77 depending on what's available --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 57560d2..5cdd1ce 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,11 @@ RM = rm -f CC = CC -FC = f90 +# Find a suitable compiler: +FC := $(shell which f95 || which f90 || which f77) +ifeq ($(FC),) + $(error Fortran compiler not found; please fix $$FC in Makefile) +endif CFLAGS = -C INCLUDES = -- cgit v1.2.3