SHELL=/bin/sh # If it is invoked by the command line # # make -f makefile # SRCS=estofs_surface_forcing.f OBJS=estofs_surface_forcing.o # Tunable parameters # FC Name of the fortran compiling system to use # LDFLAGS Flags to the loader # LIBS List of libraries # CMD Name of the executable # PROFLIB Library needed for profiling FC = ifort #use for extensive compilation error reporting LDFLAGS = -mkl INC = -I/nwprod/lib/incmod/g2_4 ## ESTOFS unitility library #ESTOFS_UTILITY_LIB = -L/nwprod/lib -lestofsutil ESTOFS_UTILITY_LIB = -L/nwprod/estofs_code.v1.0.0/lib -lestofsutil INCS = $(INC) LIB = -L/nwprod/lib -lg2_4 -lw3nco_4 -lbacio_4\ -L/nwpord/lib -ljasper -lpng -lz LIBS = $(LIB) $(ESTOFS_UTILITY_LIB) CMD = estofs_surface_forcing PROFLIB = -lprof # To perform the default compilation, use the first line # To compile with flowtracing turned on, use the second line # To compile giving profile additonal information, use the third line # WARNING: SIMULTANEOUSLY PROFILING AND FLOWTRACING IS NOT RECOMMENDED FFLAGS = -O3 -i4 $(INCS) # Lines from here on down should not need to be changed. They are the # actual rules which make uses to build a.out. all: $(CMD) $(CMD): $(OBJS) $(FC) $(LDFLAGS) -o $(@) $(OBJS) $(LIBS) rm -f $(OBJS) cp -p $(CMD) ../../exec/ # Make the profiled version of the command and call it a.out.prof #$(FC) $(LDFLAGS) -o $(@) $(OBJS) $(PROFLIB) $(LIBS) clean: rm -f $(OBJS) clobber: clean rm -f $(CMD) $(CMD).prof void: clobber rm -f $(SRCS) makefile if [ -s $(CMD) ] then echo copy $CMD cp -p $(CMD) . cp -p $(CMD) ../../exec/ fi