57 lines
1.1 KiB
Plaintext
57 lines
1.1 KiB
Plaintext
#-------------------------------------------------------------------------------
|
|
#
|
|
# depending on the compilation flags choose the right compilers and options
|
|
#
|
|
#-------------------------------------------------------------------------------
|
|
#
|
|
#
|
|
#-------------------------------------------------------------------------------
|
|
#
|
|
# compiler and linker setup
|
|
#
|
|
ifeq ($(MPI),Y)
|
|
FC = mpif90
|
|
else
|
|
FC = gfortran
|
|
endif
|
|
LD = $(FC)
|
|
|
|
# preprocessor prefix (used by IBM Fortran, e.g.)
|
|
#
|
|
CPPPREFIX =
|
|
|
|
# compiler and linker flags
|
|
#
|
|
ifeq ($(DEBUG),Y)
|
|
FFLAGS = -g -O2 $(CPPPREFIX)-DDEBUG
|
|
else
|
|
FFLAGS = -O2
|
|
endif
|
|
|
|
LDFLAGS = $(FFLAGS)
|
|
|
|
# libraries
|
|
#
|
|
LIBS =
|
|
|
|
#-------------------------------------------------------------------------------
|
|
#
|
|
ifeq ($(STATIC),Y)
|
|
LDFLAGS += -static
|
|
endif
|
|
|
|
ifeq ($(SIGNALS),Y)
|
|
FFLAGS += $(CPPPREFIX)-DSIGNALS
|
|
endif
|
|
|
|
ifeq ($(MPI),Y)
|
|
FFLAGS += $(CPPPREFIX)-DMPI
|
|
endif
|
|
|
|
ifeq ($(OUTPUT),HDF5)
|
|
FFLAGS += -I/usr/include
|
|
LIBS += -lhdf5_fortran -lhdf5 -lz
|
|
endif
|
|
#
|
|
#-------------------------------------------------------------------------------
|