![]() |
ORB5
v4.9.4
|
Makefiles' operating principle and how to add a new one.
The philosophy is to use a main Makefile containing all commmon variables, rules and dependencies, and including a platform/user-specific Makefile containing the rest.
The libraries are built using the same flags as the rest of the code, i.e. sending $(FC), $(FFLAGS), ... to the Makefile_ORB5 files in the library folders.
Makefile.inc to set $(SITE) variable to your specific platform from hostname and dnsdomainname variables.Add a new file tools/make_configs/$(SITE).inc in which you set the following variables:
$(FUTILS_HOME): futils install location$(SPCLIBS_HOME): SPClibs install location$(CC): C compiler$(CFLAGS): C compiler flags$(FC): Fortran compiler$(FFLAGS_OPTIM): Fortran compiler optimized flags (used if DEBUG==TRUE)$(FFLAGS_DEBUG): Fortran compiler debug flags (used if DEBUG/=TRUE)$(FFLAGS_OMP): Fortran compiler OpenMP flags (used if OPENMP==TRUE)$(F90INCLUDES): ORB5's include locations$(SFC): serial Fortran compiler (used for compiling SPClibs)$(PREPROC_FLAG): preprocessor flag (used for compiling SPClibs)$(LD): linker$(LDFLAGS): linker flags$(LDFLAGS_OMP): linker OpenMP flags (used if OPENMP==TRUE)and optionally the following ones:
$(HDF5_HOME): HDF5 install location (if hdf5 module is not enough)$(BASEDIR): to set a non-standard root directory location$(SRCDIR): to set a non-standard source directory location$(OBJDIR): to set a non-standard object directory location$(BINDIR): to set a non-standard binary directory location$(SLIBS) / $(LIBS): to add libraries to the linking stage-D_CRAY to $(FFLAGS_OPTIM) and $(FFLAGS_DEBUG) as a work-around to preprocessor concatenation macro used in src/deposition.inc and src/get_field.inc.