# Makefile for JETTO fortran 90 library 'gray' # Author: Lorenzo Figini (figini@ifp.cnr.it) # # Derived from # Makefile for JETTO fortran 77 library 'frantic' # Author: Derek Harting (d.harting@fz-juelich.de) # and # Makefile for ITCequ Fortran 90 library - definitions # P. Strand, elfps@chalmers.se # G. Corrigan, gcor@jet.uk # D. Harting, d.harting@fz-juelich.de # Set the environment from the top-level Makefile of JETTO # -------------------------------------------------------- include ../include.mk # Alternative search paths vpath %.f90 src DIRECTIVES = -DEXTBES -DREVISION="rev.164 JETTO" #'$(shell svnversion src)'" # library name # ------------ LIBNAME=$(JLIBDIR)/libgray.a # List source and object files # ---------------------------- FSRC=$(wildcard src/*.f90) FOBJ0=$(subst src/,,$(FSRC)) FOBJ=$(FOBJ0:.f90=.o) ######################################## # Set up compiler specific environment # ######################################## # set default compiler # -------------------- FC=$(F90) # Set compiler debug and optimization flags # ----------------------------------------- ifeq ("$(DBG)","") FFLAGS= $(AUTO) -O3 -Mpreprocess # FFLAGS=-O3 -cpp else FFLAGS= $(AUTO) -O0 -Mpreprocess -g -Minform=inform -Mbounds -Mchkptr # FFLAGS=-Wall -g -finit-real=nan -ffpe-trap=invalid -fcheck=all -fbounds-check endif # Set include directories # ----------------------- #INC=-I$(JCOMMON_STD) INC= ##################################### # Set up RULES specific environment # ##################################### # suffixes # -------- .SUFFIXES: .f90 .o .mod # PHONY targets # ------------- .PHONY: all clean realclean $(MASTER_RULES) gray # default target # -------------- all: @($(MAKE) -C ../ all) || exit $$? # Set rules passed to top-level Makefile # -------------------------------------- $(MASTER_RULES): @($(MAKE) -C ../ $@) || exit $$? # rule for libgray.a # -------------------- $(LIBNAME): $(FOBJ) ar vr $(LIBNAME) $? # synonym for libgray.a # ----------------------- gray: $(LIBNAME) # create rule for compiling f90 files # ----------------------------------- %.o: %.f90 $(FC) -c $(DIRECTIVES) $(FFLAGS) $(INC) $< # make 'realclean' option # ----------------------- realclean: rm -f *.o *.mod $(LIBNAME) # make 'clean' option # ------------------- clean: rm -f *.o # Dependencies # ------------ gray_jetto1beam.o: const_and_precisions.o beams.o graycore.o gray_params.o \ reflections.o units.o graycore.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