From 16b99ce0be49b2689c8ae1230c402039f044e656 Mon Sep 17 00:00:00 2001 From: Karl Smith Date: Thu, 25 Apr 2019 16:02:26 +0000 Subject: [PATCH 1/3] Change F77 to FC; defined CC, FC (and LD for ext func) in site_specific.mk files git-svn-id: file:///home/users/tmap/svn/repos/ferret/trunk@26198 fdbf22ae-c210-0410-be80-ca943da6b8f8 --- bin/build_fonts/original/unix/Makefile | 2 +- bin/build_fonts/unix/Makefile | 4 ++-- external_functions/cat/Makefile | 2 +- external_functions/closest_in_list/Makefile | 2 +- external_functions/cmprsi_by/Makefile | 2 +- external_functions/contributed/Makefile | 2 +- external_functions/convolve/Makefile | 2 +- external_functions/date_and_time/Makefile | 2 +- external_functions/decimate/Makefile | 2 +- .../platform_specific.mk.i386-linux | 4 ---- .../ef_utility/platform_specific.mk.intel-mac | 4 ---- .../platform_specific.mk.x86_64-linux | 4 ---- .../ef_utility/site_specific.mk.in | 19 +++++++++++++++++++ external_functions/eof/Makefile | 2 +- external_functions/examples/Makefile | 2 +- external_functions/extrema/Makefile | 4 ++-- .../featurecollections/Makefile | 2 +- external_functions/fft/Makefile | 4 ++-- external_functions/godae_obs/Makefile | 2 +- external_functions/gridding/Makefile | 4 ++-- external_functions/hinterp/Makefile | 4 ++-- external_functions/lanczos/Makefile | 2 +- external_functions/las/Makefile | 4 ++-- external_functions/ncedit/Makefile | 4 ++-- external_functions/obs_viz/Makefile | 2 +- external_functions/pnpoly/Makefile | 4 ++-- external_functions/romea/Makefile | 2 +- external_functions/sort/Makefile | 4 ++-- external_functions/statistics/Makefile | 4 ++-- external_functions/stringfcns/Makefile | 4 ++-- external_functions/tax_times/Makefile | 2 +- external_functions/transpose/Makefile | 2 +- external_functions/v5d/Makefile | 2 +- external_functions/zaxr/Makefile | 2 +- platform_specific.mk.i386-linux | 3 --- platform_specific.mk.intel-mac | 3 --- platform_specific.mk.x86_64-linux | 3 --- site_specific.mk.in | 9 +++++++++ 38 files changed, 69 insertions(+), 62 deletions(-) diff --git a/bin/build_fonts/original/unix/Makefile b/bin/build_fonts/original/unix/Makefile index 6d6429f94..98603cd9c 100644 --- a/bin/build_fonts/original/unix/Makefile +++ b/bin/build_fonts/original/unix/Makefile @@ -2,7 +2,7 @@ # binary: binary.f - $(F77) $(FFLAGS) -o binary binary.f + $(FC) $(FFLAGS) -o binary binary.f binary fnt01a.chr font01 binary fnt02a.chr font02 binary fnt03a.chr font03 diff --git a/bin/build_fonts/unix/Makefile b/bin/build_fonts/unix/Makefile index 23e620a8b..cfa58ce13 100644 --- a/bin/build_fonts/unix/Makefile +++ b/bin/build_fonts/unix/Makefile @@ -4,7 +4,7 @@ # builds and runs the executable to write the # binary character and symbol font files. # Just use long lists of files. -# Expects environment variables F77 and PLOTFONTS to be defined. +# Expects environment variables FC and PLOTFONTS to be defined. # No need for any compiler flags. include ../../../site_specific.mk @@ -13,7 +13,7 @@ include ../../../platform_specific.mk.$(BUILDTYPE) all: binary binary: binary.F - $(F77) $(FFLAGS) -o binary binary.F + $(FC) $(FFLAGS) -o binary binary.F ./binary in_fnt01a.chr fnt01.chr ./binary in_fnt02a.chr fnt02.chr ./binary in_fnt03a.chr fnt03.chr diff --git a/external_functions/cat/Makefile b/external_functions/cat/Makefile index 2b9201ea8..cbb74441d 100644 --- a/external_functions/cat/Makefile +++ b/external_functions/cat/Makefile @@ -21,7 +21,7 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE) # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $(SYSLIBS) $*.o -o $*.so # diff --git a/external_functions/closest_in_list/Makefile b/external_functions/closest_in_list/Makefile index 929e843c8..90cd9d6cf 100644 --- a/external_functions/closest_in_list/Makefile +++ b/external_functions/closest_in_list/Makefile @@ -21,7 +21,7 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE) # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $(SYSLIBS) $*.o -o $*.so # diff --git a/external_functions/cmprsi_by/Makefile b/external_functions/cmprsi_by/Makefile index 4f83aa0bf..951bf93b1 100644 --- a/external_functions/cmprsi_by/Makefile +++ b/external_functions/cmprsi_by/Makefile @@ -26,7 +26,7 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE) # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $(SYSLIBS) $*.o -o $*.so # diff --git a/external_functions/contributed/Makefile b/external_functions/contributed/Makefile index f92496efd..e29cb4e97 100644 --- a/external_functions/contributed/Makefile +++ b/external_functions/contributed/Makefile @@ -29,7 +29,7 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE) # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $(SYSLIBS) $*.o -o $*.so # diff --git a/external_functions/convolve/Makefile b/external_functions/convolve/Makefile index 3f4db2da5..1d6616aba 100644 --- a/external_functions/convolve/Makefile +++ b/external_functions/convolve/Makefile @@ -24,7 +24,7 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE) # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $(SYSLIBS) $*.o -o $*.so # diff --git a/external_functions/date_and_time/Makefile b/external_functions/date_and_time/Makefile index 35ee085f2..54b295478 100644 --- a/external_functions/date_and_time/Makefile +++ b/external_functions/date_and_time/Makefile @@ -34,7 +34,7 @@ DAT_OBJS = date_decode.o time_decode.o secs_to_ymdhms.o $(LD) $(LD_DYN_FLAGS) $(DAT_OBJS) $*.o -o $*.so .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $(DAT_OBJS) $*.o -o $*.so # diff --git a/external_functions/decimate/Makefile b/external_functions/decimate/Makefile index 0e067a7c1..43cdcfb55 100644 --- a/external_functions/decimate/Makefile +++ b/external_functions/decimate/Makefile @@ -19,7 +19,7 @@ SUB_OBJS = piecewise_subs.o # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $(SYSLIBS) $(SUB_OBJS) $*.o -o $*.so # diff --git a/external_functions/ef_utility/platform_specific.mk.i386-linux b/external_functions/ef_utility/platform_specific.mk.i386-linux index 9730d70b3..5d8fb3033 100644 --- a/external_functions/ef_utility/platform_specific.mk.i386-linux +++ b/external_functions/ef_utility/platform_specific.mk.i386-linux @@ -7,16 +7,12 @@ INCLUDES = -I. -I../ef_utility -I../ef_utility/ferret_cmn -CC = $(shell which gcc) CFLAGS = -fPIC -m32 -O -Ddouble_p $(INCLUDES) -FC = $(shell which gfortran) -F77 = $(shell which gfortran) FFLAGS = -fPIC -m32 -O -Ddouble_p -fno-second-underscore \ -fno-backslash -fdollar-ok -ffixed-line-length-132 \ -fdefault-real-8 -fdefault-double-8 -malign-double $(INCLUDES) -LD = $(shell which gfortran) LD_DYN_FLAGS = -fPIC -m32 -shared SYSLIBS = diff --git a/external_functions/ef_utility/platform_specific.mk.intel-mac b/external_functions/ef_utility/platform_specific.mk.intel-mac index 6726c20b3..b8a960609 100644 --- a/external_functions/ef_utility/platform_specific.mk.intel-mac +++ b/external_functions/ef_utility/platform_specific.mk.intel-mac @@ -7,16 +7,12 @@ INCLUDES = -I. -I../ef_utility -I../ef_utility/ferret_cmn -CC = $(shell which clang) CFLAGS = -fPIC -O -Ddouble_p $(INCLUDES) -FC = $(shell which gfortran) -F77 = $(shell which gfortran) FFLAGS = -fPIC -O -Ddouble_p -fno-second-underscore \ -fno-backslash -fdollar-ok -ffixed-line-length-132 \ -fdefault-real-8 -fdefault-double-8 $(INCLUDES) -LD = $(shell which gfortran) LD_DYN_FLAGS = -fPIC -bundle -static-libgfortran -Wl,-bundle_loader,$(FER_DIR)/bin/ferret -Wl,-commons,use_dylibs SYSLIBS = diff --git a/external_functions/ef_utility/platform_specific.mk.x86_64-linux b/external_functions/ef_utility/platform_specific.mk.x86_64-linux index 3cd14be57..a8342585e 100644 --- a/external_functions/ef_utility/platform_specific.mk.x86_64-linux +++ b/external_functions/ef_utility/platform_specific.mk.x86_64-linux @@ -7,16 +7,12 @@ INCLUDES = -I. -I../ef_utility -I../ef_utility/ferret_cmn -CC = $(shell which gcc) CFLAGS = -fPIC -m64 -O -Ddouble_p $(INCLUDES) -FC = $(shell which gfortran) -F77 = $(shell which gfortran) FFLAGS = -fPIC -m64 -O -Ddouble_p -fno-second-underscore \ -fno-backslash -fdollar-ok -ffixed-line-length-132 \ -fdefault-real-8 -fdefault-double-8 $(INCLUDES) -LD = $(shell which gfortran) LD_DYN_FLAGS = -fPIC -m64 -shared SYSLIBS = diff --git a/external_functions/ef_utility/site_specific.mk.in b/external_functions/ef_utility/site_specific.mk.in index 397f7dd85..2fdef9c65 100644 --- a/external_functions/ef_utility/site_specific.mk.in +++ b/external_functions/ef_utility/site_specific.mk.in @@ -10,3 +10,22 @@ BUILDTYPE = x86_64-linux ## Installation directory for the locally built external functions FER_LOCAL_EXTFCNS = $(FER_DIR)/ext_func/libs +## ========================= +## C and Fortran compilers to use. The construct "$(shell which gcc)" assigns +## the response to "which gcc" run from a Bourne shell (such as bash). +## When compiling for Mac OS X, one may wish to use clang instead of gcc. +## ========================= +# CC = $(shell which clang) +CC = $(shell which gcc) +FC = $(shell which gfortran) + +## ========================= +## Linker used to generate executables and shared-object libraries. +## Normally the Fortran compiler is used which then calls the actual +## linker with appropriate flags and system-level Fortran libraries. +## The construct "$(shell which gfortran)" assigns the response to +## "which gfortran" run from a Bourne shell (such as bash). +## ========================= +LD = $(shell which gfortran) + +## diff --git a/external_functions/eof/Makefile b/external_functions/eof/Makefile index 2aec90ccd..df5395e34 100644 --- a/external_functions/eof/Makefile +++ b/external_functions/eof/Makefile @@ -34,7 +34,7 @@ SUB_OBJS = eofsubs.o # once eof_space etc are linked into Ferret dont need SUB_OBJS .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $*.o -o $*.so # diff --git a/external_functions/examples/Makefile b/external_functions/examples/Makefile index df8218dc6..6a591df6e 100644 --- a/external_functions/examples/Makefile +++ b/external_functions/examples/Makefile @@ -27,7 +27,7 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE) # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $(SYSLIBS) $*.o -o $*.so # diff --git a/external_functions/extrema/Makefile b/external_functions/extrema/Makefile index 134b58146..694b56d74 100644 --- a/external_functions/extrema/Makefile +++ b/external_functions/extrema/Makefile @@ -27,10 +27,10 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE) # .F.o: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $(SYSLIBS) $*.o minminmax.o maxminmax.o -o $*.so # diff --git a/external_functions/featurecollections/Makefile b/external_functions/featurecollections/Makefile index f356e06be..814aa7fbd 100644 --- a/external_functions/featurecollections/Makefile +++ b/external_functions/featurecollections/Makefile @@ -17,7 +17,7 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE) # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $(SYSLIBS) $*.o -o $*.so # diff --git a/external_functions/fft/Makefile b/external_functions/fft/Makefile index 5c5169a78..6b1813660 100644 --- a/external_functions/fft/Makefile +++ b/external_functions/fft/Makefile @@ -9,7 +9,7 @@ # remove refs to ef_utility/*.o (now in ferret executable) # # 2/2001 debug macros -# 1/2002 need $(F77) in .F.so rule +# 1/2002 need $(FC) in .F.so rule # and compile ffta_sample, fftp_sample functions # 7/2012 Do not need a special platform_specific file. # @@ -32,7 +32,7 @@ SUB_OBJS = fftinv_subs.o # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $(SUB_OBJS) $*.o -o $*.so # diff --git a/external_functions/godae_obs/Makefile b/external_functions/godae_obs/Makefile index fd4662306..e2f9a0657 100644 --- a/external_functions/godae_obs/Makefile +++ b/external_functions/godae_obs/Makefile @@ -31,7 +31,7 @@ GOB_OBJS = ocn_obs.o $(LD) $(LD_DYN_FLAGS) $(GOB_OBJS) $*.o -o $*.so .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $(GOB_OBJS) $*.o -o $*.so # diff --git a/external_functions/gridding/Makefile b/external_functions/gridding/Makefile index 333ca357b..6484c2511 100644 --- a/external_functions/gridding/Makefile +++ b/external_functions/gridding/Makefile @@ -29,14 +29,14 @@ SUB_OBJS = modscatminmax.o nobsxytv.o scat2grid_subs_mask.o # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $(SUB_OBJS) $(SYSLIBS) $*.o -o $*.so .c.o: $(CC) $(CFLAGS) -c $< .F.o: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< # # Targets diff --git a/external_functions/hinterp/Makefile b/external_functions/hinterp/Makefile index ae13c061d..d85072ce8 100644 --- a/external_functions/hinterp/Makefile +++ b/external_functions/hinterp/Makefile @@ -28,14 +28,14 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE) # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $*.o -o $*.so .c.o: $(CC) $(CFLAGS) -c $< .F.o: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< # # Targets diff --git a/external_functions/lanczos/Makefile b/external_functions/lanczos/Makefile index 9b84358a3..20ff2d020 100644 --- a/external_functions/lanczos/Makefile +++ b/external_functions/lanczos/Makefile @@ -23,7 +23,7 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE) # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $(SYSLIBS) $*.o -o $*.so # diff --git a/external_functions/las/Makefile b/external_functions/las/Makefile index c72915da3..67b394ad0 100644 --- a/external_functions/las/Makefile +++ b/external_functions/las/Makefile @@ -28,14 +28,14 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE) # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $*.o -o $*.so .c.o: $(CC) $(CFLAGS) -c $< .F.o: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< # # Targets diff --git a/external_functions/ncedit/Makefile b/external_functions/ncedit/Makefile index e719a3958..19e8abf96 100644 --- a/external_functions/ncedit/Makefile +++ b/external_functions/ncedit/Makefile @@ -28,11 +28,11 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE) # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $*.o -o $*.so .F.o: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< # # Targets diff --git a/external_functions/obs_viz/Makefile b/external_functions/obs_viz/Makefile index 775f925bc..e4f3402b6 100644 --- a/external_functions/obs_viz/Makefile +++ b/external_functions/obs_viz/Makefile @@ -27,7 +27,7 @@ DAT_OBJS = flag2ddups.o $(LD) $(LD_DYN_FLAGS) $(DAT_OBJS) $*.o -o $*.so .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $(DAT_OBJS) $*.o -o $*.so # diff --git a/external_functions/pnpoly/Makefile b/external_functions/pnpoly/Makefile index 364bdcaf3..6031a4821 100644 --- a/external_functions/pnpoly/Makefile +++ b/external_functions/pnpoly/Makefile @@ -20,14 +20,14 @@ SUB_OBJS = pnpoly_subs.o # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $(SUB_OBJS) $*.o -o $*.so .c.o: $(CC) $(CFLAGS) -c $< .F.o: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< # # Targets diff --git a/external_functions/romea/Makefile b/external_functions/romea/Makefile index ad97e0362..9b00a0f14 100644 --- a/external_functions/romea/Makefile +++ b/external_functions/romea/Makefile @@ -27,7 +27,7 @@ SUB_OBJS = rr_density.o # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $(SYSLIBS) $(SUB_OBJS) $*.o -o $*.so # diff --git a/external_functions/sort/Makefile b/external_functions/sort/Makefile index 013aafa8b..5cf54d1e7 100644 --- a/external_functions/sort/Makefile +++ b/external_functions/sort/Makefile @@ -28,14 +28,14 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE) # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $*.o -o $*.so .c.o: $(CC) $(CFLAGS) -c $< .F.o: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< # # Targets diff --git a/external_functions/statistics/Makefile b/external_functions/statistics/Makefile index ae2b5c125..98ea24b7f 100644 --- a/external_functions/statistics/Makefile +++ b/external_functions/statistics/Makefile @@ -28,14 +28,14 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE) # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $*.o -o $*.so .c.o: $(CC) $(CFLAGS) -c $< .F.o: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< # # Targets diff --git a/external_functions/stringfcns/Makefile b/external_functions/stringfcns/Makefile index 0082c3ce7..217b5c7f6 100644 --- a/external_functions/stringfcns/Makefile +++ b/external_functions/stringfcns/Makefile @@ -29,14 +29,14 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE) # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $*.o -o $*.so .c.o: $(CC) $(CFLAGS) -c $< .F.o: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< # # Targets diff --git a/external_functions/tax_times/Makefile b/external_functions/tax_times/Makefile index 7aba102e8..ff85aeeb4 100644 --- a/external_functions/tax_times/Makefile +++ b/external_functions/tax_times/Makefile @@ -24,7 +24,7 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE) # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $(SYSLIBS) $*.o -o $*.so # diff --git a/external_functions/transpose/Makefile b/external_functions/transpose/Makefile index 326bba3f8..d6efd596a 100644 --- a/external_functions/transpose/Makefile +++ b/external_functions/transpose/Makefile @@ -28,7 +28,7 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE) # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $(SYSLIBS) $*.o -o $*.so # diff --git a/external_functions/v5d/Makefile b/external_functions/v5d/Makefile index 377b75d97..257960ea4 100644 --- a/external_functions/v5d/Makefile +++ b/external_functions/v5d/Makefile @@ -31,7 +31,7 @@ V5D_OBJS = binio.o v5d.o $(CC) $(V5DFLAGS) $(CFLAGS) -c $< .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $(V5D_OBJS) $*.o -o $*.so # diff --git a/external_functions/zaxr/Makefile b/external_functions/zaxr/Makefile index 154a34f01..06795f123 100644 --- a/external_functions/zaxr/Makefile +++ b/external_functions/zaxr/Makefile @@ -26,7 +26,7 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE) # .F.so: - $(F77) $(FFLAGS) -c $< + $(FC) $(FFLAGS) -c $< $(LD) $(LD_DYN_FLAGS) $*.o -o $*.so # diff --git a/platform_specific.mk.i386-linux b/platform_specific.mk.i386-linux index 89bd16c66..bf36fb984 100644 --- a/platform_specific.mk.i386-linux +++ b/platform_specific.mk.i386-linux @@ -54,9 +54,6 @@ endif PLATFORM = $(shell uname -s -r) 32-bit - CC = $(shell which gcc) - FC = $(shell which gfortran) - F77 = $(shell which gfortran) AR = $(shell which ar) RANLIB = $(shell which ranlib) diff --git a/platform_specific.mk.intel-mac b/platform_specific.mk.intel-mac index e071d96a6..8dcb93c0b 100644 --- a/platform_specific.mk.intel-mac +++ b/platform_specific.mk.intel-mac @@ -56,9 +56,6 @@ endif PLATFORM = $(shell uname -s -r) - CC = $(shell which clang) - FC = $(shell which gfortran) - F77 = $(shell which gfortran) AR = $(shell which ar) RANLIB = $(shell which ranlib) diff --git a/platform_specific.mk.x86_64-linux b/platform_specific.mk.x86_64-linux index 170962755..a965580db 100644 --- a/platform_specific.mk.x86_64-linux +++ b/platform_specific.mk.x86_64-linux @@ -54,9 +54,6 @@ endif PLATFORM = $(shell uname -s -r) 64-bit - CC = $(shell which gcc) - FC = $(shell which gfortran) - F77 = $(shell which gfortran) AR = $(shell which ar) RANLIB = $(shell which ranlib) diff --git a/site_specific.mk.in b/site_specific.mk.in index 579f57838..c168759ba 100644 --- a/site_specific.mk.in +++ b/site_specific.mk.in @@ -28,6 +28,15 @@ BUILDTYPE = x86_64-linux INSTALL_FER_DIR = $(HOME)/Ferret # INSTALL_FER_DIR = $(FER_DIR) +## ========================= +## C and Fortran compilers to use. The construct "$(shell which gcc)" assigns +## the response to "which gcc" run from a Bourne shell (such as bash). +## When compiling for Mac OS X, one may wish to use clang instead of gcc. +## ========================= +# CC = $(shell which clang) +CC = $(shell which gcc) +FC = $(shell which gfortran) + ## ========================= ## Directory containing the HDF5 static libraries. ## If given and not empty, HDF5 and NetCDF static libraries will be used. From c7d8e8c31b0d7c158adefa8e06dbcf0e4991de80 Mon Sep 17 00:00:00 2001 From: Karl Smith Date: Thu, 25 Apr 2019 16:18:28 +0000 Subject: [PATCH 2/3] Add more comments about CC, FC, and LD in site_specific.mk files git-svn-id: file:///home/users/tmap/svn/repos/ferret/trunk@26199 fdbf22ae-c210-0410-be80-ca943da6b8f8 --- external_functions/ef_utility/site_specific.mk.in | 4 ++++ site_specific.mk.in | 2 ++ 2 files changed, 6 insertions(+) diff --git a/external_functions/ef_utility/site_specific.mk.in b/external_functions/ef_utility/site_specific.mk.in index 2fdef9c65..86614bb00 100644 --- a/external_functions/ef_utility/site_specific.mk.in +++ b/external_functions/ef_utility/site_specific.mk.in @@ -14,6 +14,8 @@ FER_LOCAL_EXTFCNS = $(FER_DIR)/ext_func/libs ## C and Fortran compilers to use. The construct "$(shell which gcc)" assigns ## the response to "which gcc" run from a Bourne shell (such as bash). ## When compiling for Mac OS X, one may wish to use clang instead of gcc. +## If you wish to use values already defined in you shell environment when +## you run make, comment out all definitions of CC and FC (do NOT leave blank). ## ========================= # CC = $(shell which clang) CC = $(shell which gcc) @@ -25,6 +27,8 @@ FC = $(shell which gfortran) ## linker with appropriate flags and system-level Fortran libraries. ## The construct "$(shell which gfortran)" assigns the response to ## "which gfortran" run from a Bourne shell (such as bash). +## If you wish to use a value already defined in you shell environment when +## you run make, comment out all definitions of LD (do NOT leave blank). ## ========================= LD = $(shell which gfortran) diff --git a/site_specific.mk.in b/site_specific.mk.in index c168759ba..c3e402c6b 100644 --- a/site_specific.mk.in +++ b/site_specific.mk.in @@ -32,6 +32,8 @@ INSTALL_FER_DIR = $(HOME)/Ferret ## C and Fortran compilers to use. The construct "$(shell which gcc)" assigns ## the response to "which gcc" run from a Bourne shell (such as bash). ## When compiling for Mac OS X, one may wish to use clang instead of gcc. +## If you wish to use values already defined in you shell environment when +## you run make, comment out all definitions of CC and FC (do NOT leave blank). ## ========================= # CC = $(shell which clang) CC = $(shell which gcc) From 62134356f25fdd7d5fa5f866a5b57cd061006ad9 Mon Sep 17 00:00:00 2001 From: Karl Smith Date: Thu, 25 Apr 2019 16:33:41 +0000 Subject: [PATCH 3/3] Update the README.md with site_specific.mk info and other tweaks git-svn-id: file:///home/users/tmap/svn/repos/ferret/trunk@26200 fdbf22ae-c210-0410-be80-ca943da6b8f8 --- README.md | 70 +++++++++++++++++++++++++++---------------------------- 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 90a8b4ed9..89717a9d2 100644 --- a/README.md +++ b/README.md @@ -1,50 +1,48 @@ # Ferret -The Ferret program from NOAA/PMEL. -This repository is regularly synchronized with Ferret repository at PMEL -(the trunk of the ferret project in the subversion repository at PMEL) +The Ferret program from NOAA/PMEL. +See [https://ferret.pmel.noaa.gov/Ferret/](https://ferret.pmel.noaa.gov/Ferret/) +for more information about Ferret and PyFerret. + +This repository is regularly synchronized with Ferret repository at PMEL +(the trunk of the ferret project in the subversion repository at PMEL) using git-svn. #### Legal Disclaimer -*This repository is a software product and is not official communication -of the National Oceanic and Atmospheric Administration (NOAA), or the -United States Department of Commerce (DOC). All NOAA GitHub project -code is provided on an 'as is' basis and the user assumes responsibility -for its use. Any claims against the DOC or DOC bureaus stemming from -the use of this GitHub project will be governed by all applicable Federal -law. Any reference to specific commercial products, processes, or services -by service mark, trademark, manufacturer, or otherwise, does not constitute -or imply their endorsement, recommendation, or favoring by the DOC. -The DOC seal and logo, or the seal and logo of a DOC bureau, shall not -be used in any manner to imply endorsement of any commercial product +*This repository is a software product and is not official communication +of the National Oceanic and Atmospheric Administration (NOAA), or the +United States Department of Commerce (DOC). All NOAA GitHub project +code is provided on an 'as is' basis and the user assumes responsibility +for its use. Any claims against the DOC or DOC bureaus stemming from +the use of this GitHub project will be governed by all applicable Federal +law. Any reference to specific commercial products, processes, or services +by service mark, trademark, manufacturer, or otherwise, does not constitute +or imply their endorsement, recommendation, or favoring by the DOC. +The DOC seal and logo, or the seal and logo of a DOC bureau, shall not +be used in any manner to imply endorsement of any commercial product or activity by the DOC or the United States Government.* ## Ferret Documentation -For more information on using Ferret, see the Ferret documentation under -[http://ferret.pmel.noaa.gov/Ferret/](http://ferret.pmel.noaa.gov/Ferret/) +For more information on using Ferret, see the Ferret documentation under +[https://ferret.pmel.noaa.gov/Ferret/](https://ferret.pmel.noaa.gov/Ferret/) Information about the Ferret email users group, and archives of past discussions -from the group (which should be searched prior to sending a question to the email -users group) can be found at -[http://ferret.pmel.noaa.gov/Ferret/email-users-group](http://ferret.pmel.noaa.gov/Ferret/email-users-group) +from the group (which should be searched prior to sending a question to the email +users group) can be found at +[https://ferret.pmel.noaa.gov/Ferret/email-users-group](https://ferret.pmel.noaa.gov/Ferret/email-users-group) ## If you build Ferret from these source files, please note: -The `site_specific.mk` and `external_functions/ef_utilites/site_specific.mk` -files in the repository have been renamed with a `.in` appended to the name. -You must copy these files with the `.in` extensions to create files with the -`site_specific.mk` name and edit the contents to configure these for your -system. The `site_specific.mk` files will be ignored by git (the name was -added to `.gitignore`) so your customized configuration files will not be -added to your repository if you have cloned this repository. - -#### The `site_specific.mk.in` configuration template file changed April, 2018. - -Library directories are now specified instead of installation directories -for NetCDF, HDF5, ReadLine, and SZ, with the makefile environment names -changing from `..._DIR` to `..._LIBDIR`. -The `include` directories, if needed, are assumed to be sibling directories -to these library directories. -You may wish to create a new `site_specific.mk` configuration file -from this updated configuration template file. +The `site_specific.mk.in` and `external_functions/ef_utilites/site_specific.mk.in` +files in the repository must be copied to files without the `.in` extensions, and +the contents of these `site_specific.mk` files edited for your system configuration. +The `site_specific.mk` files will be ignored by git (the name was added to +`.gitignore`) so your customized configuration files will not be added to your +repository if you have cloned this repository. + +The definitions of CC, FC, and LD (the last only for building external +functions written in Fortran) were moved to the `site_specific.mk.in` files. +(These were previously defined in the `platform_specific.mk.*` files.) +If you already have customized `site_specific.mk` files, please appropriately +updated your customized files with these additional definitions.