57 lines
1.1 KiB
Plaintext
Raw Normal View History

#-------------------------------------------------------------------------------
#
# depending on the compilation flags choose the right compilers and options
#
#-------------------------------------------------------------------------------
#
2008-12-08 13:59:57 -06:00
#
#-------------------------------------------------------------------------------
#
# 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
#
2008-12-08 13:59:57 -06:00
ifeq ($(DEBUG),Y)
FFLAGS = -g -O2 $(CPPPREFIX)-DDEBUG
2008-12-08 13:59:57 -06:00
else
FFLAGS = -O2
2008-12-08 13:59:57 -06:00
endif
LDFLAGS = $(FFLAGS)
# libraries
#
LIBS =
2008-12-08 13:59:57 -06:00
#-------------------------------------------------------------------------------
#
ifeq ($(STATIC),Y)
LDFLAGS += -static
endif
2011-04-29 15:01:06 -03:00
ifeq ($(SIGNALS),Y)
FFLAGS += $(CPPPREFIX)-DSIGNALS
2011-04-29 15:01:06 -03:00
endif
2008-12-08 13:59:57 -06:00
ifeq ($(MPI),Y)
FFLAGS += $(CPPPREFIX)-DMPI
2008-12-08 13:59:57 -06:00
endif
ifeq ($(OUTPUT),HDF5)
FFLAGS += -I/usr/include
LIBS += -lhdf5_fortran -lhdf5 -lz
endif
#
#-------------------------------------------------------------------------------