2017-09-13 11:31:30 +02:00
|
|
|
# Executable name
|
|
|
|
EXE=sumgray
|
|
|
|
|
|
|
|
# Objects list
|
|
|
|
MAINOBJ=main-sum.o
|
|
|
|
OTHOBJ= beamdata.o beams.o conical.o const_and_precisions.o coreprofiles.o \
|
|
|
|
dierckx.o dispersion.o eccd.o eierf.o errcodes.o sumcore.o \
|
|
|
|
gray_params.o equilibrium.o limiter.o magsurf_data.o math.o minpack.o numint.o \
|
|
|
|
pec.o polarization.o quadpack.o reflections.o simplespline.o units.o utils.o
|
|
|
|
|
|
|
|
# Alternative search paths
|
|
|
|
vpath %.f90 src
|
|
|
|
vpath %.f src
|
|
|
|
|
|
|
|
# Fortran compiler name and flags
|
|
|
|
FC=gfortran
|
|
|
|
FFLAGS=-O3
|
|
|
|
#FFLAGS=-Wall -g -finit-real=nan -ffpe-trap=invalid -fcheck=all -fbounds-check
|
|
|
|
|
2018-10-04 10:00:50 +02:00
|
|
|
DIRECTIVES = -DREVISION="'$(shell svnversion src)'"
|
2017-09-13 11:31:30 +02:00
|
|
|
|
|
|
|
all: $(EXE)
|
|
|
|
|
|
|
|
# Build executable from object files
|
|
|
|
$(EXE): $(MAINOBJ) $(OTHOBJ)
|
|
|
|
$(FC) $(FFLAGS) -o $@ $^
|
|
|
|
|
|
|
|
# Dependencies on modules
|
|
|
|
main-sum.o: const_and_precisions.o beams.o coreprofiles.o equilibrium.o \
|
|
|
|
sumcore.o gray_params.o reflections.o
|
|
|
|
sumcore.o: const_and_precisions.o beamdata.o beams.o coreprofiles.o \
|
|
|
|
dispersion.o eccd.o equilibrium.o errcodes.o gray_params.o \
|
|
|
|
pec.o polarization.o limiter.o units.o utils.o
|
|
|
|
beams.o: const_and_precisions.o dierckx.o reflections.o simplespline.o utils.o
|
|
|
|
beamdata.o: const_and_precisions.o gray_params.o
|
|
|
|
conical.o: const_and_precisions.o
|
|
|
|
coreprofiles.o: const_and_precisions.o dierckx.o gray_params.o simplespline.o \
|
|
|
|
utils.o
|
|
|
|
dierckx.o: const_and_precisions.o
|
|
|
|
dispersion.o: const_and_precisions.o eierf.o errcodes.o math.o quadpack.o
|
|
|
|
eccd.o: const_and_precisions.o conical.o dierckx.o errcodes.o magsurf_data.o \
|
|
|
|
numint.o
|
|
|
|
eierf.o: const_and_precisions.o
|
|
|
|
errcodes.o: const_and_precisions.o
|
|
|
|
gray_params.o: const_and_precisions.o utils.o
|
|
|
|
equilibrium.o: const_and_precisions.o dierckx.o limiter.o minpack.o \
|
|
|
|
reflections.o simplespline.o utils.o gray_params.o
|
|
|
|
magsurf_data.o: const_and_precisions.o gray_params.o equilibrium.o dierckx.o \
|
|
|
|
reflections.o simplespline.o units.o utils.o
|
|
|
|
math.o: const_and_precisions.o
|
|
|
|
minpack.o: const_and_precisions.o
|
|
|
|
numint.o: const_and_precisions.o
|
|
|
|
pec.o: const_and_precisions.o beamdata.o equilibrium.o gray_params.o \
|
|
|
|
magsurf_data.o utils.o
|
|
|
|
polarization.o: const_and_precisions.o
|
|
|
|
quadpack.o: const_and_precisions.o
|
|
|
|
reflections.o: const_and_precisions.o limiter.o utils.o
|
|
|
|
simplespline.o: const_and_precisions.o
|
|
|
|
utils.o: const_and_precisions.o
|
|
|
|
|
|
|
|
# General object compilation command
|
|
|
|
%.o: %.f90
|
|
|
|
$(FC) -cpp $(DIRECTIVES) $(FFLAGS) -c $<
|
|
|
|
|
|
|
|
.PHONY: clean install
|
|
|
|
# Remove output files
|
|
|
|
clean:
|
2018-10-04 10:00:50 +02:00
|
|
|
rm -rf *.o *.mod $(EXE)
|
2017-09-13 11:31:30 +02:00
|
|
|
|
|
|
|
install:
|
|
|
|
@if [ -f $(EXE) ]; then \
|
|
|
|
cp $(EXE) ~/bin/; \
|
|
|
|
else \
|
|
|
|
echo File $(EXE) does not exist. Run \'make\' first; \
|
|
|
|
fi
|