Skip to content

Commit

Permalink
Change F77 to FC; defined CC, FC (and LD for ext func) in site_specif…
Browse files Browse the repository at this point in the history
…ic.mk files; update README.md with info on these changes

git-svn-id: file:///home/users/tmap/svn/repos/ferret/branches/pyferret@26201 fdbf22ae-c210-0410-be80-ca943da6b8f8
  • Loading branch information
karlmsmith committed Apr 25, 2019
1 parent 53acff4 commit f4ebd4d
Show file tree
Hide file tree
Showing 40 changed files with 191 additions and 134 deletions.
153 changes: 79 additions & 74 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions bin/build_fonts/unix/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion external_functions/cat/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE)
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $*.o $(SYSLIBS) -o $*.so

#
Expand Down
2 changes: 1 addition & 1 deletion external_functions/closest_in_list/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE)
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $*.o $(SYSLIBS) -o $*.so

#
Expand Down
2 changes: 1 addition & 1 deletion external_functions/cmprsi_by/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE)
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $*.o $(SYSLIBS) -o $*.so

#
Expand Down
2 changes: 1 addition & 1 deletion external_functions/contributed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE)
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $*.o $(SYSLIBS) -o $*.so

#
Expand Down
2 changes: 1 addition & 1 deletion external_functions/convolve/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE)
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $*.o $(SYSLIBS) -o $*.so

#
Expand Down
2 changes: 1 addition & 1 deletion external_functions/date_and_time/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ DAT_OBJS = date_decode.o time_decode.o secs_to_ymdhms.o
$(LD) $(LD_DYN_FLAGS) $(DAT_OBJS) $*.o $(SYSLIBS) -o $*.so

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $(DAT_OBJS) $*.o $(SYSLIBS) -o $*.so

#
Expand Down
2 changes: 1 addition & 1 deletion external_functions/decimate/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SUB_OBJS = piecewise_subs.o
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $(SUB_OBJS) $*.o $(SYSLIBS) -o $*.so

#
Expand Down
4 changes: 0 additions & 4 deletions external_functions/ef_utility/platform_specific.mk.i386-linux
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,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 -Wl,--no-undefined
SYSLIBS = ../ef_utility/copy_ferret_ef_mem_subsc.o \
-L$(INSTALL_FER_DIR)/lib/$(PYTHON_EXE)/site-packages/pyferret \
Expand Down
4 changes: 0 additions & 4 deletions external_functions/ef_utility/platform_specific.mk.intel-mac
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,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 -O $(INCLUDES)

LD = $(shell which gfortran)
LD_DYN_FLAGS = -fPIC -bundle -undefined dynamic_lookup
SYSLIBS = ../ef_utility/copy_ferret_ef_mem_subsc.o

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,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 -O $(INCLUDES)

LD = $(shell which gfortran)
LD_DYN_FLAGS = -fPIC -m64 -shared -Wl,--no-undefined
# Some compilers add an OS spec between libpyferret and .so
# This also takes care of whether to use lib or lib64
Expand Down
22 changes: 22 additions & 0 deletions external_functions/ef_utility/site_specific.mk.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,28 @@ BUILDTYPE = x86_64-linux
# INSTALL_FER_DIR = $(HOME)/PyFerret
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.
## 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)
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).
## 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)

## =========================
## Python version used by PyFerret
## =========================
Expand Down
2 changes: 1 addition & 1 deletion external_functions/eof/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,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 $(SYSLIBS) -o $*.so

#
Expand Down
2 changes: 1 addition & 1 deletion external_functions/examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE)
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $*.o $(SYSLIBS) -o $*.so

#
Expand Down
4 changes: 2 additions & 2 deletions external_functions/extrema/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,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) $*.o minminmax.o maxminmax.o $(SYSLIBS) -o $*.so

#
Expand Down
2 changes: 1 addition & 1 deletion external_functions/featurecollections/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE)
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $*.o $(SYSLIBS) -o $*.so

#
Expand Down
4 changes: 2 additions & 2 deletions external_functions/fft/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -37,7 +37,7 @@ SUB_OBJS = fftinv_subs.o fftsubs.o
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $(SUB_OBJS) $*.o $(SYSLIBS) -o $*.so

#
Expand Down
2 changes: 1 addition & 1 deletion external_functions/godae_obs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ GOB_OBJS = ocn_obs.o
$(LD) $(LD_DYN_FLAGS) $(GOB_OBJS) $*.o $(SYSLIBS) -o $*.so

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $(GOB_OBJS) $*.o $(SYSLIBS) -o $*.so

#
Expand Down
5 changes: 4 additions & 1 deletion external_functions/gridding/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ SUB_OBJS = modscatminmax.o nobsxytv.o scat2grid_subs_mask.o
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $(SUB_OBJS) $*.o $(SYSLIBS) -o $*.so

.F.o:
$(FC) $(FFLAGS) -c $<

#
# Targets
#
Expand Down
8 changes: 7 additions & 1 deletion external_functions/hinterp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,15 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE)
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $*.o $(SYSLIBS) -o $*.so

.c.o:
$(CC) $(CFLAGS) -c $<

.F.o:
$(FC) $(FFLAGS) -c $<

#
# Targets
#
Expand Down
2 changes: 1 addition & 1 deletion external_functions/lanczos/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE)
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $*.o $(SYSLIBS) -o $*.so

#
Expand Down
8 changes: 7 additions & 1 deletion external_functions/las/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,15 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE)
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $*.o $(SYSLIBS) -o $*.so

.c.o:
$(CC) $(CFLAGS) -c $<

.F.o:
$(FC) $(FFLAGS) -c $<

#
# Targets
#
Expand Down
5 changes: 4 additions & 1 deletion external_functions/ncedit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE)
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $*.o $(SYSLIBS) -o $*.so

.F.o:
$(FC) $(FFLAGS) -c $<

#
# Targets
#
Expand Down
2 changes: 1 addition & 1 deletion external_functions/obs_viz/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ DAT_OBJS = flag2ddups.o
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $(DAT_OBJS) $*.o $(SYSLIBS) -o $*.so

#
Expand Down
8 changes: 7 additions & 1 deletion external_functions/pnpoly/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,15 @@ SUB_OBJS = pnpoly_subs.o
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $(SUB_OBJS) $*.o $(SYSLIBS) -o $*.so

.c.o:
$(CC) $(CFLAGS) -c $<

.F.o:
$(FC) $(FFLAGS) -c $<

#
# Targets
#
Expand Down
2 changes: 1 addition & 1 deletion external_functions/romea/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ SUB_OBJS = rr_density.o
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $(SUB_OBJS) $*.o $(SYSLIBS) -o $*.so

#
Expand Down
8 changes: 7 additions & 1 deletion external_functions/sort/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,15 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE)
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $*.o $(SYSLIBS) -o $*.so

.c.o:
$(CC) $(CFLAGS) -c $<

.F.o:
$(FC) $(FFLAGS) -c $<

#
# Targets
#
Expand Down
8 changes: 7 additions & 1 deletion external_functions/statistics/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE)
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $*.o $(SYSLIBS) -o $*.so

.c.o:
$(CC) $(CFLAGS) -c $<

.F.o:
$(FC) $(FFLAGS) -c $<

#
# Targets
#
Expand Down
8 changes: 7 additions & 1 deletion external_functions/stringfcns/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,15 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE)
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $*.o $(SYSLIBS) -o $*.so

.c.o:
$(CC) $(CFLAGS) -c $<

.F.o:
$(FC) $(FFLAGS) -c $<

#
# Targets
#
Expand Down
2 changes: 1 addition & 1 deletion external_functions/tax_times/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ include ../ef_utility/platform_specific.mk.$(BUILDTYPE)
#

.F.so:
$(F77) $(FFLAGS) -c $<
$(FC) $(FFLAGS) -c $<
$(LD) $(LD_DYN_FLAGS) $*.o $(SYSLIBS) -o $*.so

#
Expand Down
Loading

0 comments on commit f4ebd4d

Please sign in to comment.