hello dear membrane
Could someone tell me how to create and run a makefile. I have the following code I want to run..
subroutines.f90
main.f90
i have a makefile contain bellow data:
#
# Makefile for finite element code...
#
# Please adjust Fortran compiler and flags, path to netcdf
# to your specific computer
#===============================
# Fortran compiler and flags
#================================
# INTEL COMPILER
#-------------------
FC = ifort
## Options optimizing for speed (on the current cpu architecture)
FCFLAGS = -O3 -ipo -xHost -openmp -no-prec-div -align
## Options for debugging:
#FCFLAGS = -g -xHost -openmp -traceback -fpe:0 -check all
#=================================
# Path to netcdf
#=================================
## If given by environment variables
# NC_LIB = $(NETCDF_LD)
# NC_INC = -I$(NETCDF_INC)
## If in the standard path (e.g. /usr/lib), you may skip -L
## We need the Fortran bindings, too, which can come as a seperate
## lib (netcdff) or be in included in the main lib (netcdf).
# NC_LIB = -lnetcdf -lnetcdff
# NC_INC =
## A path at your system, here Fortran libnetcdff included in libnetcdf
NC_ROOT = /uv/soft/netcdf/3.6.3-gnu
NC_LIB = -L$(NC_ROOT)/lib -lnetcdf
NC_INC = -I$(NC_ROOT)/include
## or no netcdf at all
# NC_LIB = -DNO_NETCDF
# NC_INC =
#================================
# Name of the executable
#================================
# Just choose whatever you like.
EXE = ompTsuna.x
##########################################################
# No change necessary below
#--------------------------------------------------------
.SUFFIXES: .F90 .o
SRC = data_types.F90 \
parameters.F90 \
mesh.F90 \
elements.F90 \
swe.F90 \
benchmark.F90 \
initial_conditions.F90 \
okada_fault_parameters.F90 \
output.F90 \
tsunami.F90
#---------------------------------------------------
$(EXE): $(SRC)
make clean
$(FC) $(FCFLAGS) -o $(EXE) $(SRC) $(NC_LIB) $(NC_INC)
clean :
rm -f *~ *.o *.mod $(EXE)
please help me how i can use this makefile for run my program?
thanks