aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2024-11-20 12:27:10 -0700
committerJohn Denker <jsd@av8n.com>2024-11-21 08:35:12 -0700
commit046eda7708638d2dbef381b729e36f85c2e7c3da (patch)
treea4ddc62eb177e70e5fbb76de87a9db9e53938e30
parent0be351d631992b142fc6c275f8a582d6ef4ad9ad (diff)
choose compiler f95 f90 f77 depending on what's available
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
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 =