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
|
|
|
|
#
|
|
|
|
FFLAGS += -D${COMPILER}
|
|
|
|
|
2008-12-08 15:31:35 -06:00
|
|
|
# number of dimensions
|
|
|
|
#
|
|
|
|
FFLAGS += -DNDIMS=${NDIMS}
|
2008-11-04 13:08:01 -06:00
|
|
|
|
2008-12-08 15:31:35 -06:00
|
|
|
# output data format
|
|
|
|
#
|
|
|
|
FFLAGS += -D${OUTPUT}
|
2008-11-04 13:08:01 -06:00
|
|
|
|
2010-10-11 01:39:15 -03:00
|
|
|
# compression
|
|
|
|
#
|
2011-03-26 13:31:52 -03:00
|
|
|
ifneq ($(COMPRESS),NONE)
|
|
|
|
FFLAGS += -DCOMPRESS -D${COMPRESS}
|
2010-10-11 01:39:15 -03:00
|
|
|
endif
|
|
|
|
|
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
|
|
|
|
|
2012-07-28 12:12:35 -03:00
|
|
|
sources = blocks.F90 boundaries.F90 constants.F90 coordinates.F90 domains.F90 \
|
2013-12-11 18:09:35 -02:00
|
|
|
driver.F90 equations.F90 error.F90 evolution.F90 integrals.F90 \
|
2014-05-28 18:09:35 -03:00
|
|
|
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
|
2012-07-28 12:12:35 -03:00
|
|
|
objects = blocks.o boundaries.o constants.o coordinates.o domains.o driver.o \
|
2013-12-11 18:09:35 -02:00
|
|
|
equations.o error.o evolution.o integrals.o interpolations.o io.o \
|
2014-05-28 18:09:35 -03:00
|
|
|
mesh.o mpitools.o operators.o parameters.o problems.o random.o \
|
|
|
|
refinement.o schemes.o shapes.o sources.o timers.o
|
2012-07-28 12:12:35 -03:00
|
|
|
files = $(sources) makefile make.default license.txt hosts
|
2008-11-04 13:08:01 -06:00
|
|
|
|
|
|
|
$(name).x: $(objects)
|
|
|
|
$(LD) $(LDFLAGS) $(objects) $(LIBS) -o $(name).x
|
|
|
|
|
|
|
|
arch: $(files)
|
|
|
|
tar czvf $(name)-$(DATE).tar.gz $(files)
|
|
|
|
|
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
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
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 \
|
2014-01-02 17:00:40 -02:00
|
|
|
interpolations.o mpitools.o timers.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 \
|
2013-12-11 18:09:35 -02:00
|
|
|
integrals.o interpolations.o io.o mesh.o mpitools.o \
|
2014-05-28 18:21:16 -03:00
|
|
|
operators.o parameters.o problems.o random.o refinement.o \
|
2014-04-29 18:35:58 -03:00
|
|
|
schemes.o shapes.o sources.o
|
2014-01-02 12:06:35 -02:00
|
|
|
equations.o : equations.F90 coordinates.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
|
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
|
2014-01-02 12:12:16 -02:00
|
|
|
interpolations.o : interpolations.F90 blocks.o coordinates.o 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
|
2012-07-27 16:40:06 -03:00
|
|
|
mpitools.o : mpitools.F90 timers.o
|
2014-05-28 18:09:35 -03:00
|
|
|
operators.o : operators.F90
|
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 \
|
2014-02-07 13:57:28 -02:00
|
|
|
error.o parameters.o random.o timers.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 \
|
2013-12-26 18:04:02 -02:00
|
|
|
parameters.o timers.o
|
2014-01-02 12:32:19 -02:00
|
|
|
schemes.o : schemes.F90 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 \
|
|
|
|
parameters.o timers.o
|
2014-05-29 12:04:55 -03:00
|
|
|
sources.o : sources.F90 blocks.o coordinates.o equations.o operators.o \
|
|
|
|
parameters.o timers.o
|
2012-07-27 16:40:06 -03:00
|
|
|
timers.o : timers.F90
|
2008-11-04 13:08:01 -06:00
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|