Commit 94106e26 authored by Gerald Klinkl's avatar Gerald Klinkl

Update Makefile to work with environment modules

parent efd26ca6
FC = gfortran
# Location of FLEXPART source directory
FLEXPART_SRC = ..
GRIBAPI = /opt/grib-api
HDF5 = /opt/hdf5-1.8.16
NETCDFF = /opt/netcdf-fortran-4.4.3
NETCDF = /opt/netcdf-c-4.4.0
#GRIBAPI = /usr/local/grib-api
#HDF5 = /usr/local/hdf5-1.8.16
#NETCDFF = /usr/local/netcdf-fortran-4.4.3
#NETCDF = /usr/local/netcdf-c-4.4.0
BINARY = grib2nc4
CMP_BINARY = nc4cmp
OBJS = processmetfields.o verttransform_grib2nc4_ecmwf.o verttransform_grib2nc4_gfs.o
FPMODOBJS = par_mod.o com_mod.o class_vtable_mod.o cmapf_mod.o conv_mod.o
FLXPRTOBJS = detectformat.o grib2check.o shift_field_0.o gridcheck.o \
FPMODOBJS_ = par_mod.o com_mod.o class_vtable_mod.o cmapf_mod.o conv_mod.o
FLXPRTOBJS_ = detectformat.o grib2check.o shift_field_0.o gridcheck.o \
readwind.o readwind_nests.o calcpar.o calcpar_nests.o \
shift_field.o pbl_profile.o scalev.o obukhov.o \
richardson.o ew.o getvdep.o calcpv.o obukhov_gfs.o \
......@@ -31,20 +19,20 @@ FLXPRTOBJS = detectformat.o grib2check.o shift_field_0.o gridcheck.o \
calcpar_gfs.o verttransform_gfs.o gridcheck_gfs.o
VPATH = ${FLEXPART_SRC}
FFLAGS = -mcmodel=medium
INCLUDES_NETCDF = -I${NETCDFF}/include
INCLUDES = -I${GRIBAPI}/include ${INCLUDES_NETCDF} -I${FLEXPART_SRC}
# VPATH = ${FLEXPART_SRC}
FPMODOBJS=$(FPMODOBJS_:%=$(FLEXPART_SRC)/%)
FLXPRTOBJS=$(FLXPRTOBJS_:%=$(FLEXPART_SRC)/%)
INCPATH = -I$(PREFIX)/include
LIBPATH = -L$(PREFIX)/lib
FFLAGS = -O2 -mcmodel=medium $(INCPATH) -I$(FLEXPART_SRC)
### NetCDF link flags - use the first one for dynamic libs, the second
### one for static libs
LDFLAGS_NETCDF = -L${NETCDFF}/lib -lnetcdff -L${NETCDF}/lib -lnetcdf
### LDFLAGS_NETCDF = -L${NETCDFF}/lib -lnetcdff -L${NETCDF}/lib -lnetcdf
#LDFLAGS_NETCDF=-static -L${NETCDFF}/lib -lnetcdff -L${NETCDF}/lib -lnetcdf -lnetcdf -L${HDF5}/lib -lhdf5_fortran -lhdf5_hl -lhdf5hl_fortran -lhdf5 -ldl -lz
LDFLAGS = -L${GRIBAPI}/lib -lgrib_api_f90 -lgrib_api ${LDFLAGS_NETCDF} -ljasper -L${FLEXPART_SRC}
### LDFLAGS = -L${GRIBAPI}/lib -lgrib_api_f90 -lgrib_api ${LDFLAGS_NETCDF} -ljasper -L${FLEXPART_SRC}
LDFLAGS = $(FFLAGS) $(LIBPATH) $(LIBPATH1) -lgrib_api_f90 -lgrib_api -ljasper -lnetcdff -lnetcdf -lnetcdf -lhdf5_hl -lhdf5 -ldl -lm -lcurl
#------------ Creating the binary ------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment