2008-11-04 13:08:01 -06:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# include configuration
|
|
|
|
#
|
|
|
|
$(info )
|
2013-12-10 11:58:26 -02:00
|
|
|
ifeq ($(wildcard make.config),make.config)
|
|
|
|
$(info Using customized file 'make.config'.)
|
2008-11-04 13:08:01 -06:00
|
|
|
$(info )
|
|
|
|
include make.config
|
|
|
|
else
|
2013-12-10 11:58:26 -02:00
|
|
|
$(warning Could not find customized file 'make.config'!)
|
2008-11-04 13:08:01 -06:00
|
|
|
$(info )
|
2013-12-10 11:58:26 -02:00
|
|
|
$(info File 'make.default' is an example with all available compilation time \
|
|
|
|
options. You can modify it, but it is better to copy it to a new file \
|
|
|
|
'make.config' and then customize it. This will also make disappear \
|
|
|
|
the following 15 second pause every time you compile.)
|
2008-11-04 13:08:01 -06:00
|
|
|
$(info )
|
2013-12-10 11:58:26 -02:00
|
|
|
$(shell sleep 15)
|
2008-11-04 13:08:01 -06:00
|
|
|
include make.default
|
|
|
|
endif
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
#
|
2013-12-10 11:58:26 -02:00
|
|
|
# host name
|
2008-11-04 13:08:01 -06:00
|
|
|
#
|
2013-12-10 11:58:26 -02:00
|
|
|
HOST := $(shell hostname)
|
2008-11-04 13:08:01 -06:00
|
|
|
|
|
|
|
include hosts/default
|
|
|
|
ifeq ($(wildcard hosts/$(HOST)),hosts/$(HOST))
|
2013-12-10 11:58:26 -02:00
|
|
|
$(info Using customized compiler setup from 'hosts/$(HOST)' file.)
|
2008-11-04 13:08:01 -06:00
|
|
|
$(info )
|
|
|
|
include hosts/$(HOST)
|
2013-12-10 11:58:26 -02:00
|
|
|
else
|
|
|
|
$(info Using default compiler setup from file 'hosts/default'. \
|
|
|
|
Do not modify it!)
|
|
|
|
$(info Instead, copy this file to 'hosts/$(HOST)' and customize compilers and \
|
|
|
|
compilation options there. This will also get rid of the following \
|
|
|
|
15 second pause every time you compile.)
|
|
|
|
$(info )
|
|
|
|
$(shell sleep 15)
|
2008-11-04 13:08:01 -06:00
|
|
|
endif
|
|
|
|
|
2010-02-28 18:35:57 -03:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# check flag conditions
|
|
|
|
#
|
|
|
|
|
2008-11-04 13:08:01 -06:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
#
|
2008-12-08 15:31:35 -06:00
|
|
|
# pass additional flags to the compiler
|
2008-11-04 13:08:01 -06:00
|
|
|
#
|
2011-06-07 16:51:52 -03:00
|
|
|
# compiler
|
|
|
|
#
|
2014-08-04 09:26:36 -03:00
|
|
|
FFLAGS += ${CPPPREFIX}-D${COMPILER}
|
2011-06-07 16:51:52 -03:00
|
|
|
|
2008-12-08 15:31:35 -06:00
|
|
|
# number of dimensions
|
|
|
|
#
|
2014-08-04 09:26:36 -03:00
|
|
|
FFLAGS += ${CPPPREFIX}-DNDIMS=${NDIMS}
|
2008-11-04 13:08:01 -06:00
|
|
|
|
2008-12-08 15:31:35 -06:00
|
|
|
# output data format
|
|
|
|
#
|
2014-08-04 09:26:36 -03:00
|
|
|
FFLAGS += ${CPPPREFIX}-D${OUTPUT}
|
2008-11-04 13:08:01 -06:00
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
.SUFFIXES:
|
|
|
|
.SUFFIXES: .F90 .o
|
|
|
|
|
|
|
|
.F90.o:
|
|
|
|
$(FC) -c $(FFLAGS) $*.F90
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2011-04-25 13:44:34 -03:00
|
|
|
name = amun
|
2008-11-04 13:08:01 -06:00
|
|
|
|
|
|
|
default: $(name).x
|
|
|
|
|
2015-02-14 20:47:04 -02:00
|
|
|
sources = algebra.F90 blocks.F90 boundaries.F90 constants.F90 coordinates.F90 \
|
|
|
|
domains.F90 driver.F90 equations.F90 error.F90 evolution.F90 \
|
2017-03-03 18:15:15 -03:00
|
|
|
gravity.F90 integrals.F90 interpolations.F90 io.F90 mesh.F90 \
|
|
|
|
mpitools.F90 operators.F90 parameters.F90 problems.F90 random.F90 \
|
|
|
|
refinement.F90 schemes.F90 shapes.F90 sources.F90 timers.F90 \
|
2017-03-08 11:02:59 -03:00
|
|
|
user_problem.F90 utils.F90
|
|
|
|
|
2015-02-14 20:47:04 -02:00
|
|
|
objects = algebra.o blocks.o boundaries.o constants.o coordinates.o domains.o \
|
2017-03-03 18:15:15 -03:00
|
|
|
driver.o equations.o error.o evolution.o gravity.o integrals.o \
|
2015-02-14 20:47:04 -02:00
|
|
|
interpolations.o io.o mesh.o mpitools.o operators.o parameters.o \
|
|
|
|
problems.o random.o refinement.o schemes.o shapes.o sources.o \
|
2017-03-08 11:02:59 -03:00
|
|
|
timers.o user_problem.o utils.o
|
2008-11-04 13:08:01 -06:00
|
|
|
|
|
|
|
$(name).x: $(objects)
|
|
|
|
$(LD) $(LDFLAGS) $(objects) $(LIBS) -o $(name).x
|
|
|
|
|
2011-02-28 16:08:20 -03:00
|
|
|
clean-bak:
|
|
|
|
rm -rf *.bak *~
|
2008-11-04 13:08:01 -06:00
|
|
|
|
2011-02-28 16:08:20 -03:00
|
|
|
clean-data:
|
|
|
|
rm -rf *.dat *.h5
|
|
|
|
|
|
|
|
clean-exec:
|
|
|
|
rm -rf *.x
|
|
|
|
|
2011-04-28 12:04:22 -03:00
|
|
|
clean-logs:
|
|
|
|
rm -rf *.log
|
|
|
|
|
2011-02-28 16:08:20 -03:00
|
|
|
clean-modules:
|
|
|
|
rm -rf *.mod
|
|
|
|
|
|
|
|
clean-objects:
|
|
|
|
rm -rf *.o
|
|
|
|
|
|
|
|
clean: clean-bak clean-modules clean-objects
|
|
|
|
|
2011-04-28 12:04:22 -03:00
|
|
|
clean-all: clean-bak clean-data clean-exec clean-logs clean-modules \
|
|
|
|
clean-objects
|
2008-11-04 13:08:01 -06:00
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2015-12-08 08:03:08 -02:00
|
|
|
algebra.o : algebra.F90 constants.o error.o
|
2014-01-15 08:42:50 -02:00
|
|
|
blocks.o : blocks.F90 error.o timers.o
|
2013-12-10 21:36:35 -02:00
|
|
|
boundaries.o : boundaries.F90 blocks.o coordinates.o equations.o error.o \
|
2017-03-08 11:46:41 -03:00
|
|
|
gravity.o interpolations.o mpitools.o timers.o \
|
|
|
|
user_problem.o
|
2012-07-27 16:40:06 -03:00
|
|
|
constants.o : constants.F90
|
|
|
|
coordinates.o : coordinates.F90 parameters.o
|
2012-07-28 12:12:35 -03:00
|
|
|
driver.o : driver.F90 blocks.o coordinates.o equations.o evolution.o \
|
2017-03-03 18:15:15 -03:00
|
|
|
gravity.o integrals.o interpolations.o io.o mesh.o \
|
|
|
|
mpitools.o operators.o parameters.o problems.o random.o \
|
2017-03-08 11:02:59 -03:00
|
|
|
refinement.o schemes.o shapes.o sources.o user_problem.o
|
2018-01-16 09:57:23 -02:00
|
|
|
equations.o : equations.F90 algebra.o coordinates.o error.o parameters.o \
|
|
|
|
timers.o
|
2012-07-27 16:40:06 -03:00
|
|
|
error.o : error.F90
|
2012-07-28 11:47:14 -03:00
|
|
|
evolution.o : evolution.F90 blocks.o boundaries.o coordinates.o \
|
2014-02-07 12:12:27 -02:00
|
|
|
equations.o mesh.o mpitools.o parameters.o schemes.o \
|
2014-04-29 18:35:58 -03:00
|
|
|
shapes.o sources.o
|
2012-07-27 21:37:57 -03:00
|
|
|
domains.o : domains.F90 blocks.o boundaries.o coordinates.o parameters.o
|
2017-03-08 11:02:59 -03:00
|
|
|
gravity.o : gravity.F90 parameters.o timers.o user_problem.o
|
2014-01-10 12:42:18 -02:00
|
|
|
integrals.o : integrals.F90 blocks.o coordinates.o equations.o error.o \
|
|
|
|
evolution.o mpitools.o parameters.o timers.o
|
2015-12-08 08:21:39 -02:00
|
|
|
interpolations.o : interpolations.F90 algebra.o blocks.o coordinates.o error.o \
|
2014-08-07 19:03:58 -03:00
|
|
|
parameters.o timers.o
|
2013-12-10 21:36:35 -02:00
|
|
|
io.o : io.F90 blocks.o coordinates.o equations.o error.o \
|
2014-01-08 16:53:26 -02:00
|
|
|
evolution.o mesh.o mpitools.o random.o refinement.o timers.o
|
2013-12-10 21:36:35 -02:00
|
|
|
mesh.o : mesh.F90 blocks.o coordinates.o domains.o equations.o \
|
2013-12-27 17:37:13 -02:00
|
|
|
error.o interpolations.o mpitools.o problems.o refinement.o \
|
|
|
|
timers.o
|
2014-12-03 21:47:41 -02:00
|
|
|
mpitools.o : mpitools.F90 error.o timers.o
|
2014-09-19 07:34:04 -03:00
|
|
|
operators.o : operators.F90 timers.o
|
2012-07-27 16:40:06 -03:00
|
|
|
parameters.o : parameters.F90 mpitools.o
|
2013-12-12 16:09:47 -02:00
|
|
|
problems.o : problems.F90 blocks.o constants.o coordinates.o equations.o \
|
2017-03-08 11:02:59 -03:00
|
|
|
error.o parameters.o random.o timers.o user_problem.o
|
2014-04-29 18:35:58 -03:00
|
|
|
random.o : random.F90 mpitools.o parameters.o
|
2013-12-10 21:36:35 -02:00
|
|
|
refinement.o : refinement.F90 blocks.o coordinates.o equations.o \
|
2014-09-23 11:24:52 -03:00
|
|
|
operators.o parameters.o timers.o
|
2015-02-14 23:08:32 -02:00
|
|
|
schemes.o : schemes.F90 algebra.o coordinates.o equations.o \
|
|
|
|
interpolations.o timers.o
|
2014-02-07 13:50:17 -02:00
|
|
|
shapes.o : shapes.F90 blocks.o constants.o coordinates.o equations.o \
|
2017-03-08 11:02:59 -03:00
|
|
|
parameters.o timers.o user_problem.o
|
2017-03-06 11:12:25 -03:00
|
|
|
sources.o : sources.F90 blocks.o coordinates.o equations.o gravity.o \
|
2017-03-08 11:10:22 -03:00
|
|
|
operators.o parameters.o timers.o user_problem.o
|
2012-07-27 16:40:06 -03:00
|
|
|
timers.o : timers.F90
|
2017-03-08 12:59:56 -03:00
|
|
|
user_problem.o : user_problem.F90 blocks.o constants.o coordinates.o \
|
|
|
|
equations.o error.o operators.o parameters.o random.o \
|
|
|
|
timers.o
|
2015-05-27 15:34:23 -03:00
|
|
|
utils.o : utils.F90 error.o
|
2008-11-04 13:08:01 -06:00
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|