Skip to content

Commit

Permalink
Merge pull request #55 from rcnijzink/netcdf_extra
Browse files Browse the repository at this point in the history
added compiler flag for non-standard installation of netcdf-lib
  • Loading branch information
schymans authored Jan 15, 2020
2 parents a82c7bc + 728d4f6 commit f4ac5cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions VOM_Fortran/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ FC := /usr/bin/gfortran #compiler name and directory
SRC_PATH = ./src #path of source files
OBJ_PATH = ./tmp #path .o and .mod files

NFDIR := lib/


SRC_PATH := $(abspath $(SRC_PATH:~%=${HOME}%))
OBJ_PATH := $(abspath $(OBJ_PATH:~%=${HOME}%))
Expand All @@ -30,6 +30,7 @@ FCFLAGS =
FLFLAGS =

NC_INCLUDE=/usr/include
NC_LIB := /usr/lib/

#source objects
SRC = VOM-code/modules.f90 VOM-code/readdata.f90 VOM-code/writedata.f90 VOM-code/coreprog.f90 VOM-code/sample.f90 VOM-code/sce.f90 VOM-code/transpmodel.f90 VOM-code/watbal.f90
Expand All @@ -43,7 +44,7 @@ MSRC = *.mod
all: $(PROGRAM)

$(PROGRAM): $(SRC)
$(FC) -fopenmp -o $@ $^ -static-libgfortran -I${NC_INCLUDE} -lnetcdff; rm $(MSRC) #;mv $(MSRC) $(OBJ_PATH)
$(FC) -fopenmp -o $@ $^ -static-libgfortran -I${NC_INCLUDE} -L${NC_LIB} -lnetcdff; rm $(MSRC) #;mv $(MSRC) $(OBJ_PATH)
# $(FC) -o $@ $^ -I${NFDIR}/include -L${NFDIR}/lib -static ;mv $(MSRC) $(OBJ_PATH)
%.o: %.f
$(FC) -o $@ $<
Expand Down

0 comments on commit f4ac5cd

Please sign in to comment.