SHELL=/bin/ksh # # This makefile was produced by /usr/bin/fmgen at 04:12:32 PM on 05/01/95 # If it is invoked by the command line # make -f makefile # it will compile the fortran modules indicated by SRCS into the object # modules indicated by OBJS and produce an executable named swathps. # # If it is invoked by the command line # make -f makefile swathps.prof # it will compile the fortran modules indicated by SRCS into the object # modules indicated by OBJS and produce an executable which profiles # named swathps.prof. # # To remove all the objects but leave the executables use the command line # make -f makefile clean # # To remove everything but the source files use the command line # make -f makefile clobber # # To remove the source files created by /usr/bin/fmgen and this makefile # use the command line # make -f makefile void # # The parameters SRCS and OBJS should not need to be changed. If, however, # you need to add a new module add the name of the source module to the # SRCS parameter and add the name of the resulting object file to the OBJS # parameter. The new modules are not limited to fortran, but may be C, YACC, # LEX, or CAL. An explicit rule will need to be added for PASCAL modules. # SRCS= constants.f90 mod_flags.f90 mod_geom.f90 atmforcing.f90 OBJS= ${SRCS:.f90=.o} # Tunable parameters # # CF 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 # CF = ftn RTOFS_LIB_INC=../../../libs/incmod RTOFS_LIB=../../../libs INC1 = ${RTOFS_LIB_INC}/rtofs_serial_mods_4 INC2 = ${RTOFS_LIB_INC}/rtofs_hycomiot_mods_4 #INC3 = ${NW_LIB}/lib/incmod/g2 #LIBS = -L${RTOFS_LIB} -lrtofs_serial_mods_4 -lrtofs_hycomiot_4 \ # -L${NW_LIB}/lib -lg2 -lw3nco -lbacio -ljasper -lpng -lz INC3 = ${G2_INC4} LIBS = -L${RTOFS_LIB} -lrtofs_serial_mods_4 -lrtofs_hycomiot_4 \ ${G2_LIB4} ${BACIO_LIB4} ${W3NCO_LIB4} \ -L${JASPER_LIB} -ljasper \ -L${LIBPNG_LIB} -lpng \ -L${ZLIB_LIBRARIES} -lz BINDIR= ../../../exec CMD = rtofs_atmforcing 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 = -free -O2 -assume byterecl -convert big_endian DEBUGF = -g -O0 -check all -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -traceback -ftrapuv LDFLAGS = -O2 # Lines from here on down should not need to be changed. They are the # actual rules which make uses to build swathps. # all: $(CMD) everything: clean $(CMD) install finish $(CMD): $(OBJS) $(CF) $(LDFLAGS) -o $(CMD) $(OBJS) $(LIBS) debug: FFLAGS = $(DEBUGF) debug: all test: $(CMD) < input.txt > output.txt diff output.txt valid_output.txt #$(CMD): $(OBJS) # $(CF) $(LDFLAGS) -o $(@) $(OBJS) $(LIBS) # # #(OBJS): $(SRCS) $(INC1) $(INC2) # $(CF) $(FFLAGS) -c $< -I$(INC1) -I$(INC2) # Make the profiled version of the command and call it swathps.prof # $(CMD).prof: $(OBJS) $(CF) $(LDFLAGS) -o $(@) $(OBJS) $(PROFLIB) $(LIBS) clean: -rm -f $(OBJS) *.mod ${CMD} finish: -rm ${OBJS} *.mod install: -mv $(CMD) ${BINDIR} copy_summ: cp summary.o.hold summary.o allclean: clean all clobber: clean -rm -f $(CMD) $(CMD).prof void: clobber -rm -f $(SRCS) makefile atmforcing.o: atmforcing.f90 constants.o mod_flags.o mod_geom.o ################################ .IGNORE: .SUFFIXES: .f90 .o # There is probably no reason to modify these rules .f90.o: $(CF) $(FFLAGS) -c $< -I$(INC1) -I$(INC2) -I$(INC3) #.f90.o: # rm $@ $*.mod # $(CF) $(FFLAGS) -c $< -I$(INC1) -I$(INC2)